zet-lib 1.3.16 → 1.3.17
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 +4 -2
- package/package.json +1 -1
package/lib/zRoute.js
CHANGED
|
@@ -1989,7 +1989,7 @@ zRoute.listDataTable = async (req, res, objData = {}) => {
|
|
|
1989
1989
|
let buttons = objData.hasOwnProperty('actionButtons') ? objData.actionButtons(levels, row, MYMODEL.table) : zRoute.actionButtons(levels, row, MYMODEL.table)
|
|
1990
1990
|
arr.push(buttons)
|
|
1991
1991
|
} else {
|
|
1992
|
-
let data = objData.hasOwnProperty('dataTableData') ? objData.dataTableData(item, row[item], MYMODEL, relations) : zRoute.dataTableData(item, row[item], MYMODEL, relations, row.id)
|
|
1992
|
+
let data = objData.hasOwnProperty('dataTableData') ? objData.dataTableData(item, row[item], MYMODEL, relations, row.id) : zRoute.dataTableData(item, row[item], MYMODEL, relations, row.id)
|
|
1993
1993
|
arr.push(data)
|
|
1994
1994
|
}
|
|
1995
1995
|
})
|
|
@@ -2017,6 +2017,7 @@ zRoute.listData = async (req, res, MYMODEL, zRole, actionButtonsFn) => {
|
|
|
2017
2017
|
try {
|
|
2018
2018
|
actionButtonsFn = actionButtonsFn || function () {}
|
|
2019
2019
|
const relations = await zRoute.relations(req, res, MYMODEL.table)
|
|
2020
|
+
//console.log(JSON.stringify(relations))
|
|
2020
2021
|
const body = req.body
|
|
2021
2022
|
const fields = body.fields
|
|
2022
2023
|
const select = Util.selectParser(fields, MYMODEL)
|
|
@@ -2117,7 +2118,8 @@ zRoute.listData = async (req, res, MYMODEL, zRole, actionButtonsFn) => {
|
|
|
2117
2118
|
let buttons = !actionButtonsFn(levels, row, MYMODEL.table) ? zRoute.actionButtons(levels, row, MYMODEL.table) : actionButtonsFn(levels, row, MYMODEL.table)
|
|
2118
2119
|
arr.push(buttons)
|
|
2119
2120
|
} else {
|
|
2120
|
-
|
|
2121
|
+
let data = objData.hasOwnProperty('dataTableData') ? objData.dataTableData(item, row[item], MYMODEL, relations) : zRoute.dataTableData(item, row[item], MYMODEL, relations, row.id)
|
|
2122
|
+
arr.push(data)
|
|
2121
2123
|
}
|
|
2122
2124
|
})
|
|
2123
2125
|
datas.push(arr)
|