@xuda.io/xuda-worker-bundle-min 1.3.1098 → 1.3.1100

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.
Files changed (2) hide show
  1. package/index.js +48 -45
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -2631,6 +2631,7 @@ func.datasource.execute = async function (
2631
2631
  }
2632
2632
 
2633
2633
  case "batch": {
2634
+ debugger
2634
2635
  let has_datasource = await calc_batch_loops();
2635
2636
 
2636
2637
  _raw_data_rows = _ds?.v.raw_data?.rows || [];
@@ -5092,6 +5093,51 @@ func.datasource.update_changes_for_out_parameter = async function (
5092
5093
  }
5093
5094
  }
5094
5095
  };
5096
+
5097
+ func.datasource.set_outputField = async function (SESSION_ID, elementP, triggerP, functionP, dsSessionP, result) {
5098
+ var _session = SESSION_OBJ[SESSION_ID];
5099
+
5100
+ const output_field = await get_args_property_value("outputField");
5101
+
5102
+ // if (!output_field) {
5103
+ // func.utils.debug_report(
5104
+ // SESSION_ID,
5105
+ // "func.events.execute",
5106
+ // `${elementP} >${triggerP} >${functionP} > Output field not defined`,
5107
+ // "W"
5108
+ // );
5109
+
5110
+ // }
5111
+
5112
+
5113
+
5114
+ if (output_field) {
5115
+ let datasource_changes = {};
5116
+
5117
+ let ret_get_value = await func.datasource.get_value(
5118
+ SESSION_ID,
5119
+ output_field,
5120
+ dsSessionP
5121
+ );
5122
+ if (ret_get_value.found) {
5123
+ let _ds = _session.DS_GLB[ret_get_value.dsSessionP];
5124
+ if (!datasource_changes[_ds.dsSession]) {
5125
+ datasource_changes[_ds.dsSession] = {};
5126
+ }
5127
+ if (
5128
+ !datasource_changes[_ds.dsSession][ret_get_value.currentRecordId]
5129
+ ) {
5130
+ datasource_changes[_ds.dsSession][ret_get_value.currentRecordId] =
5131
+ {};
5132
+ }
5133
+ datasource_changes[_ds.dsSession][ret_get_value.currentRecordId][
5134
+ output_field
5135
+ ] = result;
5136
+ await func.datasource.update(SESSION_ID, datasource_changes);
5137
+ }
5138
+ }
5139
+
5140
+ }
5095
5141
  func.utils = {};
5096
5142
 
5097
5143
  func.utils.debug = {};
@@ -8092,50 +8138,7 @@ func.events.execute = async function (
8092
8138
  return _value;
8093
8139
  };
8094
8140
 
8095
- const set_outputField = async function (SESSION_ID, elementP, triggerP, functionP, dsSessionP, result) {
8096
- var _session = SESSION_OBJ[SESSION_ID];
8097
-
8098
- const output_field = await get_args_property_value("outputField");
8099
-
8100
- // if (!output_field) {
8101
- // func.utils.debug_report(
8102
- // SESSION_ID,
8103
- // "func.events.execute",
8104
- // `${elementP} >${triggerP} >${functionP} > Output field not defined`,
8105
- // "W"
8106
- // );
8107
-
8108
- // }
8109
-
8110
-
8111
-
8112
- if (output_field) {
8113
- let datasource_changes = {};
8114
-
8115
- let ret_get_value = await func.datasource.get_value(
8116
- SESSION_ID,
8117
- output_field,
8118
- dsSessionP
8119
- );
8120
- if (ret_get_value.found) {
8121
- let _ds = _session.DS_GLB[ret_get_value.dsSessionP];
8122
- if (!datasource_changes[_ds.dsSession]) {
8123
- datasource_changes[_ds.dsSession] = {};
8124
- }
8125
- if (
8126
- !datasource_changes[_ds.dsSession][ret_get_value.currentRecordId]
8127
- ) {
8128
- datasource_changes[_ds.dsSession][ret_get_value.currentRecordId] =
8129
- {};
8130
- }
8131
- datasource_changes[_ds.dsSession][ret_get_value.currentRecordId][
8132
- output_field
8133
- ] = result;
8134
- await func.datasource.update(SESSION_ID, datasource_changes);
8135
- }
8136
- }
8137
8141
 
8138
- }
8139
8142
  var args = {
8140
8143
  prog_id: refIdP?.prog,
8141
8144
  screenIdP: refIdP?.prog,
@@ -8698,7 +8701,7 @@ func.events.execute = async function (
8698
8701
  batch: async function () {
8699
8702
  const result = await this.get_data();
8700
8703
  debugger
8701
- await set_outputField(SESSION_ID, elementP, triggerP, functionP, dsSessionP, result);
8704
+ // await set_outputField(SESSION_ID, elementP, triggerP, functionP, dsSessionP, result);
8702
8705
  return result
8703
8706
 
8704
8707
  },
@@ -8850,7 +8853,7 @@ func.events.execute = async function (
8850
8853
 
8851
8854
  const api_ret = await func.api.call_project_api(_prog_id, params_obj);
8852
8855
 
8853
- await set_outputField(SESSION_ID, elementP, triggerP, functionP, dsSessionP, api_ret);
8856
+ await func.datasource.set_outputField(SESSION_ID, elementP, triggerP, functionP, dsSessionP, api_ret);
8854
8857
 
8855
8858
  // if (output_field) {
8856
8859
  // let datasource_changes = {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/xuda-worker-bundle-min",
3
- "version": "1.3.1098",
3
+ "version": "1.3.1100",
4
4
  "description": "xuda framework min",
5
5
  "main": "index.js",
6
6
  "scripts": {