@fluxhub/fluxhub-lib 9.0.145 → 9.0.147

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.
@@ -928,8 +928,6 @@
928
928
  }
929
929
  if (queryp.types[i] == "string")
930
930
  queryp.values[i] = "" + queryp.values[i];
931
- if (queryp.types[i] == "date")
932
- queryp.values[i] = this.uti_s.sql_date(queryp.values[i]);
933
931
  if (queryp.types[i] == "date") {
934
932
  queryp.values[i] = this.uti_s.sql_date(queryp.values[i]);
935
933
  if (queryp.values[i].split("0").join("") == "NaN-NaN-NaN")
@@ -1878,6 +1876,7 @@
1878
1876
  maxFileSize: 500 * 1024 * 1024,
1879
1877
  });
1880
1878
  this.id_component = '';
1879
+ this.last_result = {};
1881
1880
  this.id = null;
1882
1881
  this.p_cod_doc = "";
1883
1882
  this.p_section = "";
@@ -1896,12 +1895,13 @@
1896
1895
  progressBar: true,
1897
1896
  });
1898
1897
  _this.ref_allegato();
1899
- _this.change.emit({
1898
+ _this.last_result = {
1900
1899
  item: item,
1901
1900
  response: response,
1902
1901
  status: status,
1903
- header: header,
1904
- });
1902
+ header: header
1903
+ };
1904
+ _this.change.emit(_this.last_result);
1905
1905
  }
1906
1906
  };
1907
1907
  }
@@ -1977,7 +1977,7 @@
1977
1977
  _this.uploader.setOptions(uo);
