@fluxhub/fluxhub-lib 9.0.146 → 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);
@@ -6510,7 +6510,6 @@
6510
6510
  };
6511
6511
  FHGridComponent.prototype.calcola_filtro = function (obj_filtro, filter_v, key, add_end) {
6512
6512
  if (add_end === void 0) { add_end = true; }
6513
- console.log("obj_filtro ", obj_filtro);
6514
6513
  var b_filter = false;
6515
6514
  if (obj_filtro.type != null) {
6516
6515
  if (obj_filtro.filter != null) {
@@ -8842,6 +8841,7 @@
8842
8841
  }
8843
8842
  };
8844
8843
  FHAutoCompleteComponent.prototype.setByValue = function (desc_val) {
8844
+ var _this = this;
8845
8845
  this.valDef = desc_val;
8846
8846
  this.selval = desc_val;
8847
8847
  if (this.myData != null) {
@@ -8859,6 +8859,10 @@
8859
8859
  if (!b_found && this.only_from_list)
8860
8860
  this.resetValue(false);
8861
8861
  }
8862
+ else {
8863
+ setTimeout(function () { _this.setByValue(desc_val); }, 1000);
8864
+ return;
8865
+ }
8862
8866
  if (!this.only_from_list) {
8863
8867
  this.sItem = this.selval;
8864
8868
  }
@@ -14167,6 +14171,7 @@
14167
14171
  this.b_edit_before = this.b_edit;
14168
14172
  this.edit_b(false);
14169
14173
  var arr = this.getfieldvalues();
14174
+ // console.log('arr',arr);
14170
14175
  var p = new QParam();
14171
14176
  p.sql = "insert_aggiuntivi";
14172
14177
  p.types = ["string", "string"];
@@ -14175,33 +14180,57 @@
14175
14180
  for (var i = 0; i < arr.length; i++) {
14176
14181
  p.types.push(arr[i].types);
14177
14182
  p.names.push(arr[i].names);
14178
- 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);
14179
14189
  if (arr[i].types == "boolean")
14180
14190
  if (arr[i].values)
14181
- p.values.push("1");
14182
- else
14183
- p.values.push("0");
14184
- if (arr[i].types == "int")
14185
- if (isNaN(arr[i].values))
14186
- p.values.push("0");
14191
+ arr[i].values = "1";
14187
14192
  else
14188
- 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
+ }
14189
14204
  if (arr[i].types == "string")
14190
- p.values.push("" + arr[i].values);
14191
- if (arr[i].types == "date")
14192
- p.values.push(this.uti_s.sql_date(arr[i].values));
14193
- if (arr[i].types == "datetime")
14194
- p.values.push(this.uti_s.sql_date_time(arr[i].values));
14195
- if (arr[i].types == "decimal")
14196
- if (isNaN(arr[i].values))
14197
- p.values.push("0");
14198
- else
14199
- p.values.push("" + arr[i].values);
14200
- }
14201
- else {
14202
- 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
+ }
14203
14230
  }
14231
+ p.values.push(arr[i].values);
14204
14232
  }
14233
+ // console.log('p',p);
14205
14234
  this.m_wkf.doQuery(p).subscribe(function (data) {
14206
14235
  if (data != null)
14207
14236
  if (data.result_msg == "OK") {
@@ -14880,39 +14909,24 @@
14880
14909
  this.edit_button = false;
14881
14910
  this.respingi_button = false;
14882
14911
  this.procedi_button = true;
14912
+ this.button_clicked = new core.EventEmitter();
14883
14913
  }
14884
- wkf_header_bar.prototype.back = function () {
14885
- if (this.dt_agg != null)
14886
- this.dt_agg.back(this.edit_button);
14887
- };
14888
- wkf_header_bar.prototype.evt_salv = function () {
14889
- if (this.dt_agg != null)
14890
- this.dt_agg.evt_salv();
14891
- };
14892
- wkf_header_bar.prototype.respingi = function () {
14893
- if (this.dt_agg != null)
14894
- this.dt_agg.respingi();
14895
- };
14896
- wkf_header_bar.prototype.procedi = function () {
14897
- if (this.dt_agg != null)
14898
- this.dt_agg.procedi();
14899
- };
14900
- wkf_header_bar.prototype.open_info = function () {
14901
- if (this.dt_agg != null)
14902
- this.dt_agg.open_info();
14903
- };
14904
- wkf_header_bar.prototype.open_commenti = function () {
14905
- if (this.dt_agg != null)
14906
- this.dt_agg.open_commenti();
14907
- };
14908
- wkf_header_bar.prototype.open_upload = function () {
14909
- if (this.dt_agg != null)
14910
- this.dt_agg.open_upload();
14911
- };
14912
- wkf_header_bar.prototype.open_wkf = function () {
14913
- if (this.dt_agg != null)
14914
- this.dt_agg.open_wkf();
14915
- };
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(); };
14916
14930
  wkf_header_bar.prototype.ngAfterViewInit = function () { };
14917
14931
  wkf_header_bar.ctorParameters = function () { return [
14918
14932
  { type: AppService }
@@ -14933,6 +14947,10 @@
14933
14947
  core.Input(),
14934
14948
  __metadata("design:type", Boolean)
14935
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);
14936
14954
  wkf_header_bar = __decorate([
14937
14955
  core.Component({
14938
14956
  selector: "wkf_header_bar",