zet-lib 1.2.67 → 1.2.69

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.
@@ -297,6 +297,9 @@ const generate = async (req, res) => {
297
297
  CREATE TABLE ${table} (
298
298
  id BIGSERIAL PRIMARY KEY,
299
299
  company_id BIGINT NOT NULL,
300
+ lock smallint default 0,
301
+ approval_status smallint DEFAULT 1,
302
+ approval_history jsonb[] DEFAULT NULL,
300
303
  updated_by BIGINT DEFAULT NULL,
301
304
  created_by BIGINT DEFAULT NULL,
302
305
  created_at TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP,
package/lib/zRoute.js CHANGED
@@ -544,7 +544,12 @@ zRoute.relations = async (req, res, table) => {
544
544
  let nots = Util.nots
545
545
  let obj = {}
546
546
  let visibles = MODEL_TABLE.grids.visibles
547
+ //exclude lock,approval_status, approval_history
548
+ let notIncludes = ['lock', 'approval_status', 'approval_history', 'created_at']
549
+ visibles = visibles.filter((item) => !notIncludes.includes(item))
547
550
  let invisibles = MODEL_TABLE.grids.invisibles
551
+ invisibles = invisibles.filter((item) => !notIncludes.includes(item))
552
+
548
553
  let properties = {}
549
554
  visibles.forEach(function (item) {
550
555
  if (!Util.in_array(item, nots)) {
@@ -558,6 +563,9 @@ zRoute.relations = async (req, res, table) => {
558
563
  properties[item] = MODEL_TABLE.widgets[item]
559
564
  }
560
565
  })
566
+ delete properties.lock
567
+ delete properties.approval_status
568
+ delete properties.approval_history
561
569
  relations[key] = obj
562
570
  relations[`properties_${key}`] = properties
563
571
  relations[keyRow] = await zRoute.relations(req, res, widget.table)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zet-lib",
3
- "version": "1.2.67",
3
+ "version": "1.2.69",
4
4
  "description": "zet is a library that part of zet generator.",
5
5
  "engines": {
6
6
  "node": ">=18"