Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Sort finance programs by aid type in ProjectPrograms.vue #1531

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Open
2 changes: 1 addition & 1 deletion apps/nuxt-e2e/src/program/programResultsData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export const tests: SearchResultsDataType = [
{
id: 2,
url: 'questionnaire/resultat/projet/isolation-thermique?choix-du-parcours=j-ai-un-projet&siret=83014132100034&effectif=TPE&objectifs=building',
values: ['Diagnostic SARE', 'Prêt Économies d’Énergie (PEE)', "Crédit d'Impôt Rénovation Énergétique (CIRE)", 'Prêt Vert']
values: ['Prêt Économies d’Énergie (PEE)', 'Prêt Vert', 'Prêt transition écologique Île-de-France']
},
{
id: 3,
Expand Down
6 changes: 3 additions & 3 deletions apps/nuxt/src/components/project/details/ProjectPrograms.vue
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@ const studyPrograms = computed(() => {
})

const financePrograms = computed(() => {
return filteredPrograms.value.filter((program: ProgramData) =>
[ProgramAidType.fund, ProgramAidType.loan, ProgramAidType.tax].includes(program["nature de l'aide"])
)
return filteredPrograms.value
.filter((program: ProgramData) => [ProgramAidType.fund, ProgramAidType.loan, ProgramAidType.tax].includes(program["nature de l'aide"]))
.sort((a, b) => a["nature de l'aide"].localeCompare(b["nature de l'aide"]))
})
</script>
Loading