zet-lib 1.0.86 → 1.0.87
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 +13 -3
- package/package.json +1 -1
package/lib/zRoute.js
CHANGED
|
@@ -304,15 +304,25 @@ zRoute.attributeData = async (res, MYMODEL, obj) => {
|
|
|
304
304
|
filter = null
|
|
305
305
|
}
|
|
306
306
|
attributeData.labels = MYMODEL.labels
|
|
307
|
+
invisibles = invisibles.filter(Util.arrayUnique)
|
|
308
|
+
visibles = visibles.filter(Util.arrayUnique)
|
|
309
|
+
//check custom code
|
|
310
|
+
let customs = []
|
|
311
|
+
for (var key in MYMODEL.widgets) {
|
|
312
|
+
if (MYMODEL.widgets[key].name == 'custom') {
|
|
313
|
+
customs.push(key)
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
if (customs.length) {
|
|
317
|
+
visibles = visibles.filter((item) => !customs.includes(item))
|
|
318
|
+
invisibles = invisibles.filter((item) => !customs.includes(item))
|
|
319
|
+
}
|
|
307
320
|
|
|
308
321
|
res.locals.routeName = routeName
|
|
309
322
|
res.locals.attributeData = attributeData
|
|
310
323
|
res.locals.visibles = visibles
|
|
311
324
|
res.locals.invisibles = invisibles
|
|
312
325
|
res.locals.gridFilter = filter
|
|
313
|
-
/* res.locals.visiblesObj = visibles.reduce((result, item) => {
|
|
314
|
-
return { ...result, [item]: MYMODEL.labels[item] }
|
|
315
|
-
}, [])*/
|
|
316
326
|
let visiblesObj = []
|
|
317
327
|
visibles.map((item) => {
|
|
318
328
|
visiblesObj.push({
|