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.
Files changed (2) hide show
  1. package/lib/zRoute.js +13 -3
  2. 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({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zet-lib",
3
- "version": "1.0.86",
3
+ "version": "1.0.87",
4
4
  "description": "zet is a library that part of zet generator.",
5
5
  "engines": {
6
6
  "node": ">=18"