puissance d'agir almost ok

This commit is contained in:
2023-06-01 17:01:15 +02:00
parent a324ffc806
commit 6d91dcc86d
7 changed files with 170 additions and 27 deletions

View File

@@ -20,6 +20,7 @@ export const ConcernementsStore = defineStore({
concernements: [],
concernementsByID: {},
allEntitesById: {},
allBesoinsById: {},
opened: false,
opened_entite_id: null,
ct_concernement: {},
@@ -70,8 +71,12 @@ export const ConcernementsStore = defineStore({
concernement.entites.push(entite); // fill the entites array with visible entite only
}
});
// puissance d'agir
concernement.has_puissancedagir = concernement.besoins.length ? true : false;
concernement.besoins.forEach(besoin => {
this.allBesoinsById[besoin.id] = besoin;
});
// common
this.concernements.push(concernement);