zet-lib 3.3.4 → 3.3.5
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/Form.js +3 -1
- package/lib/zRoute.js +20 -16
- package/package.json +1 -1
package/lib/Form.js
CHANGED
|
@@ -508,7 +508,9 @@ Form.field = (obj) => {
|
|
|
508
508
|
});
|
|
509
509
|
value = value || [];
|
|
510
510
|
value.map((item, index) => {
|
|
511
|
-
|
|
511
|
+
if (obj.dataObject && item in obj.dataObject) {
|
|
512
|
+
leftButtons += `<li><button class="btn btn-primary boxy" type="button">${obj.dataObject[item]}<input type="hidden" name='${obj.name}[]' value="${item}"></button></li>`;
|
|
513
|
+
}
|
|
512
514
|
});
|
|
513
515
|
|
|
514
516
|
displayForm += `<div id="dragdrop_${obj.id}" class="row contentfields">
|
package/lib/zRoute.js
CHANGED
|
@@ -5321,22 +5321,26 @@ zRoute.updateSQL = async (req, res, table, data, whereData) => {
|
|
|
5321
5321
|
data: data,
|
|
5322
5322
|
});
|
|
5323
5323
|
//save to history
|
|
5324
|
-
|
|
5325
|
-
|
|
5326
|
-
|
|
5327
|
-
|
|
5328
|
-
|
|
5329
|
-
|
|
5330
|
-
|
|
5331
|
-
|
|
5332
|
-
|
|
5333
|
-
|
|
5334
|
-
|
|
5335
|
-
|
|
5336
|
-
|
|
5337
|
-
|
|
5338
|
-
|
|
5339
|
-
|
|
5324
|
+
try {
|
|
5325
|
+
connection.insert({
|
|
5326
|
+
table: "zhistory",
|
|
5327
|
+
data: {
|
|
5328
|
+
module_id: result.id,
|
|
5329
|
+
module: MYMODEL.table,
|
|
5330
|
+
data_1: JSON.stringify(result),
|
|
5331
|
+
data_2: JSON.stringify(myresult),
|
|
5332
|
+
data_1_date: result.updated_at,
|
|
5333
|
+
data_2_date: data.updated_at,
|
|
5334
|
+
created_by: userId,
|
|
5335
|
+
updated_by: userId,
|
|
5336
|
+
created_at: Util.now(),
|
|
5337
|
+
updated_at: Util.now(),
|
|
5338
|
+
company_id: res.locals.companyId,
|
|
5339
|
+
},
|
|
5340
|
+
});
|
|
5341
|
+
} catch (e) {
|
|
5342
|
+
console.log(e)
|
|
5343
|
+
}
|
|
5340
5344
|
zRoute.modelsCacheRenew(table, res.locals.companyId);
|
|
5341
5345
|
return myresult;
|
|
5342
5346
|
} else {
|