set notif if service your province

This commit is contained in:
Surya Paolo
2023-04-13 13:46:48 +02:00
parent cada7aa0b6
commit cda0bff21f
7 changed files with 136 additions and 35 deletions

View File

@@ -448,9 +448,12 @@ router.post('/settable', authenticate, async (req, res) => {
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;
if (params.table === shared_consts.TABLES_MYGOODS)
typeid = shared_consts.TypeNotifs.ID_BACHECA_NEW_GOOD
else if (params.table === shared_consts.TABLES_MYSKILLS)
typeid = shared_consts.TypeNotifs.ID_BACHECA_NEW_SERVICE
else if (params.table === shared_consts.TABLES_MYHOSPS)
typeid = shared_consts.TypeNotifs.ID_BACHECA_NEW_HOSP
setnotif = true;
}