@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.
@@ -771,8 +771,6 @@ let QueryService = class QueryService {
771
771
  }
772
772
  if (queryp.types[i] == "string")
773
773
  queryp.values[i] = "" + queryp.values[i];
774
- if (queryp.types[i] == "date")
775
- queryp.values[i] = this.uti_s.sql_date(queryp.values[i]);
776
774
  if (queryp.types[i] == "date") {
777
775
  queryp.values[i] = this.uti_s.sql_date(queryp.values[i]);
778
776
  if (queryp.values[i].split("0").join("") == "NaN-NaN-NaN")
@@ -1818,6 +1816,7 @@ let FHUploadS3Component = class FHUploadS3Component {
1818
1816
  maxFileSize: 500 * 1024 * 1024,
1819
1817
  });
1820
1818
  this.id_component = '';
1819
+ this.last_result = {};
1821
1820
  this.id = null;
1822
1821
  this.p_cod_doc = "";
1823
1822
  this.p_section = "";
@@ -1836,12 +1835,13 @@ let FHUploadS3Component = class FHUploadS3Component {
1836
1835
  progressBar: true,
1837
1836
  });
1838
1837
  this.ref_allegato();
1839
- this.change.emit({
1838
+ this.last_result = {
1840
1839
  item: item,
1841
1840
  response: response,
1842
1841
  status: status,
1843
- header: header,
1844
- });
1842
+ header: header
1843
+ };
1844
+ this.change.emit(this.last_result);
1845
1845
  }
1846
1846
  };
1847
1847
  }
