Skip to content

Commit

Permalink
Merge branch 'master' into hotfixPartage
Browse files Browse the repository at this point in the history
  • Loading branch information
lerayj committed Nov 5, 2024
2 parents 24a4a68 + 4226984 commit a720486
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pages/ddt/_departement/collectivites/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -196,12 +196,17 @@ export default {
]
},
collectivites () {
return this.referentiel?.filter(e => this.selectedCollectiviteTypesFilter.includes(e.type))
return this.referentiel?.filter((collectivite) => {
return !!this.selectedCollectiviteTypesFilter.find(type => collectivite.type.includes(type))
})
}
},
async mounted () {
const referentiel = await fetch(`/api/geo/collectivites?departements=${this.$route.params.departement}`)
const { communes, groupements } = await referentiel.json()
console.log('groupements', groupements)
const procedures = await this.$urbanisator.getCollectivitesProcedures(communes.map(c => c.code))
const enrichedCommunes = this.parseCommunes(communes, procedures)
Expand Down

0 comments on commit a720486

Please sign in to comment.