@fluxhub/fluxhub-lib 11.0.37 → 11.0.38

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.
@@ -5627,7 +5627,9 @@
5627
5627
  this.curr_config = "-1";
5628
5628
  this.init_end = new i0.EventEmitter();
5629
5629
  this.off_set = 0;
5630
- this.type_fixed_filter = 'and';
5630
+ this.include_always = '';
5631
+ this.first_ref = true;
5632
+ this.b_restored = false;
5631
5633
  this.str_curr_q_p = "";
5632
5634
  this.dataSource = {
5633
5635
  //rowCount: ???, - not setting the row count, infinite paging will be used
@@ -5683,49 +5685,57 @@
5683
5685
  p.filter = _this.filters;
5684
5686
  if (_this.fix_flt != "") {
5685
5687
  if (p.filter != "")
5686
- p.filter = p.filter + " " + _this.type_fixed_filter + " ";
5687
- console.log("🚀 ~ file: fhgrid.ts ~ line 737 ~ FHGridComponent ~ type_fixed_filter", _this.type_fixed_filter);
5688
+ p.filter = p.filter + " and ";
5688
5689
  p.filter = p.filter + " (" + _this.fix_flt + " )";
5689
5690
  }
5690
5691
  if (_this.ric_libera == '' || !_this.over_fulltext)
5691
5692
  if (_this.fix_flt_temp != "") {
5692
5693
  if (p.filter != "")
5693
- p.filter = p.filter + " " + _this.type_fixed_filter + " ";
5694
- console.log("🚀 ~ file: fhgrid.ts ~ line 743 ~ FHGridComponent ~ this.type_fixed_filter", _this.type_fixed_filter);
5694
+ p.filter = p.filter + " and ";
5695
5695
  p.filter = p.filter + " (" + _this.fix_flt_temp + " )";
5696
5696
  }
5697
5697
  // console.log('Filter model');
5698
5698
  //console.log(params.filterModel);
5699
- var b_init = false;
5700
5699
  var p_fi = p.filter;
5700
+ var b_init = false;
5701
5701
  if (params.filterModel != null) {
5702
5702
  // console.log('Filtri');
5703
5703
  for (var key in params.filterModel) {
5704
5704
  if (!b_init) {
5705
- if (p.filter != "")
5706
- p.filter = p.filter + " " + _this.type_fixed_filter + " ";
5705
+ if (_this.include_always != '') {
5706
+ p.filter = p.filter + " (" + _this.include_always + ' or ';
5707
+ }
5707
5708
  }
5709
+ b_init = true;
5708
5710
  // console.log(key);
5709
5711
  // if (p.hasOwnProperty(key)) {
5710
5712
  // console.log( params.filterModel[key]);
5711
5713
  var obj_filtro_test = params.filterModel[key];
5712
5714
  console.log(params.filterModel[key], key);
5713
5715
  if (obj_filtro_test.operator == null) {
5714
- p.filter += _this.calcola_filtro(params.filterModel[key], "", key, false);
5716
+ if (p.filter == "")
5717
+ p.filter += _this.calcola_filtro(params.filterModel[key], "", key, false);
5718
+ else
5719
+ p.filter += _this.calcola_filtro(params.filterModel[key], "", key, true);
5715
5720
  }
5716
5721
  else {
5717
- if (b_init)
5718
- if (p.filter != "")
5719
- p.filter += " and ";
5722
+ if (p.filter != "")
5723
+ p.filter += " and ";
5720
5724
  p.filter += " (";
5721
5725
  p.filter += _this.calcola_filtro(params.filterModel[key].condition1, "", key, false);
5722
5726
  p.filter += " " + obj_filtro_test.operator + " ";
5723
5727
  p.filter += _this.calcola_filtro(params.filterModel[key].condition2, "", key, false);
5724
5728
  p.filter += ")";
5725
5729
  }
5726
- b_init = true;
5730
+ // }
5727
5731
  }
5728
5732
  }
5733
+ if (b_init) {
5734
+ if (_this.include_always != '') {
5735
+ p.filter = p.filter + " )";
5736
+ }
5737
+ }
5738
+ b_init = true;
5729
5739
  p.filter = p.filter.split('{{user}}').join(_this.m_appService.user);
5730
5740
  if (_this.ric_libera != '')
5731
5741
  _this.last_riclib = true;
@@ -6521,6 +6531,7 @@
6521
6531
  if (model_1 != null)
6522
6532
  num_all = model_1.length;
6523
6533
  }
6534
+ console.log('KEY!!!! ', key);
6524
6535
  if (key != 'pers_int') {
6525
6536
  if (sq != "") {
6526
6537
  if (obj_filtro.values.length != num_all) {
@@ -6901,8 +6912,8 @@
6901
6912
  }
6902
6913
  }
6903
6914
  this.res_columns();
6904
- // if (localStorage.getItem(this.grid_key + "_POS") != null)
6905
- // this.b_restored = true;
6915
+ if (localStorage.getItem(this.grid_key + "_POS") != null)
6916
+ this.b_restored = true;
6906
6917
  if (localStorage.getItem(this.grid_key + "_FILTER_UP") != null)
6907
6918
  if (localStorage.getItem(this.grid_key + "_FILTER_UP") != "") {
6908
6919
  this.ric_libera = localStorage.getItem(this.grid_key + "_FILTER_UP");
@@ -7470,7 +7481,7 @@
7470
7481
  toggle_mantieni: [{ type: i0.ViewChild, args: ["toggle_mantieni",] }],
7471
7482
  init_end: [{ type: i0.Output }],
7472
7483
  off_set: [{ type: i0.Input }],
7473
- type_fixed_filter: [{ type: i0.Input }],
7484
+ include_always: [{ type: i0.Input }],
7474
7485
  onResize: [{ type: i0.HostListener, args: ["window:resize", ["event"],] }]
7475
7486
  };
7476
7487