@fluxhub/fluxhub-lib 9.0.146 → 9.0.148

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);
@@ -3208,6 +3208,7 @@
3208
3208
  this.b_edit_loaded = false;
3209
3209
  this.tipo = "";
3210
3210
  this.b_ini = false;
3211
+ this.last_result = {};
3211
3212
  this.uploader = new ng2FileUpload.FileUploader({
3212
3213
  url: this.app_s.API_ENDPOINT + this.app_s.UPLOAD_ENDPOINT,
3213
3214
  maxFileSize: 500 * 1024 * 1024,
@@ -3225,12 +3226,13 @@
3225
3226
  progressBar: true,
3226
3227
  });
3227
3228
  _this.ref_allegato();
3228
- _this.change.emit({
3229
+ _this.last_result = {
3229
3230
  item: item,
3230
3231
  response: response,
3231
3232
  status: status,
3232
- header: header,
3233
- });
3233
+ header: header
3234
+ };
3235
+ _this.change.emit(_this.last_result);
3234
3236
  }
3235
3237
  };
3236
3238
  }
@@ -3306,7 +3308,7 @@
3306
3308
  _this.uploader.setOptions(uo);
3307
3309
  _this.uploader.onCompleteAll = function () {
3308
3310
  _this.loading = false;
3309
- _this.upload_ended.emit();
3311
+ _this.upload_ended.emit(_this.last_result);
3310
3312
  if (_this.dialogRef != null)
3311
3313
  if (_this.dialogRef.componentInstance != null) {
3312
3314
  _this.dialogRef.componentInstance.update_progess(100);
@@ -6510,7 +6512,6 @@
6510
6512
  };
6511
6513
  FHGridComponent.prototype.calcola_filtro = function (obj_filtro, filter_v, key, add_end) {
6512
6514
  if (add_end === void 0) { add_end = true; }
6513
- console.log("obj_filtro ", obj_filtro);
6514
6515
  var b_filter = false;
6515
6516
  if (obj_filtro.type != null) {
6516
6517
  if (obj_filtro.filter != null) {
@@ -8842,6 +8843,7 @@
8842
8843
  }
8843
8844
  };
8844
8845
  FHAutoCompleteComponent.prototype.setByValue = function (desc_val) {
8846
+ var _this = this;
8845
8847
  this.valDef = desc_val;
8846
8848
  this.selval = desc_val;
8847
8849
  if (this.myData != null) {
@@ -8859,6 +8861,10 @@
8859
8861
  if (!b_found && this.only_from_list)
8860
8862
  this.resetValue(false);
8861
8863
  }
8864
+ else {
8865
+ setTimeout(function () { _this.setByValue(desc_val); }, 1000);
8866
+ return;
8867
+ }
8862
8868
  if (!this.only_from_list) {
8863
8869
  this.sItem = this.selval;
8864
8870
  }
@@ -14167,6 +14173,7 @@
14167
14173
  this.b_edit_before = this.b_edit;
14168
14174
  this.edit_b(false);
14169
14175
  var arr = this.getfieldvalues();
14176
+ // console.log('arr',arr);
14170
14177
  var p = new QParam();
14171
14178
  p.sql = "insert_aggiuntivi";
14172
14179
  p.types = ["string", "string"];
@@ -14175,33 +14182,57 @@
14175
14182
  for (var i = 0; i < arr.length; i++) {
14176
14183
  p.types.push(arr[i].types);
14177
14184
  p.names.push(arr[i].names);
14178
- if (arr[i].values != null) {
14185
+ if (arr[i].values == null) {
14186
+ console.log('NULL', arr[i].names, arr[i].values);
14187
+ arr[i].values = "dbnull";
14188
+ }
14189
+ else {
14190
+ console.log('NO NULL', arr[i].names, arr[i].values);
14179
14191
  if (arr[i].types == "boolean")
14180
14192
  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");
14193
+ arr[i].values = "1";
14187
14194
  else
14188
- p.values.push("" + arr[i].values);
14195
+ arr[i].values = "0";
14196
+ if (arr[i].types == "int") {
14197
+ if (arr[i].values + "" == "")
14198
+ arr[i].values = "dbnull";
14199
+ else {
14200
+ if (isNaN(arr[i].values))
14201
+ arr[i].values = "0";
14202
+ else
14203
+ arr[i].values = "" + arr[i].values;
14204
+ }
14205
+ }
14189
14206
  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");
14207
+ arr[i].values = "" + arr[i].values;
14208
+ if (arr[i].types == "date") {
14209
+ arr[i].values = this.uti_s.sql_date(arr[i].values);
14210
+ if (arr[i].values.split("0").join("") == "NaN-NaN-NaN")
14211
+ arr[i].values = "dbnull";
14212
+ }
14213
+ if (arr[i].types == "datetime") {
14214
+ console.log('typeof ', typeof (arr[i].values), arr[i].values);
14215
+ arr[i].values = this.uti_s.sql_date_time(arr[i].values);
14216
+ console.log('arr[i].values ', arr[i].values);
14217
+ if (arr[i].values.split("0").join("") == "NaN-NaN-NaN NaN:NaN")
14218
+ arr[i].values = "dbnull";
14219
+ }
14220
+ if (arr[i].types == "string" && arr[i].values == null)
14221
+ arr[i].values = "dbnull";
14222
+ if (arr[i].types == "decimal") {
14223
+ if (arr[i].values + "" == "")
14224
+ arr[i].values = "dbnull";
14225
+ else {
14226
+ if (isNaN(arr[i].values))
14227
+ arr[i].values = "0";
14228
+ else
14229
+ arr[i].values = "" + arr[i].values;
14230
+ }
14231
+ }
14203
14232
  }
14233
+ p.values.push(arr[i].values);
14204
14234
  }
14235
+ // console.log('p',p);
14205
14236
  this.m_wkf.doQuery(p).subscribe(function (data) {
14206
14237
  if (data != null)
14207
14238
  if (data.result_msg == "OK") {
@@ -14880,39 +14911,24 @@
14880
14911
  this.edit_button = false;
14881
14912
  this.respingi_button = false;
14882
14913
  this.procedi_button = true;
14914
+ this.button_clicked = new core.EventEmitter();
14883
14915
  }
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
- };
14916
+ wkf_header_bar.prototype.back = function () { this.button_clicked.emit('back'); if (this.dt_agg != null)
14917
+ this.dt_agg.back(this.edit_button); };
14918
+ wkf_header_bar.prototype.evt_salv = function () { this.button_clicked.emit('evt_salv'); if (this.dt_agg != null)
14919
+ this.dt_agg.evt_salv(); };
14920
+ wkf_header_bar.prototype.respingi = function () { this.button_clicked.emit('respingi'); if (this.dt_agg != null)
14921
+ this.dt_agg.respingi(); };
14922
+ wkf_header_bar.prototype.procedi = function () { this.button_clicked.emit('procedi'); if (this.dt_agg != null)
14923
+ this.dt_agg.procedi(); };
14924
+ wkf_header_bar.prototype.open_info = function () { this.button_clicked.emit('open_info'); if (this.dt_agg != null)
14925
+ this.dt_agg.open_info(); };
14926
+ wkf_header_bar.prototype.open_commenti = function () { this.button_clicked.emit('open_commenti'); if (this.dt_agg != null)
14927
+ this.dt_agg.open_commenti(); };
14928
+ wkf_header_bar.prototype.open_upload = function () { this.button_clicked.emit('open_upload'); if (this.dt_agg != null)
14929
+ this.dt_agg.open_upload(); };
14930
+ wkf_header_bar.prototype.open_wkf = function () { this.button_clicked.emit('open_wkf'); if (this.dt_agg != null)
14931
+ this.dt_agg.open_wkf(); };
14916
14932
  wkf_header_bar.prototype.ngAfterViewInit = function () { };
14917
14933
  wkf_header_bar.ctorParameters = function () { return [
14918
14934
  { type: AppService }
@@ -14933,6 +14949,10 @@
14933
14949
  core.Input(),
14934
14950
  __metadata("design:type", Boolean)
14935
14951
  ], wkf_header_bar.prototype, "procedi_button", void 0);
14952
+ __decorate([
14953
+ core.Output(),
14954
+ __metadata("design:type", core.EventEmitter)
14955
+ ], wkf_header_bar.prototype, "button_clicked", void 0);
14936
14956
  wkf_header_bar = __decorate([
14937
14957
  core.Component({
14938
14958
  selector: "wkf_header_bar",