- Ricerca delle Organizzazioni, per inviare i RIS.
This commit is contained in:
@@ -137,7 +137,11 @@ const MyGroupSchema = new Schema({
|
|||||||
});
|
});
|
||||||
|
|
||||||
MyGroupSchema.statics.getFieldsForSearch = function () {
|
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) {
|
MyGroupSchema.statics.executeQueryTable = function (idapp, params, user) {
|
||||||
@@ -145,13 +149,13 @@ MyGroupSchema.statics.executeQueryTable = function (idapp, params, user) {
|
|||||||
|
|
||||||
const { User } = require('./user');
|
const { User } = require('./user');
|
||||||
|
|
||||||
if (params.options) {
|
/*if (params.options) {
|
||||||
if (tools.isBitActive(params.options, shared_consts.OPTIONS_SEARCH_USER_ONLY_FULL_WORDS)) {
|
if (tools.isBitActive(params.options, shared_consts.OPTIONS_SEARCH_USER_ONLY_FULL_WORDS)) {
|
||||||
params.fieldsearch = User.getFieldsForSearchUserFriend();
|
params.fieldsearch = User.getFieldsForSearchUserFriend();
|
||||||
} else if (tools.isBitActive(params.options, shared_consts.OPTIONS_SEARCH_USER_ALL_WORDS)) {
|
} else if (tools.isBitActive(params.options, shared_consts.OPTIONS_SEARCH_USER_ALL_WORDS)) {
|
||||||
params.fieldsearch = User.getFieldsForSearchUserFriend_AllWords();
|
params.fieldsearch = User.getFieldsForSearchUserFriend_AllWords();
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
|
|
||||||
return tools.executeQueryTable(this, idapp, params, user);
|
return tools.executeQueryTable(this, idapp, params, user);
|
||||||
};
|
};
|
||||||
@@ -536,15 +540,7 @@ MyGroupSchema.statics.removeCircuitFromGroup = async function (idapp, groupname,
|
|||||||
let remove = false;
|
let remove = false;
|
||||||
|
|
||||||
// Se il mio account non è stato utilizzato, allora lo cancello anche questo
|
// Se il mio account non è stato utilizzato, allora lo cancello anche questo
|
||||||
const myaccount = await Account.getAccountByUsernameAndCircuitId(
|
const myaccount = await Account.getAccountByUsernameAndCircuitId(idapp, '', circuitId, false, false, groupname, '');
|
||||||
idapp,
|
|
||||||
'',
|
|
||||||
circuitId,
|
|
||||||
false,
|
|
||||||
false,
|
|
||||||
groupname,
|
|
||||||
''
|
|
||||||
);
|
|
||||||
if (myaccount && myaccount.totTransato === 0) {
|
if (myaccount && myaccount.totTransato === 0) {
|
||||||
remove = true;
|
remove = true;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user