@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.
@@ -796,8 +796,6 @@ var QueryService = /** @class */ (function () {
796
796
  }
797
797
  if (queryp.types[i] == "string")
798
798
  queryp.values[i] = "" + queryp.values[i];
799
- if (queryp.types[i] == "date")
800
- queryp.values[i] = this.uti_s.sql_date(queryp.values[i]);
801
799
  if (queryp.types[i] == "date") {
802
800
  queryp.values[i] = this.uti_s.sql_date(queryp.values[i]);
803
801
  if (queryp.values[i].split("0").join("") == "NaN-NaN-NaN")
@@ -1746,6 +1744,7 @@ var FHUploadS3Component = /** @class */ (function () {
1746
1744
  maxFileSize: 500 * 1024 * 1024,
1747
1745
  });
1748
1746
  this.id_component = '';
1747
+ this.last_result = {};
1749
1748
  this.id = null;
1750
1749
  this.p_cod_doc = "";
1751
1750
  this.p_section = "";
@@ -1764,12 +1763,13 @@ var FHUploadS3Component = /** @class */ (function () {
1764
1763
  progressBar: true,
1765
1764
  });
1766
1765
  _this.ref_allegato();
1767
- _this.change.emit({
1766
+ _this.last_result = {
1768
1767
  item: item,
1769
1768
  response: response,
1770
1769
  status: status,
1771
- header: header,
1772
- });
1770
+ header: header
1771
+ };
1772
+ _this.change.emit(_this.last_result);
1773
1773
  }
1774
1774
  };
1775
1775
  }
