@xuda.io/xuda-worker-bundle-min 1.3.831 → 1.3.833
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/index.js +10 -10
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -2626,7 +2626,6 @@ func.datasource.execute = async function (
|
|
|
2626
2626
|
data_arr = _ds.data_feed?.rows || [];
|
|
2627
2627
|
}
|
|
2628
2628
|
|
|
2629
|
-
const newRecord = 999999;
|
|
2630
2629
|
// initiated with Update but no rows found
|
|
2631
2630
|
if (
|
|
2632
2631
|
tree_obj.crudMode === "U" &&
|
|
@@ -2634,12 +2633,12 @@ func.datasource.execute = async function (
|
|
|
2634
2633
|
!_ds?.data_feed?.rows?.length
|
|
2635
2634
|
) {
|
|
2636
2635
|
_ds.set_mode = "C";
|
|
2637
|
-
data_arr = [{ _ROWID: "newRecord" }];
|
|
2636
|
+
data_arr[glb.newRecord] = [{ _ROWID: "newRecord" }];
|
|
2638
2637
|
}
|
|
2639
2638
|
|
|
2640
2639
|
if (tree_obj.crudMode === "C") {
|
|
2641
2640
|
_ds.set_mode = "C";
|
|
2642
|
-
data_arr = [{ _ROWID: "newRecord" }];
|
|
2641
|
+
data_arr[glb.newRecord] = [{ _ROWID: "newRecord" }];
|
|
2643
2642
|
}
|
|
2644
2643
|
|
|
2645
2644
|
for await (let val of data_arr) {
|
|
@@ -2700,9 +2699,7 @@ func.datasource.execute = async function (
|
|
|
2700
2699
|
_ds.set_mode = "C";
|
|
2701
2700
|
_ds.record_not_found = true;
|
|
2702
2701
|
|
|
2703
|
-
|
|
2704
|
-
|
|
2705
|
-
if (_.isEmpty(_ds.data_feed.rows[newRecord])) {
|
|
2702
|
+
if (_.isEmpty(_ds.data_feed.rows[glb.newRecord])) {
|
|
2706
2703
|
await func.datasource.render_fields_form(
|
|
2707
2704
|
SESSION_ID,
|
|
2708
2705
|
dataSourceSession,
|
|
@@ -3027,7 +3024,11 @@ func.datasource.render_fields_form = async function (
|
|
|
3027
3024
|
try {
|
|
3028
3025
|
row_idx = func.common.find_ROWID_idx(_ds, data._ROWID);
|
|
3029
3026
|
} catch (error) {
|
|
3030
|
-
|
|
3027
|
+
if (data._ROWID === "newRecord") {
|
|
3028
|
+
_ds.data_feed.rows[glb.newRecord] = { _ROWID: data._ROWID };
|
|
3029
|
+
} else {
|
|
3030
|
+
_ds.data_feed.rows.push({ _ROWID: data._ROWID });
|
|
3031
|
+
}
|
|
3031
3032
|
row_idx = func.common.find_ROWID_idx(_ds, data._ROWID);
|
|
3032
3033
|
}
|
|
3033
3034
|
|
|
@@ -3128,9 +3129,8 @@ func.datasource.run_rows_form = async function (
|
|
|
3128
3129
|
if (typeof val !== "undefined") {
|
|
3129
3130
|
idx = rowIdxP;
|
|
3130
3131
|
} else {
|
|
3131
|
-
|
|
3132
|
-
|
|
3133
|
-
idx = newRecord;
|
|
3132
|
+
val = _ds.data_feed.rows[glb.newRecord] = { _ROWID: "newRecord" };
|
|
3133
|
+
idx = glb.newRecord;
|
|
3134
3134
|
}
|
|
3135
3135
|
} catch (e) {
|
|
3136
3136
|
console.error(e);
|