zet-lib 1.2.60 → 1.2.61
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
|
@@ -3639,19 +3639,21 @@ zRoute.import = async (req, res, MYMODEL) => {
|
|
|
3639
3639
|
columnCut++
|
|
3640
3640
|
}
|
|
3641
3641
|
try {
|
|
3642
|
+
delete data.lock
|
|
3643
|
+
delete data.approval_status
|
|
3644
|
+
delete data.approval_history
|
|
3642
3645
|
if (isInsert) {
|
|
3643
3646
|
if (Util.in_array('company_id', fields)) data.company_id = res.locals.companyId
|
|
3644
3647
|
if (Util.in_array('created_at', fields)) data.created_at = Util.now()
|
|
3645
3648
|
if (Util.in_array('created_by', fields)) data.created_by = res.locals.userId
|
|
3646
3649
|
if (Util.in_array('updated_at', fields)) data.updated_at = Util.now()
|
|
3647
3650
|
if (Util.in_array('updated_by', fields)) data.updated_by = res.locals.userId
|
|
3648
|
-
|
|
3651
|
+
|
|
3649
3652
|
await connection.insert({ table: MYMODEL.table, data: data })
|
|
3650
3653
|
hd += `<td class='text text-success'>${LANGUAGE['success']}</td>`
|
|
3651
3654
|
} else {
|
|
3652
3655
|
if (Util.in_array('updated_at', fields)) data.updated_at = Util.now()
|
|
3653
3656
|
if (Util.in_array('updated_by', fields)) data.updated_by = res.locals.userId
|
|
3654
|
-
delete data.lock
|
|
3655
3657
|
//check data is lock
|
|
3656
3658
|
let mydatas = await connection.result({
|
|
3657
3659
|
select: 'id,lock',
|