- varie sistemazioni: filtri iscritti, profilo, ecc...

This commit is contained in:
Surya Paolo
2025-01-11 12:08:03 +01:00
parent 298dc4f5a5
commit 2b1fc9b090
52 changed files with 734 additions and 626 deletions

View File

@@ -938,6 +938,40 @@ export default defineComponent({
arrfilter_cities.push({ key: 'prov', value: idProvince })
}
} else if (item.table === shared_consts.TABFILTRI_UTENTE) {
if (item.value === shared_consts.FILTER_USER_SENZA_PROVINCE) {
filtercustom.push({ 'profile.resid_province': { $exists: false } });
} else if (item.value === shared_consts.FILTER_USER_CON_CIRCUITO) {
filtercustom.push({
'profile.mycircuits': { $exists: true, $ne: [] }
});
} else if (item.value === shared_consts.FILTER_USER_SENZA_CIRCUITO) {
filtercustom.push({
$or: [
{ 'profile.mycircuits': { $exists: false } },
{ 'profile.mycircuits': { $eq: [] } }
]
});
} else if (item.value === shared_consts.FILTER_USER_PROVINCE) {
filtercustom.push({ 'profile.resid_province': { $exists: true, $ne: '' } });
} else if (item.value === shared_consts.FILTER_USER_TELEGRAM_BLOCKED) {
filtercustom.push({ 'profile.teleg_id_old': { $gt: 1 } });
} else if (item.value === shared_consts.FILTER_USER_WITHOUT_USERNAME_TELEGRAM) {
filtercustom.push({
$or: [
{ 'profile.username_telegram': { $exists: false } },
{ 'profile.username_telegram': { $exists: true, $eq: '' } }],
});
} else if (item.value === shared_consts.FILTER_USER_NO_VERIFIED_APORTADOR) {
filtercustom.push({
verified_by_aportador: { $exists: false },
});
} else if (item.value === shared_consts.FILTER_USER_NO_TELEGRAM_ID) {
filtercustom.push({ 'profile.teleg_id': { $lt: 1 } });
}
} else if (item.table === 'cities') {
if (item.value && item.value.hasOwnProperty('_id')) {