@arsedizioni/ars-utils 18.2.281 → 18.2.283

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.
@@ -1692,8 +1692,11 @@ class ClipperUtils {
1692
1692
  sortOptions.push(options[4]);
1693
1693
  }
1694
1694
  if (modules) {
1695
- if ((modules.length === 2 && modules.filter(x => x.value === ClipperModule.NormativaVigente || x.value === ClipperModule.GazzetteBollettiniEFontiDiverse).length === 2)
1696
- || (modules.length === 1 && modules[0].value === ClipperModule.NormativaVigente)) {
1695
+ if ((modules.length <= 3 && modules.filter(x => x.value !== ClipperModule.NormativaVigente
1696
+ && x.value !== ClipperModule.GazzetteBollettiniEFontiDiverse
1697
+ && x.value !== ClipperModule.Giurisprudenza).length === 0)
1698
+ || (modules.length === 1 && modules[0].value === ClipperModule.NormativaVigente)
1699
+ || (modules.length === 1 && modules[0].value === ClipperModule.Giurisprudenza)) {
1697
1700
  sortOptions.push(options[0]);
1698
1701
  sortOptions.push(options[1]);
1699
1702
  sortOptions.push(options[2]);
@@ -1796,7 +1799,7 @@ class ClipperSearchUtils {
1796
1799
  params.modules?.forEach(module => {
1797
1800
  this.getModuleModels(module.value).forEach(x => newParams.models.push(x));
1798
1801
  });
1799
- if (params.modules.findIndex(module => module.value === ClipperModule.ScadenzeESegnalazioni) === -1) {
1802
+ if (params.modules?.findIndex(module => module.value === ClipperModule.ScadenzeESegnalazioni) === -1) {
1800
1803
  newParams.fromDate = params.fromDate;
1801
1804
  newParams.toDate = params.toDate;
1802
1805
  }