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

@@ -1992,6 +1992,9 @@ module.exports = {
getQueryTable: async function (idapp, params, user) {
const { Search }= require('../models/search');
if (typeof params.startRow !== 'number') {
throw new Error('startRow must be number');
} else if (typeof params.endRow !== 'number') {
@@ -2571,6 +2574,12 @@ module.exports = {
if (querytemp) {
query = [...query, ...querytemp];
}
// Save the search:
if (user._id) {
const mysearch = new Search({idapp, userId: user._id, text: params.filter});
await mysearch.save();
}
}
if (params.table === 'mygroups' || params.table === 'circuits') {
@@ -2718,8 +2727,9 @@ module.exports = {
},
SetBit(myval, bit) {
myval = myval & bit;
return myval;
let myvalout = myval
myvalout |= bit
return myvalout
},
async snooze(ms) {