@fluxhub/fluxhub-lib 11.0.40 → 11.0.42

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.
@@ -5699,48 +5699,34 @@
5699
5699
  var p_fi = p.filter;
5700
5700
  var b_init = false;
5701
5701
  if (params.filterModel != null) {
5702
- console.log('Filtri ', params.filterModel);
5702
+ // console.log('Filtri');
5703
5703
  for (var key in params.filterModel) {
5704
+ if (!b_init) {
5705
+ console.log("🚀 ~ file: fhgrid.ts ~ line 770 ~ FHGridComponent ~ this.include_always", _this.include_always);
5706
+ if (_this.include_always != '') {
5707
+ if (p.filter != "")
5708
+ p.filter += " and ";
5709
+ p.filter = p.filter + " (" + _this.include_always + ' or ';
5710
+ }
5711
+ }
5704
5712
  var obj_filtro_test = params.filterModel[key];
5713
+ console.log(params.filterModel[key], key);
5705
5714
  if (obj_filtro_test.operator == null) {
5706
- if (p.filter == "")
5715
+ if (!(p.filter != "" && (b_init || _this.include_always == '')))
5707
5716
  p.filter += _this.calcola_filtro(params.filterModel[key], "", key, false);
5708
- else {
5709
- console.log("🚀 ~ file: fhgrid.ts ~ line 767 ~ FHGridComponent ~ b_init", b_init);
5710
- if (!b_init) {
5711
- console.log("🚀 ~ file: fhgrid.ts ~ line 770 ~ FHGridComponent ~ this.include_always", _this.include_always);
5712
- if (_this.include_always != '') {
5713
- p.filter = p.filter + " (" + _this.include_always + ' or ';
5714
- }
5715
- else if (p.filter != "")
5716
- p.filter += " and ";
5717
- }
5718
- else if (p.filter != "")
5719
- p.filter += " and ";
5720
- b_init = true;
5717
+ else
5721
5718
  p.filter += _this.calcola_filtro(params.filterModel[key], "", key, true);
5722
- }
5723
5719
  }
5724
5720
  else {
5725
- console.log("🚀 ~ file: fhgrid.ts ~ line 767 ~ FHGridComponent ~ b_init", b_init);
5726
- if (!b_init) {
5727
- console.log("🚀 ~ file: fhgrid.ts ~ line 770 ~ FHGridComponent ~ this.include_always", _this.include_always);
5728
- if (_this.include_always != '') {
5729
- p.filter = p.filter + " (" + _this.include_always + ' or ';
5730
- }
5731
- else if (p.filter != "")
5732
- p.filter += " and ";
5733
- }
5734
- else if (p.filter != "")
5721
+ if (p.filter != "" && (b_init || _this.include_always == ''))
5735
5722
  p.filter += " and ";
5736
- b_init = true;
5737
5723
  p.filter += " (";
5738
5724
  p.filter += _this.calcola_filtro(params.filterModel[key].condition1, "", key, false);
5739
5725
  p.filter += " " + obj_filtro_test.operator + " ";
5740
5726
  p.filter += _this.calcola_filtro(params.filterModel[key].condition2, "", key, false);
5741
5727
  p.filter += ")";
5742
5728
  }
5743
- // }
5729
+ b_init = true;
5744
5730
  }
5745
5731
  }
5746
5732
  if (b_init) {