@@ -1914,7 +1914,7 @@ let FHUploadS3Component = class FHUploadS3Component {
1914
1914
  this.uploader.setOptions(uo);
1915
1915
  this.uploader.onCompleteAll = () => {
1916
1916
  this.loading = false;
1917
- this.upload_ended.emit();
1917
+ this.upload_ended.emit(this.last_result);
1918
1918
  if (this.dialogRef != null)
1919
1919
  if (this.dialogRef.componentInstance != null) {
1920
1920
  this.dialogRef.componentInstance.update_progess(100);
@@ -2271,7 +2271,7 @@ let FHWinComboSelect = class FHWinComboSelect {
2271
2271
  }
2272
2272
  set_selection(lab, myD, nota = false) {
2273
2273
  if (this.cmb_sel == null) {
2274
- this.set_selection(lab, myD, nota);
2274
+ setTimeout(() => { this.set_selection(lab, myD, nota); }, 500);
2275
2275
  return;
2276
2276
  }
2277
2277
  this.nota = nota;
@@ -7946,7 +7946,6 @@ let FHGridComponent = class FHGridComponent {
7946
7946
  });
7947
7947
  }
7948
7948
  calcola_filtro(obj_filtro, filter_v, key, add_end = true) {
7949
- console.log("obj_filtro ", obj_filtro);
7950
7949
  let b_filter = false;
7951
7950
  if (obj_filtro.type != null) {
7952
7951
  if (obj_filtro.filter != null) {
@@ -10484,6 +10483,10 @@ let FHAutoCompleteComponent = class FHAutoCompleteComponent {
10484
10483
  if (!b_found && this.only_from_list)
10485
10484
  this.resetValue(false);
10486
10485
  }
10486
+ else {
10487
+ setTimeout(() => { this.setByValue(desc_val); }, 1000);
10488
+ return;
10489
+ }
10487
10490
  if (!this.only_from_list) {
10488
10491
  this.sItem = this.selval;
10489
10492
  }
@@ -16984,6 +16987,7 @@ class dati_aggiuntivi {
16984
16987
  this.b_edit_before = this.b_edit;
16985
16988
  this.edit_b(false);
16986
16989
  let arr = this.getfieldvalues();
16990
+ // console.log('arr',arr);
16987
16991
  let p = new QParam();
16988
16992
  p.sql = "insert_aggiuntivi";
16989
16993
  p.types = ["string", "string"];
@@ -16992,33 +16996,57 @@ class dati_aggiuntivi {
16992
16996
  for (let i = 0; i < arr.length; i++) {
16993
16997
  p.types.push(arr[i].types);
16994
16998
  p.names.push(arr[i].names);
16995
- if (arr[i].values != null) {
16999
+ if (arr[i].values == null) {
17000
+ console.log('NULL', arr[i].names, arr[i].values);
17001
+ arr[i].values = "dbnull";
17002
+ }
17003
+ else {
17004
+ console.log('NO NULL', arr[i].names, arr[i].values);
16996
17005
  if (arr[i].types == "boolean")
16997
17006
  if (arr[i].values)
16998
- p.values.push("1");
17007
+ arr[i].values = "1";
16999
17008
  else
17000
- p.values.push("0");
17001
- if (arr[i].types == "int")
17002
- if (isNaN(arr[i].values))
17003
- p.values.push("0");
17004
- else
17005
- p.values.push("" + arr[i].values);
17009
+ arr[i].values = "0";
17010
+ if (arr[i].types == "int") {
17011
+ if (arr[i].values + "" == "")
17012
+ arr[i].values = "dbnull";
17013
+ else {
17014
+ if (isNaN(arr[i].values))
17015
+ arr[i].values = "0";
17016
+ else
17017
+ arr[i].values = "" + arr[i].values;
17018
+ }
17019
+ }
17006
17020
  if (arr[i].types == "string")
17007
- p.values.push("" + arr[i].values);
17008
- if (arr[i].types == "date")
17009
- p.values.push(this.uti_s.sql_date(arr[i].values));
17010
- if (arr[i].types == "datetime")
17011
- p.values.push(this.uti_s.sql_date_time(arr[i].values));
17012
- if (arr[i].types == "decimal")
17013
- if (isNaN(arr[i].values))
17014
- p.values.push("0");
17015
- else
17016
- p.values.push("" + arr[i].values);
17017
- }
17018
- else {
17019
- p.values.push("dbnull");
17021
+ arr[i].values = "" + arr[i].values;
17022
+ if (arr[i].types == "date") {
17023
+ arr[i].values = this.uti_s.sql_date(arr[i].values);
17024
+ if (arr[i].values.split("0").join("") == "NaN-NaN-NaN")
17025
+ arr[i].values = "dbnull";
17026
+ }
17027
+ if (arr[i].types == "datetime") {
17028
+ console.log('typeof ', typeof (arr[i].values), arr[i].values);
17029
+ arr[i].values = this.uti_s.sql_date_time(arr[i].values);
17030
+ console.log('arr[i].values ', arr[i].values);
17031
+ if (arr[i].values.split("0").join("") == "NaN-NaN-NaN NaN:NaN")
17032
+ arr[i].values = "dbnull";
17033
+ }
17034
+ if (arr[i].types == "string" && arr[i].values == null)
17035
+ arr[i].values = "dbnull";
17036
+ if (arr[i].types == "decimal") {
17037
+ if (arr[i].values + "" == "")
17038
+ arr[i].values = "dbnull";
17039
+ else {
17040
+ if (isNaN(arr[i].values))
17041
+ arr[i].values = "0";
17042
+ else
17043
+ arr[i].values = "" + arr[i].values;
17044
+ }
17045
+ }
17020
17046
  }
17047
+ p.values.push(arr[i].values);
17021
17048
  }
17049
+ // console.log('p',p);
17022
17050
  this.m_wkf.doQuery(p).subscribe((data) => {
17023
17051
  if (data != null)
17024
17052
  if (data.result_msg == "OK") {
@@ -17685,39 +17713,24 @@ let wkf_header_bar = class wkf_header_bar {
17685
17713
  this.edit_button = false;
17686
17714
  this.respingi_button = false;
17687
17715
  this.procedi_button = true;
17688
- }
17689
- back() {
17690
- if (this.dt_agg != null)
17691
- this.dt_agg.back(this.edit_button);
17692
- }
17693
- evt_salv() {
17694
- if (this.dt_agg != null)
17695
- this.dt_agg.evt_salv();
17696
- }
17697
- respingi() {
17698
- if (this.dt_agg != null)
17699
- this.dt_agg.respingi();
17700
- }
17701
- procedi() {
17702
- if (this.dt_agg != null)
17703
- this.dt_agg.procedi();
17704
- }
17705
- open_info() {
17706
- if (this.dt_agg != null)
17707
- this.dt_agg.open_info();
17708
- }
17709
- open_commenti() {
17710
- if (this.dt_agg != null)
17711
- this.dt_agg.open_commenti();
17712
- }
17713
- open_upload() {
17714
- if (this.dt_agg != null)
17715
- this.dt_agg.open_upload();
17716
- }
17717
- open_wkf() {
17718
- if (this.dt_agg != null)
17719
- this.dt_agg.open_wkf();
17720
- }
17716
+ this.button_clicked = new EventEmitter();
17717
+ }
17718
+ back() { this.button_clicked.emit('back'); if (this.dt_agg != null)
17719
+ this.dt_agg.back(this.edit_button); }
17720
+ evt_salv() { this.button_clicked.emit('evt_salv'); if (this.dt_agg != null)
17721
+ this.dt_agg.evt_salv(); }
17722
+ respingi() { this.button_clicked.emit('respingi'); if (this.dt_agg != null)
17723
+ this.dt_agg.respingi(); }
17724
+ procedi() { this.button_clicked.emit('procedi'); if (this.dt_agg != null)
17725
+ this.dt_agg.procedi(); }
17726
+ open_info() { this.button_clicked.emit('open_info'); if (this.dt_agg != null)
17727
+ this.dt_agg.open_info(); }
17728
+ open_commenti() { this.button_clicked.emit('open_commenti'); if (this.dt_agg != null)
17729
+ this.dt_agg.open_commenti(); }
17730
+ open_upload() { this.button_clicked.emit('open_upload'); if (this.dt_agg != null)
17731
+ this.dt_agg.open_upload(); }
17732
+ open_wkf() { this.button_clicked.emit('open_wkf'); if (this.dt_agg != null)
17733
+ this.dt_agg.open_wkf(); }
17721
17734
  ngAfterViewInit() { }
17722
17735
  };
17723
17736
  wkf_header_bar.ctorParameters = () => [
@@ -17739,6 +17752,10 @@ __decorate([
17739
17752
  Input(),
17740
17753
  __metadata("design:type", Boolean)
17741
17754
  ], wkf_header_bar.prototype, "procedi_button", void 0);
17755
+ __decorate([
17756
+ Output(),
17757
+ __metadata("design:type", EventEmitter)
17758
+ ], wkf_header_bar.prototype, "button_clicked", void 0);
17742
17759
  wkf_header_bar = __decorate([
17743
17760
  Component({
17744
17761
  selector: "wkf_header_bar",