Group Page : visibility, some info, members views.

This commit is contained in:
paoloar77
2022-08-10 17:07:02 +02:00
parent 680b353535
commit 07f42398da
7 changed files with 93 additions and 18 deletions

View File

@@ -340,23 +340,29 @@ router.post('/settable', authenticate, async (req, res) => {
let typeid = 0;
let groupnameDest = '';
if (shared_consts.TABLES_ADV_NOTIFICATION.includes(params.table)) {
typedir = shared_consts.TypeNotifs.TYPEDIR_BACHECA;
typeid = (params.table === shared_consts.TABLES_MYGOODS) ? shared_consts.TypeNotifs.ID_BACHECA_NEW_GOOD : shared_consts.TypeNotifs.ID_BACHECA_NEW_SERVICE
setnotif = true;
}
if (isnewrec) {
// New Record created
if (shared_consts.TABLES_EVENTS_NOTIFICATION.includes(params.table)) {
typedir = shared_consts.TypeNotifs.TYPEDIR_EVENTS;
typeid = shared_consts.TypeNotifs.ID_EVENTS_NEW_REC;
setnotif = true;
}
if (shared_consts.TABLES_ADV_NOTIFICATION.includes(params.table)) {
typedir = shared_consts.TypeNotifs.TYPEDIR_BACHECA;
typeid = (params.table === shared_consts.TABLES_MYGOODS)
? shared_consts.TypeNotifs.ID_BACHECA_NEW_GOOD
: shared_consts.TypeNotifs.ID_BACHECA_NEW_SERVICE
setnotif = true;
}
if (shared_consts.TABLES_GROUPS_NOTIFICATION.includes(params.table)) {
typedir = shared_consts.TypeNotifs.TYPEDIR_GROUPS;
typeid = shared_consts.TypeNotifs.ID_GROUP_NEW_REC;
groupnameDest = myrec ? myrec.groupname : '';
setnotif = true;
if (shared_consts.TABLES_EVENTS_NOTIFICATION.includes(params.table)) {
typedir = shared_consts.TypeNotifs.TYPEDIR_EVENTS;
typeid = shared_consts.TypeNotifs.ID_EVENTS_NEW_REC;
setnotif = true;
}
if (shared_consts.TABLES_GROUPS_NOTIFICATION.includes(params.table)) {
typedir = shared_consts.TypeNotifs.TYPEDIR_GROUPS;
typeid = shared_consts.TypeNotifs.ID_GROUP_NEW_REC;
groupnameDest = myrec ? myrec.groupname : '';
setnotif = true;
}
}
if (setnotif) {