@fluxhub/fluxhub-lib 11.0.39 → 11.0.41

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.
@@ -6487,32 +6487,30 @@ class FHGridComponent {
6487
6487
  if (params.filterModel != null) {
6488
6488
  // console.log('Filtri');
6489
6489
  for (let key in params.filterModel) {
6490
+ if (!b_init) {
6491
+ console.log("🚀 ~ file: fhgrid.ts ~ line 770 ~ FHGridComponent ~ this.include_always", this.include_always);
6492
+ if (this.include_always != '') {
6493
+ p.filter = p.filter + " (" + this.include_always + ' or ';
6494
+ }
6495
+ }
6490
6496
  let obj_filtro_test = params.filterModel[key];
6491
6497
  console.log(params.filterModel[key], key);
6492
6498
  if (obj_filtro_test.operator == null) {
6493
- if (p.filter == "")
6499
+ if (!(p.filter != "" && (b_init || this.include_always == '')))
6494
6500
  p.filter += this.calcola_filtro(params.filterModel[key], "", key, false);
6495
6501
  else
6496
6502
  p.filter += this.calcola_filtro(params.filterModel[key], "", key, true);
6497
6503
  }
6498
6504
  else {
6499
- if (!b_init) {
6500
- if (this.include_always != '') {
6501
- p.filter = p.filter + " (" + this.include_always + ' or ';
6502
- }
6503
- else if (p.filter != "")
6504
- p.filter += " and ";
6505
- }
6506
- else if (p.filter != "")
6505
+ if (p.filter != "" && (b_init || this.include_always == ''))
6507
6506
  p.filter += " and ";
6508
- b_init = true;
6509
6507
  p.filter += " (";
6510
6508
  p.filter += this.calcola_filtro(params.filterModel[key].condition1, "", key, false);
6511
6509
  p.filter += " " + obj_filtro_test.operator + " ";
6512
6510
  p.filter += this.calcola_filtro(params.filterModel[key].condition2, "", key, false);
6513
6511
  p.filter += ")";
6514
6512
  }
6515
- // }
6513
+ b_init = true;
6516
6514
  }
6517
6515
  }
6518
6516
  if (b_init) {