@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.
@@ -6485,48 +6485,34 @@ class FHGridComponent {
6485
6485
  let p_fi = p.filter;
6486
6486
  let b_init = false;
6487
6487
  if (params.filterModel != null) {
6488
- console.log('Filtri ', params.filterModel);
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
+ if (p.filter != "")
6494
+ p.filter += " and ";
6495
+ p.filter = p.filter + " (" + this.include_always + ' or ';
6496
+ }
6497
+ }
6490
6498
  let obj_filtro_test = params.filterModel[key];
6499
+ console.log(params.filterModel[key], key);
6491
6500
  if (obj_filtro_test.operator == null) {
6492
- if (p.filter == "")
6501
+ if (!(p.filter != "" && (b_init || this.include_always == '')))
6493
6502
  p.filter += this.calcola_filtro(params.filterModel[key], "", key, false);
6494
- else {
6495
- console.log("🚀 ~ file: fhgrid.ts ~ line 767 ~ FHGridComponent ~ b_init", b_init);
6496
- if (!b_init) {
6497
- console.log("🚀 ~ file: fhgrid.ts ~ line 770 ~ FHGridComponent ~ this.include_always", this.include_always);
6498
- if (this.include_always != '') {
6499
- p.filter = p.filter + " (" + this.include_always + ' or ';
6500
- }
6501
- else if (p.filter != "")
6502
- p.filter += " and ";
6503
- }
6504
- else if (p.filter != "")
6505
- p.filter += " and ";
6506
- b_init = true;
6503
+ else
6507
6504
  p.filter += this.calcola_filtro(params.filterModel[key], "", key, true);
6508
- }
6509
6505
  }
6510
6506
  else {
6511
- console.log("🚀 ~ file: fhgrid.ts ~ line 767 ~ FHGridComponent ~ b_init", b_init);
6512
- if (!b_init) {
6513
- console.log("🚀 ~ file: fhgrid.ts ~ line 770 ~ FHGridComponent ~ this.include_always", this.include_always);
6514
- if (this.include_always != '') {
6515
- p.filter = p.filter + " (" + this.include_always + ' or ';
6516
- }
6517
- else if (p.filter != "")
6518
- p.filter += " and ";
6519
- }
6520
- else if (p.filter != "")
6507
+ if (p.filter != "" && (b_init || this.include_always == ''))
6521
6508
  p.filter += " and ";
6522
- b_init = true;
6523
6509
  p.filter += " (";
6524
6510
  p.filter += this.calcola_filtro(params.filterModel[key].condition1, "", key, false);
6525
6511
  p.filter += " " + obj_filtro_test.operator + " ";
6526
6512
  p.filter += this.calcola_filtro(params.filterModel[key].condition2, "", key, false);
6527
6513
  p.filter += ")";
6528
6514
  }
6529
- // }
6515
+ b_init = true;
6530
6516
  }
6531
6517
  }
6532
6518
  if (b_init) {