From f26ae170bb980616f47737d223f9b657ae93b5f7 Mon Sep 17 00:00:00 2001 From: Surya Paolo Date: Mon, 21 Jul 2025 22:49:55 +0200 Subject: [PATCH] - Ricerca delle Organizzazioni, per inviare i RIS. --- src/server/models/mygroup.js | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/src/server/models/mygroup.js b/src/server/models/mygroup.js index c71fff5..7e3af8f 100755 --- a/src/server/models/mygroup.js +++ b/src/server/models/mygroup.js @@ -137,7 +137,11 @@ const MyGroupSchema = new Schema({ }); MyGroupSchema.statics.getFieldsForSearch = function () { - return [{ field: 'descr', type: tools.FieldType.string }]; + return [ + { field: 'descr', type: tools.FieldType.string }, + { field: 'groupname', type: tools.FieldType.string }, + { field: 'title', type: tools.FieldType.string }, + ]; }; MyGroupSchema.statics.executeQueryTable = function (idapp, params, user) { @@ -145,13 +149,13 @@ MyGroupSchema.statics.executeQueryTable = function (idapp, params, user) { const { User } = require('./user'); - if (params.options) { + /*if (params.options) { if (tools.isBitActive(params.options, shared_consts.OPTIONS_SEARCH_USER_ONLY_FULL_WORDS)) { params.fieldsearch = User.getFieldsForSearchUserFriend(); } else if (tools.isBitActive(params.options, shared_consts.OPTIONS_SEARCH_USER_ALL_WORDS)) { params.fieldsearch = User.getFieldsForSearchUserFriend_AllWords(); } - } + }*/ return tools.executeQueryTable(this, idapp, params, user); }; @@ -536,15 +540,7 @@ MyGroupSchema.statics.removeCircuitFromGroup = async function (idapp, groupname, let remove = false; // Se il mio account non รจ stato utilizzato, allora lo cancello anche questo - const myaccount = await Account.getAccountByUsernameAndCircuitId( - idapp, - '', - circuitId, - false, - false, - groupname, - '' - ); + const myaccount = await Account.getAccountByUsernameAndCircuitId(idapp, '', circuitId, false, false, groupname, ''); if (myaccount && myaccount.totTransato === 0) { remove = true; } else {