puissance agir hover events both ways (map <-> cartouche) are done

This commit is contained in:
2023-07-06 22:43:27 +02:00
parent 19e61bbcd7
commit 213f151557
5 changed files with 50 additions and 7 deletions

View File

@@ -238,6 +238,26 @@ export const ConcernementsStore = defineStore({
},
setOpenedEntityId(id){
this.opened_entite_id = id;
},
setBesoinPaperId(paper_id, cid, bid, rid){
this.concernements.forEach((c, i) => {
if(c.id === cid){
this.concernements[i].besoins.forEach((b,j) => {
if(b.id === bid) {
if (!rid) {
this.concernements[i].besoins[j].paper_id = this.concernementsByID[cid].besoins[j].paper_id = paper_id;
} else {
this.concernements[i].besoins[j].reponses.forEach((r,k) => {
if (r.id === rid) {
this.concernements[i].besoins[j].reponses[k].paper_id = this.concernementsByID[cid].besoins[j].reponses[k].paper_id = paper_id;
}
})
}
}
})
}
})
}
}
})