@fluxhub/fluxhub-lib 11.0.38 → 11.0.39

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.
@@ -5701,15 +5701,6 @@
5701
5701
  if (params.filterModel != null) {
5702
5702
  // console.log('Filtri');
5703
5703
  for (var key in params.filterModel) {
5704
- if (!b_init) {
5705
- if (_this.include_always != '') {
5706
- p.filter = p.filter + " (" + _this.include_always + ' or ';
5707
- }
5708
- }
5709
- b_init = true;
5710
- // console.log(key);
5711
- // if (p.hasOwnProperty(key)) {
5712
- // console.log( params.filterModel[key]);
5713
5704
  var obj_filtro_test = params.filterModel[key];
5714
5705
  console.log(params.filterModel[key], key);
5715
5706
  if (obj_filtro_test.operator == null) {
@@ -5719,8 +5710,16 @@
5719
5710
  p.filter += _this.calcola_filtro(params.filterModel[key], "", key, true);
5720
5711
  }
5721
5712
  else {
5722
- if (p.filter != "")
5713
+ if (!b_init) {
5714
+ if (_this.include_always != '') {
5715
+ p.filter = p.filter + " (" + _this.include_always + ' or ';
5716
+ }
5717
+ else if (p.filter != "")
5718
+ p.filter += " and ";
5719
+ }
5720
+ else if (p.filter != "")
5723
5721
  p.filter += " and ";
5722
+ b_init = true;
5724
5723
  p.filter += " (";
5725
5724
  p.filter += _this.calcola_filtro(params.filterModel[key].condition1, "", key, false);
5726
5725
  p.filter += " " + obj_filtro_test.operator + " ";