1978
1978
  _this.uploader.onCompleteAll = function () {
1979
1979
  _this.loading = false;
1980
- _this.upload_ended.emit();
1980
+ _this.upload_ended.emit(_this.last_result);
1981
1981
  if (_this.dialogRef != null)
1982
1982
  if (_this.dialogRef.componentInstance != null) {
1983
1983
  _this.dialogRef.componentInstance.update_progess(100);
@@ -2243,9 +2243,10 @@
2243
2243
  this.dialogRef.close(null);
2244
2244
  };
2245
2245
  FHWinComboSelect.prototype.set_selection = function (lab, myD, nota) {
2246
+ var _this = this;
2246
2247
  if (nota === void 0) { nota = false; }
2247
2248
  if (this.cmb_sel == null) {
2248
- this.set_selection(lab, myD, nota);
2249
+ setTimeout(function () { _this.set_selection(lab, myD, nota); }, 500);
2249
2250
  return;
2250
2251
  }
2251
2252
  this.nota = nota;
@@ -6509,7 +6510,6 @@
6509
6510
  };
6510
6511
  FHGridComponent.prototype.calcola_filtro = function (obj_filtro, filter_v, key, add_end) {
6511
6512
  if (add_end === void 0) { add_end = true; }
6512
- console.log("obj_filtro ", obj_filtro);
6513
6513
  var b_filter = false;
6514
6514
  if (obj_filtro.type != null) {
6515
6515
  if (obj_filtro.filter != null) {
@@ -8841,6 +8841,7 @@
8841
8841
  }
8842
8842
  };
8843
8843
  FHAutoCompleteComponent.prototype.setByValue = function (desc_val) {
8844
+ var _this = this;
8844
8845
  this.valDef = desc_val;
8845
8846
  this.selval = desc_val;
8846
8847
  if (this.myData != null) {
@@ -8858,6 +8859,10 @@
8858
8859
  if (!b_found && this.only_from_list)
8859
8860
  this.resetValue(false);
8860
8861
  }
8862
+ else {
8863
+ setTimeout(function () { _this.setByValue(desc_val); }, 1000);
8864
+ return;
8865
+ }
8861
8866
  if (!this.only_from_list) {
8862
8867
  this.sItem = this.selval;
8863
8868
  }
@@ -14166,6 +14171,7 @@
14166
14171
  this.b_edit_before = this.b_edit;
14167
14172
  this.edit_b(false);
14168
14173
  var arr = this.getfieldvalues();
14174
+ // console.log('arr',arr);
14169
14175
  var p = new QParam();
14170
14176
  p.sql = "insert_aggiuntivi";
14171
14177
  p.types = ["string", "string"];
@@ -14174,33 +14180,57 @@
14174
14180
  for (var i = 0; i < arr.length; i++) {
14175
14181
  p.types.push(arr[i].types);
14176
14182
  p.names.push(arr[i].names);
14177
- if (arr[i].values != null) {
14183
+ if (arr[i].values == null) {
14184
+ console.log('NULL', arr[i].names, arr[i].values);
14185
+ arr[i].values = "dbnull";
14186
+ }
14187
+ else {
14188
+ console.log('NO NULL', arr[i].names, arr[i].values);
14178
14189
  if (arr[i].types == "boolean")
14179
14190
  if (arr[i].values)
14180
- p.values.push("1");
14191
+ arr[i].values = "1";
14181
14192
  else
14182
- p.values.push("0");
14183
- if (arr[i].types == "int")
14184
- if (isNaN(arr[i].values))
14185
- p.values.push("0");
14186
- else
14187
- p.values.push("" + arr[i].values);
14193
+ arr[i].values = "0";
14194
+ if (arr[i].types == "int") {
14195
+ if (arr[i].values + "" == "")
14196
+ arr[i].values = "dbnull";
14197
+ else {
14198
+ if (isNaN(arr[i].values))
14199
+ arr[i].values = "0";
14200
+ else
14201
+ arr[i].values = "" + arr[i].values;
14202
+ }
14203
+ }
14188
14204
  if (arr[i].types == "string")
14189
- p.values.push("" + arr[i].values);
14190
- if (arr[i].types == "date")
14191
- p.values.push(this.uti_s.sql_date(arr[i].values));
14192
- if (arr[i].types == "datetime")
14193
- p.values.push(this.uti_s.sql_date_time(arr[i].values));
14194
- if (arr[i].types == "decimal")
14195
- if (isNaN(arr[i].values))
14196
- p.values.push("0");
14197
- else
14198
- p.values.push("" + arr[i].values);
14199
- }
14200
- else {
14201
- p.values.push("dbnull");
14205
+ arr[i].values = "" + arr[i].values;
14206
+ if (arr[i].types == "date") {
14207
+ arr[i].values = this.uti_s.sql_date(arr[i].values);
14208
+ if (arr[i].values.split("0").join("") == "NaN-NaN-NaN")
14209
+ arr[i].values = "dbnull";
14210
+ }
14211
+ if (arr[i].types == "datetime") {
14212
+ console.log('typeof ', typeof (arr[i].values), arr[i].values);
14213
+ arr[i].values = this.uti_s.sql_date_time(arr[i].values);
14214
+ console.log('arr[i].values ', arr[i].values);
14215
+ if (arr[i].values.split("0").join("") == "NaN-NaN-NaN NaN:NaN")
14216
+ arr[i].values = "dbnull";
14217
+ }
14218
+ if (arr[i].types == "string" && arr[i].values == null)
14219
+ arr[i].values = "dbnull";
14220
+ if (arr[i].types == "decimal") {
14221
+ if (arr[i].values + "" == "")
14222
+ arr[i].values = "dbnull";
14223
+ else {
14224
+ if (isNaN(arr[i].values))
14225
+ arr[i].values = "0";
14226
+ else
14227
+ arr[i].values = "" + arr[i].values;
14228
+ }
14229
+ }
14202
14230
  }
14231
+ p.values.push(arr[i].values);
14203
14232
  }
14233
+ // console.log('p',p);
14204
14234
  this.m_wkf.doQuery(p).subscribe(function (data) {
14205
14235
  if (data != null)
14206
14236
  if (data.result_msg == "OK") {
@@ -14879,39 +14909,24 @@
14879
14909
  this.edit_button = false;
14880
14910
  this.respingi_button = false;
14881
14911
  this.procedi_button = true;
14912
+ this.button_clicked = new core.EventEmitter();
14882
14913
  }
14883
- wkf_header_bar.prototype.back = function () {
14884
- if (this.dt_agg != null)
14885
- this.dt_agg.back(this.edit_button);
14886
- };
14887
- wkf_header_bar.prototype.evt_salv = function () {
14888
- if (this.dt_agg != null)
14889
- this.dt_agg.evt_salv();
14890
- };
14891
- wkf_header_bar.prototype.respingi = function () {
14892
- if (this.dt_agg != null)
14893
- this.dt_agg.respingi();
14894
- };
14895
- wkf_header_bar.prototype.procedi = function () {
14896
- if (this.dt_agg != null)
14897
- this.dt_agg.procedi();
14898
- };
14899
- wkf_header_bar.prototype.open_info = function () {
14900
- if (this.dt_agg != null)
14901
- this.dt_agg.open_info();
14902
- };
14903
- wkf_header_bar.prototype.open_commenti = function () {
14904
- if (this.dt_agg != null)
14905
- this.dt_agg.open_commenti();
14906
- };
14907
- wkf_header_bar.prototype.open_upload = function () {
14908
- if (this.dt_agg != null)
14909
- this.dt_agg.open_upload();
14910
- };
14911
- wkf_header_bar.prototype.open_wkf = function () {
14912
- if (this.dt_agg != null)
14913
- this.dt_agg.open_wkf();
14914
- };
14914
+ wkf_header_bar.prototype.back = function () { this.button_clicked.emit('back'); if (this.dt_agg != null)
14915
+ this.dt_agg.back(this.edit_button); };
14916
+ wkf_header_bar.prototype.evt_salv = function () { this.button_clicked.emit('evt_salv'); if (this.dt_agg != null)
14917
+ this.dt_agg.evt_salv(); };
14918
+ wkf_header_bar.prototype.respingi = function () { this.button_clicked.emit('respingi'); if (this.dt_agg != null)
14919
+ this.dt_agg.respingi(); };
14920
+ wkf_header_bar.prototype.procedi = function () { this.button_clicked.emit('procedi'); if (this.dt_agg != null)
14921
+ this.dt_agg.procedi(); };
14922
+ wkf_header_bar.prototype.open_info = function () { this.button_clicked.emit('open_info'); if (this.dt_agg != null)
14923
+ this.dt_agg.open_info(); };
14924
+ wkf_header_bar.prototype.open_commenti = function () { this.button_clicked.emit('open_commenti'); if (this.dt_agg != null)
14925
+ this.dt_agg.open_commenti(); };
14926
+ wkf_header_bar.prototype.open_upload = function () { this.button_clicked.emit('open_upload'); if (this.dt_agg != null)
14927
+ this.dt_agg.open_upload(); };
14928
+ wkf_header_bar.prototype.open_wkf = function () { this.button_clicked.emit('open_wkf'); if (this.dt_agg != null)
14929
+ this.dt_agg.open_wkf(); };
14915
14930
  wkf_header_bar.prototype.ngAfterViewInit = function () { };
14916
14931
  wkf_header_bar.ctorParameters = function () { return [
14917
14932
  { type: AppService }
@@ -14932,6 +14947,10 @@
14932
14947
  core.Input(),
14933
14948
  __metadata("design:type", Boolean)
14934
14949
  ], wkf_header_bar.prototype, "procedi_button", void 0);
14950
+ __decorate([
14951
+ core.Output(),
14952
+ __metadata("design:type", core.EventEmitter)
14953
+ ], wkf_header_bar.prototype, "button_clicked", void 0);
14935
14954
  wkf_header_bar = __decorate([
14936
14955
  core.Component({
14937
14956
  selector: "wkf_header_bar",