From 5ba86e3641afd3f9d2deec489dd7ae2281399a07 Mon Sep 17 00:00:00 2001 From: Surya Paolo Date: Tue, 14 Jan 2025 19:16:57 +0100 Subject: [PATCH] - Lista iscritti: aggiunto le note e il flag "Da Contattare" --- src/server/models/mygroup.js | 1 + src/server/models/user.js | 11 +++++++++++ src/server/tools/general.js | 6 ++++-- src/server/tools/shared_nodejs.js | 3 +++ src/server/version.txt | 2 +- 5 files changed, 20 insertions(+), 3 deletions(-) diff --git a/src/server/models/mygroup.js b/src/server/models/mygroup.js index 7fafd31..5fe1ca2 100755 --- a/src/server/models/mygroup.js +++ b/src/server/models/mygroup.js @@ -251,6 +251,7 @@ MyGroupSchema.statics.getWhatToShow = function (idapp, username) { website: 1, link_telegram: 1, note: 1, + da_contattare: 1, admins: 1, blocked: 1, req_users: 1, diff --git a/src/server/models/user.js b/src/server/models/user.js index 95f3281..99c48ea 100755 --- a/src/server/models/user.js +++ b/src/server/models/user.js @@ -360,6 +360,9 @@ const UserSchema = new mongoose.Schema({ note: { type: String, }, + da_contattare: { + type: Boolean, + }, qualifica: { type: String, }, @@ -1902,6 +1905,7 @@ UserSchema.statics.getUserProfileByUsername = async function ( 'profile.qualifica': 1, 'profile.biografia': 1, 'profile.note': 1, + 'profile.da_contattare': 1, 'profile.teleg_id': 1, 'profile.username_telegram': 1, 'profile.firstname_telegram': 1, @@ -1949,6 +1953,7 @@ UserSchema.statics.getUserProfileByUsername = async function ( 'profile.qualifica': 1, 'profile.biografia': 1, 'profile.note': 1, + 'profile.da_contattare': 1, 'profile.teleg_id': 1, 'profile.username_telegram': 1, 'profile.firstname_telegram': 1, @@ -1997,6 +2002,7 @@ UserSchema.statics.getUserProfileByUsername = async function ( 'profile.qualifica': 1, 'profile.biografia': 1, 'profile.note': 1, + 'profile.da_contattare': 1, 'profile.teleg_id': 1, 'profile.username_telegram': 1, 'profile.firstname_telegram': 1, @@ -3423,6 +3429,7 @@ function getWhatToShow(idapp, username) { 'profile.qualifica': 1, 'profile.biografia': 1, 'profile.note': 1, + 'profile.da_contattare': 1, 'profile.username_telegram': 1, 'profile.firstname_telegram': 1, 'profile.lastname_telegram': 1, @@ -3443,6 +3450,7 @@ function getWhatToShow(idapp, username) { 'profile.friends': 1, 'profile.handshake': 1, 'profile.note': 1, + 'profile.da_contattare': 1, }; } @@ -3467,6 +3475,7 @@ function getWhatToShow_Unknown(idapp, username) { 'profile.calc': 1, date_reg: 1, 'profile.note': 1, + 'profile.da_contattare': 1, 'profile.handshake': 1, 'profile.friends': 1, 'profile.favorite': 1, @@ -3501,6 +3510,7 @@ UserSchema.statics.getWhatToShow_IfFriends = async function (idapp, username) { groups: 1, 'profile.handshake': 1, 'profile.note': 1, + 'profile.da_contattare': 1, 'profile.friends': 1, 'profile.favorite': 1, 'profile.bookmark': 1, @@ -5355,6 +5365,7 @@ UserSchema.statics.getQueryReceiveRISUsers = function (idapp, hours) { "profile.img": 1, 'profile.handshake': 1, 'profile.note': 1, + 'profile.da_contattare': 1, }, }, ]; diff --git a/src/server/tools/general.js b/src/server/tools/general.js index 2526634..ca4f488 100755 --- a/src/server/tools/general.js +++ b/src/server/tools/general.js @@ -2864,7 +2864,8 @@ module.exports = { 'user.surname': 1, 'user.profile.img': 1, 'user.profile.qualifica': 1, - 'user.profile.note': 1, + 'user.profile.note': 1, + 'profile.da_contattare': 1, }); if (qa1) query = [...query, ...qa1]; query.push({ $unwind: '$user' }); @@ -2914,7 +2915,8 @@ module.exports = { 'user.surname': 1, 'user.profile.img': 1, 'user.profile.qualifica': 1, - 'user.profile.note': 1, + 'user.profile.note': 1, + 'profile.da_contattare': 1, }); if (qa1) query = [...query, ...qa1]; query.push({ $unwind: '$user' }); diff --git a/src/server/tools/shared_nodejs.js b/src/server/tools/shared_nodejs.js index 2653c2a..493c7f9 100755 --- a/src/server/tools/shared_nodejs.js +++ b/src/server/tools/shared_nodejs.js @@ -53,6 +53,7 @@ module.exports = { FILTER_USER_ONLINE_6_MESI: 268435456, FILTER_NOTE: 536870912, FILTER_SENZA_NOTE: 1073741824, + FILTER_DA_CONTATTARE: 2147483648, OPTIONS_SEARCH_ONLY_FULL_WORDS: 1, OPTIONS_SEARCH_USER_ONLY_FULL_WORDS: 2, @@ -969,6 +970,7 @@ module.exports = { adType: 1, photos: 1, note: 1, + da_contattare: 1, descr: 1, date_created: 1, date_updated: 1, @@ -989,6 +991,7 @@ module.exports = { 'profile.mycircuits': 1, 'profile.qualifica': 1, 'profile.note': 1, + 'profile.da_contattare': 1, 'profile.resid_province': 1, 'profile.resid_card': 1, 'profile.username_telegram': 1, diff --git a/src/server/version.txt b/src/server/version.txt index b01de29..95ce23d 100644 --- a/src/server/version.txt +++ b/src/server/version.txt @@ -1 +1 @@ -1.1.16 \ No newline at end of file +1.1.17 \ No newline at end of file