- L'utente entra direttamente sul circuito, con fido a zero.

++Abilitazione Fido utente (per admin).
This commit is contained in:
Surya Paolo
2023-06-01 11:39:53 +02:00
parent 0945f1af08
commit a79e79a85e
19 changed files with 615 additions and 418 deletions

View File

@@ -176,6 +176,7 @@ MyBachecaSchema.statics.executeQueryTable = function (idapp, params, user) {
MyBachecaSchema.statics.getMyRecById = function (idapp, id) {
const MyBacheca = this;
let myparsid = {
'_id': id,
idapp,
@@ -273,6 +274,20 @@ MyBachecaSchema.statics.getMyRecById = function (idapp, id) {
},
},
},
{
$lookup: {
'from': 'mygroups',
'localField': 'groupname',
'foreignField': 'groupname',
'as': 'mygrp',
},
},
{
$unwind: {
path: '$mygrp',
preserveNullAndEmptyArrays: true,
},
},
{
'$project': shared_consts.getProjectForAll({}, tableModel),
},
@@ -330,7 +345,7 @@ MyBachecaSchema.statics.getMyRecById = function (idapp, id) {
try {
let numtab = tools.getNumTabByTable(shared_consts.TABLES_MYBACHECAS);
const objadd = tools.addNumFavoriteAndBookmarkToQuery(idapp, numtab);
let objadd = tools.addNumFavoriteAndBookmarkToQuery(idapp, numtab);
query = [...query, ...objadd.query];
const toadd = {