@@ -1845,7 +1845,7 @@ var FHUploadS3Component = /** @class */ (function () {
1845
1845
  _this.uploader.setOptions(uo);
1846
1846
  _this.uploader.onCompleteAll = function () {
1847
1847
  _this.loading = false;
1848
- _this.upload_ended.emit();
1848
+ _this.upload_ended.emit(_this.last_result);
1849
1849
  if (_this.dialogRef != null)
1850
1850
  if (_this.dialogRef.componentInstance != null) {
1851
1851
  _this.dialogRef.componentInstance.update_progess(100);
@@ -6378,7 +6378,6 @@ var FHGridComponent = /** @class */ (function () {
6378
6378
  };
6379
6379
  FHGridComponent.prototype.calcola_filtro = function (obj_filtro, filter_v, key, add_end) {
6380
6380
  if (add_end === void 0) { add_end = true; }
6381
- console.log("obj_filtro ", obj_filtro);
6382
6381
  var b_filter = false;
6383
6382
  if (obj_filtro.type != null) {
6384
6383
  if (obj_filtro.filter != null) {
@@ -8710,6 +8709,7 @@ var FHAutoCompleteComponent = /** @class */ (function () {
8710
8709
  }
8711
8710
  };
8712
8711
  FHAutoCompleteComponent.prototype.setByValue = function (desc_val) {
8712
+ var _this = this;
8713
8713
  this.valDef = desc_val;
8714
8714
  this.selval = desc_val;
8715
8715
  if (this.myData != null) {
@@ -8727,6 +8727,10 @@ var FHAutoCompleteComponent = /** @class */ (function () {
8727
8727
  if (!b_found && this.only_from_list)
8728
8728
  this.resetValue(false);
8729
8729
  }
8730
+ else {
8731
+ setTimeout(function () { _this.setByValue(desc_val); }, 1000);
8732
+ return;
8733
+ }
8730
8734
  if (!this.only_from_list) {
8731
8735
  this.sItem = this.selval;
8732
8736
  }
@@ -14035,6 +14039,7 @@ var dati_aggiuntivi = /** @class */ (function () {
14035
14039
  this.b_edit_before = this.b_edit;
14036
14040
  this.edit_b(false);
14037
14041
  var arr = this.getfieldvalues();
14042
+ // console.log('arr',arr);
14038
14043
  var p = new QParam();
14039
14044
  p.sql = "insert_aggiuntivi";
14040
14045
  p.types = ["string", "string"];
@@ -14043,33 +14048,57 @@ var dati_aggiuntivi = /** @class */ (function () {
14043
14048
  for (var i = 0; i < arr.length; i++) {
14044
14049
  p.types.push(arr[i].types);
14045
14050
  p.names.push(arr[i].names);
14046
- if (arr[i].values != null) {
14051
+ if (arr[i].values == null) {
14052
+ console.log('NULL', arr[i].names, arr[i].values);
14053
+ arr[i].values = "dbnull";
14054
+ }
14055
+ else {
14056
+ console.log('NO NULL', arr[i].names, arr[i].values);
14047
14057
  if (arr[i].types == "boolean")
14048
14058
  if (arr[i].values)
14049
- p.values.push("1");
14050
- else
14051
- p.values.push("0");
14052
- if (arr[i].types == "int")
14053
- if (isNaN(arr[i].values))
14054
- p.values.push("0");
14059
+ arr[i].values = "1";
14055
14060
  else
14056
- p.values.push("" + arr[i].values);
14061
+ arr[i].values = "0";
14062
+ if (arr[i].types == "int") {
14063
+ if (arr[i].values + "" == "")
14064
+ arr[i].values = "dbnull";
14065
+ else {
14066
+ if (isNaN(arr[i].values))
14067
+ arr[i].values = "0";
14068
+ else
14069
+ arr[i].values = "" + arr[i].values;
14070
+ }
14071
+ }
14057
14072
  if (arr[i].types == "string")
14058
- p.values.push("" + arr[i].values);
14059
- if (arr[i].types == "date")
14060
- p.values.push(this.uti_s.sql_date(arr[i].values));
14061
- if (arr[i].types == "datetime")
14062
- p.values.push(this.uti_s.sql_date_time(arr[i].values));
14063
- if (arr[i].types == "decimal")
14064
- if (isNaN(arr[i].values))
14065
- p.values.push("0");
14066
- else
14067
- p.values.push("" + arr[i].values);
14068
- }
14069
- else {
14070
- p.values.push("dbnull");
14073
+ arr[i].values = "" + arr[i].values;
14074
+ if (arr[i].types == "date") {
14075
+ arr[i].values = this.uti_s.sql_date(arr[i].values);
14076
+ if (arr[i].values.split("0").join("") == "NaN-NaN-NaN")
14077
+ arr[i].values = "dbnull";
14078
+ }
14079
+ if (arr[i].types == "datetime") {
14080
+ console.log('typeof ', typeof (arr[i].values), arr[i].values);
14081
+ arr[i].values = this.uti_s.sql_date_time(arr[i].values);
14082
+ console.log('arr[i].values ', arr[i].values);
14083
+ if (arr[i].values.split("0").join("") == "NaN-NaN-NaN NaN:NaN")
14084
+ arr[i].values = "dbnull";
14085
+ }
14086
+ if (arr[i].types == "string" && arr[i].values == null)
14087
+ arr[i].values = "dbnull";
14088
+ if (arr[i].types == "decimal") {
14089
+ if (arr[i].values + "" == "")
14090
+ arr[i].values = "dbnull";
14091
+ else {
14092
+ if (isNaN(arr[i].values))
14093
+ arr[i].values = "0";
14094
+ else
14095
+ arr[i].values = "" + arr[i].values;
14096
+ }
14097
+ }
14071
14098
  }
14099
+ p.values.push(arr[i].values);
14072
14100
  }
14101
+ // console.log('p',p);
14073
14102
  this.m_wkf.doQuery(p).subscribe(function (data) {
14074
14103
  if (data != null)
14075
14104
  if (data.result_msg == "OK") {
@@ -14748,39 +14777,24 @@ var wkf_header_bar = /** @class */ (function () {
14748
14777
  this.edit_button = false;
14749
14778
  this.respingi_button = false;
14750
14779
  this.procedi_button = true;
14780
+ this.button_clicked = new EventEmitter();
14751
14781
  }
14752
- wkf_header_bar.prototype.back = function () {
14753
- if (this.dt_agg != null)
14754
- this.dt_agg.back(this.edit_button);
14755
- };
14756
- wkf_header_bar.prototype.evt_salv = function () {
14757
- if (this.dt_agg != null)
14758
- this.dt_agg.evt_salv();
14759
- };
14760
- wkf_header_bar.prototype.respingi = function () {
14761
- if (this.dt_agg != null)
14762
- this.dt_agg.respingi();
14763
- };
14764
- wkf_header_bar.prototype.procedi = function () {
14765
- if (this.dt_agg != null)
14766
- this.dt_agg.procedi();
14767
- };
14768
- wkf_header_bar.prototype.open_info = function () {
14769
- if (this.dt_agg != null)
14770
- this.dt_agg.open_info();
14771
- };
14772
- wkf_header_bar.prototype.open_commenti = function () {
14773
- if (this.dt_agg != null)
14774
- this.dt_agg.open_commenti();
14775
- };
14776
- wkf_header_bar.prototype.open_upload = function () {
14777
- if (this.dt_agg != null)
14778
- this.dt_agg.open_upload();
14779
- };
14780
- wkf_header_bar.prototype.open_wkf = function () {
14781
- if (this.dt_agg != null)
14782
- this.dt_agg.open_wkf();
14783
- };
14782
+ wkf_header_bar.prototype.back = function () { this.button_clicked.emit('back'); if (this.dt_agg != null)
14783
+ this.dt_agg.back(this.edit_button); };
14784
+ wkf_header_bar.prototype.evt_salv = function () { this.button_clicked.emit('evt_salv'); if (this.dt_agg != null)
14785
+ this.dt_agg.evt_salv(); };
14786
+ wkf_header_bar.prototype.respingi = function () { this.button_clicked.emit('respingi'); if (this.dt_agg != null)
14787
+ this.dt_agg.respingi(); };
14788
+ wkf_header_bar.prototype.procedi = function () { this.button_clicked.emit('procedi'); if (this.dt_agg != null)
14789
+ this.dt_agg.procedi(); };
14790
+ wkf_header_bar.prototype.open_info = function () { this.button_clicked.emit('open_info'); if (this.dt_agg != null)
14791
+ this.dt_agg.open_info(); };
14792
+ wkf_header_bar.prototype.open_commenti = function () { this.button_clicked.emit('open_commenti'); if (this.dt_agg != null)
14793
+ this.dt_agg.open_commenti(); };
14794
+ wkf_header_bar.prototype.open_upload = function () { this.button_clicked.emit('open_upload'); if (this.dt_agg != null)
14795
+ this.dt_agg.open_upload(); };
14796
+ wkf_header_bar.prototype.open_wkf = function () { this.button_clicked.emit('open_wkf'); if (this.dt_agg != null)
14797
+ this.dt_agg.open_wkf(); };
14784
14798
  wkf_header_bar.prototype.ngAfterViewInit = function () { };
14785
14799
  wkf_header_bar.ctorParameters = function () { return [
14786
14800
  { type: AppService }
@@ -14801,6 +14815,10 @@ var wkf_header_bar = /** @class */ (function () {
14801
14815
  Input(),
14802
14816
  __metadata("design:type", Boolean)
14803
14817
  ], wkf_header_bar.prototype, "procedi_button", void 0);
14818
+ __decorate([
14819
+ Output(),
14820
+ __metadata("design:type", EventEmitter)
14821
+ ], wkf_header_bar.prototype, "button_clicked", void 0);
14804
14822
  wkf_header_bar = __decorate([
14805
14823
  Component({
14806
14824
  selector: "wkf_header_bar",