zet-lib 1.3.2 → 1.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/zRoute.js +14 -6
- package/package.json +1 -1
package/lib/zRoute.js
CHANGED
|
@@ -2197,10 +2197,14 @@ zRoute.postGridReload = async (req, res) => {
|
|
|
2197
2197
|
let routeName = res.locals.routeName
|
|
2198
2198
|
let userId = res.locals.userId
|
|
2199
2199
|
let json = Util.jsonSuccess('Successfully to reset grid filter ')
|
|
2200
|
-
await connection.
|
|
2200
|
+
let result = await connection.update({
|
|
2201
2201
|
table: gridTable,
|
|
2202
|
+
data: {
|
|
2203
|
+
filter: null,
|
|
2204
|
+
},
|
|
2202
2205
|
where: { user_id: userId, route_name: routeName },
|
|
2203
2206
|
})
|
|
2207
|
+
|
|
2204
2208
|
//await zRoute.attributeData(res, )
|
|
2205
2209
|
res.json(json)
|
|
2206
2210
|
}
|
|
@@ -4523,11 +4527,14 @@ zRoute.modelsCacheRenew = (table, companyId) => {
|
|
|
4523
4527
|
}
|
|
4524
4528
|
|
|
4525
4529
|
let MODELS_DRAGDROPS = myCache.get('MODELS_DRAGDROPS')
|
|
4526
|
-
|
|
4527
|
-
MODELS_DRAGDROPS[
|
|
4528
|
-
|
|
4529
|
-
|
|
4530
|
-
|
|
4530
|
+
for (let key in MODELS_DRAGDROPS) {
|
|
4531
|
+
let DRAGDROPS = MODELS_DRAGDROPS[key] || []
|
|
4532
|
+
DRAGDROPS.map((item) => {
|
|
4533
|
+
if (item.objectSQL.table == table) {
|
|
4534
|
+
connection.results(item.objectSQL).then(function (results) {
|
|
4535
|
+
myCache.set(item.key, results)
|
|
4536
|
+
})
|
|
4537
|
+
}
|
|
4531
4538
|
})
|
|
4532
4539
|
}
|
|
4533
4540
|
}
|
|
@@ -4535,6 +4542,7 @@ zRoute.modelsCacheRenew = (table, companyId) => {
|
|
|
4535
4542
|
console.log(err)
|
|
4536
4543
|
}
|
|
4537
4544
|
}
|
|
4545
|
+
|
|
4538
4546
|
zRoute.makeFunctionsSystem = () => {
|
|
4539
4547
|
try {
|
|
4540
4548
|
let obj = myCache.get('ZFUNCTIONS')
|