bodies a moving well and are clickable
This commit is contained in:
@@ -11,7 +11,9 @@ import ConcernementFields from '@api/gql/concernement.fragment.gql'
|
||||
export const ConcernementsStore = defineStore({
|
||||
id: 'concernements',
|
||||
state: () => ({
|
||||
concernements: []
|
||||
concernements: [],
|
||||
concernementsByID: {},
|
||||
opened: false
|
||||
}),
|
||||
getters: {
|
||||
|
||||
@@ -32,12 +34,19 @@ export const ConcernementsStore = defineStore({
|
||||
.then(({ data : { data : { allconcernements } } }) => {
|
||||
console.log('loadconcernements loaded', allconcernements)
|
||||
this.concernements = allconcernements
|
||||
allconcernements.forEach(concernement => {
|
||||
this.concernementsByID[concernement.id] = concernement
|
||||
});
|
||||
})
|
||||
.catch(error => {
|
||||
console.warn('Issue with loadConcernements', error)
|
||||
Promise.reject(error)
|
||||
})
|
||||
})
|
||||
},
|
||||
openCloseConcernement (id, state) {
|
||||
console.log('openCloseConcernement', id, state);
|
||||
this.concernementsByID[id].opened = state;
|
||||
}
|
||||
}
|
||||
})
|
Reference in New Issue
Block a user