Skip to content

Commit

Permalink
Merge branch 'feat/monitoraggio-caricamenti' of https://github.com/te…
Browse files Browse the repository at this point in the history
…amdigitale/monitoraggio.repubblicadigitale.gov.it into feat/monitoraggio-caricamenti

# Conflicts:
#	fe-piattaforma/src/pages/administrator/MonitoraggioCaricamenti/monitoringSearchFilters.tsx
  • Loading branch information
lcucuzzella committed Oct 30, 2024
2 parents 5bf0ebc + b70e64c commit 081ebd8
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import { useDispatch, useSelector } from 'react-redux';
import { selectEntityFiltersOptions } from '../../../redux/features/administrativeArea/administrativeAreaSlice';
import { GetAllEntityValues, GetProgettiDropdownList, GetProgrammiDropdownList } from '../../../redux/features/administrativeArea/administrativeAreaThunk';
import './monitoring.scss';
import { use } from 'i18next';

export type OptionType = {
value: string;
Expand Down Expand Up @@ -253,7 +252,7 @@ const MonitoringSearchFilters: React.FC<MonitoringSearchFilterI> = ({ formValues
}
if (name?.name === 'ente') {
retrieveProgramma(formValues.intervento.value, option.value);
retrieveProgetto(formValues.intervento.value, 0, option.value);
retrieveProgetto(formValues.intervento.value, Number(formValues.programma.value), option.value);
}
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -293,14 +293,16 @@ public List<String> findAllPolicies(
+ " OR UPPER( ente.NOME ) LIKE UPPER( :criterioRicercaLike ) ) "
+ " AND ( COALESCE(:policies) IS NULL OR programma.POLICY IN (:policies) )"
+ " AND ( COALESCE(:stati) IS NULL OR progetto.STATO IN (:stati) )"
+ " AND ( COALESCE(:idsProgrammi) IS NULL OR progetto.ID_PROGRAMMA IN (:idsProgrammi) )",
+ " AND ( COALESCE(:idsProgrammi) IS NULL OR progetto.ID_PROGRAMMA IN (:idsProgrammi) )"
+ " AND ( :idEnte IS NULL OR progetto.id_ente_gestore_progetto = :idEnte )",
nativeQuery = true)
public List<String> findAllPoliciesByProgettoFiltro(
@Param(value = "criterioRicerca") String criterioRicerca,
@Param(value = "criterioRicercaLike") String criterioRicercaLike,
@Param(value = "policies") List<String> policies,
@Param(value = "stati") List<String> stati,
@Param(value = "idsProgrammi") List<String> idsProgrammi
@Param(value = "idsProgrammi") List<String> idsProgrammi,
@Param(value = "idEnte") String idEnte
);

@Query(value = "SELECT DISTINCT programma.STATO"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,8 @@ public List<String> getAllPolicies(ProgettoFiltroRequest filtroRequest) {
"%" + filtroRequest.getCriterioRicerca() + "%",
filtroRequest.getPolicies(),
filtroRequest.getStati(),
filtroRequest.getIdsProgrammi()
filtroRequest.getIdsProgrammi(),
filtroRequest.getIdEnte()
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -857,7 +857,7 @@ public void getAllPoliciesDropdownPerProgettiDTDTest() {
when(programmaService.getAllPolicies(progettoFiltro)).thenReturn(listaPolicies);
programmaService.getAllPoliciesDropdownPerProgetti(progettiParam, progettoFiltro);
assertThat(listaPolicies.size()).isEqualTo(2);
verify(programmaRepository, atLeastOnce()).findAllPoliciesByProgettoFiltro(progettoFiltro.getCriterioRicerca(), "%" + progettoFiltro.getCriterioRicerca() + "%", progettoFiltro.getPolicies(), progettoFiltro.getStati(), progettoFiltro.getIdsProgrammi());
verify(programmaRepository, atLeastOnce()).findAllPoliciesByProgettoFiltro(progettoFiltro.getCriterioRicerca(), "%" + progettoFiltro.getCriterioRicerca() + "%", progettoFiltro.getPolicies(), progettoFiltro.getStati(), progettoFiltro.getIdsProgrammi(), progettoFiltro.getIdEnte());
}

// lista policies per DSCU con ProgettoFiltroRequest (dropdown nella tab
Expand Down Expand Up @@ -900,7 +900,7 @@ public void getAllPoliciesDropdownPerProgettiRuoliNonPredefinitiTest() {
assertThat(listaPolicies.size()).isEqualTo(2);
verify(programmaRepository, atLeastOnce()).findAllPoliciesByProgettoFiltro(progettoFiltro.getCriterioRicerca(),
"%" + progettoFiltro.getCriterioRicerca() + "%", progettoFiltro.getPolicies(),
progettoFiltro.getStati(), progettoFiltro.getIdsProgrammi());
progettoFiltro.getStati(), progettoFiltro.getIdsProgrammi(), progettoFiltro.getIdEnte());
}

// lista programmi nella dropdown (tab Progetti) per utente DTD
Expand Down

0 comments on commit 081ebd8

Please sign in to comment.