@fluxhub/fluxhub-lib 11.0.36 → 11.0.37

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.
@@ -6482,31 +6482,34 @@ class FHGridComponent {
6482
6482
  }
6483
6483
  // console.log('Filter model');
6484
6484
  //console.log(params.filterModel);
6485
+ let b_init = false;
6485
6486
  let p_fi = p.filter;
6486
6487
  if (params.filterModel != null) {
6487
6488
  // console.log('Filtri');
6488
6489
  for (let key in params.filterModel) {
6490
+ if (!b_init) {
6491
+ if (p.filter != "")
6492
+ p.filter = p.filter + " " + this.type_fixed_filter + " ";
6493
+ }
6489
6494
  // console.log(key);
6490
6495
  // if (p.hasOwnProperty(key)) {
6491
6496
  // console.log( params.filterModel[key]);
6492
6497
  let obj_filtro_test = params.filterModel[key];
6493
6498
  console.log(params.filterModel[key], key);
6494
6499
  if (obj_filtro_test.operator == null) {
6495
- if (p.filter == "")
6496
- p.filter += this.calcola_filtro(params.filterModel[key], "", key, false);
6497
- else
6498
- p.filter += this.calcola_filtro(params.filterModel[key], "", key, true);
6500
+ p.filter += this.calcola_filtro(params.filterModel[key], "", key, false);
6499
6501
  }
6500
6502
  else {
6501
- if (p.filter != "")
6502
- p.filter += " and ";
6503
+ if (b_init)
6504
+ if (p.filter != "")
6505
+ p.filter += " and ";
6503
6506
  p.filter += " (";
6504
6507
  p.filter += this.calcola_filtro(params.filterModel[key].condition1, "", key, false);
6505
6508
  p.filter += " " + obj_filtro_test.operator + " ";
6506
6509
  p.filter += this.calcola_filtro(params.filterModel[key].condition2, "", key, false);
6507
6510
  p.filter += ")";
6508
6511
  }
6509
- // }
6512
+ b_init = true;
6510
6513
  }
6511
6514
  }
6512
6515
  p.filter = p.filter.split('{{user}}').join(this.m_appService.user);
@@ -7299,7 +7302,6 @@ class FHGridComponent {
7299
7302
  if (model != null)
7300
7303
  num_all = model.length;
7301
7304
  }
7302
- console.log('KEY!!!! ', key);
7303
7305
  if (key != 'pers_int') {
7304
7306
  if (sq != "") {
7305
7307
  if (obj_filtro.values.length != num_all) {