hidden entite points are displayed without being accessible #2151 #2188

This commit is contained in:
2023-07-13 09:34:49 +02:00
parent 9e523af2ff
commit 7ef77fd71e
3 changed files with 24 additions and 11 deletions

View File

@@ -56,7 +56,7 @@ export const ConcernementsStore = defineStore({
// console.log('ast', ast);
GQL.post('', { query: print(ast) })
.then(({ data : { data : { allconcernements } } }) => {
console.log('loadconcernements loaded', allconcernements)
console.log('loadconcernements all loaded', allconcernements)
this.concernements = [];
// parse concernements
allconcernements.forEach(concernement => {
@@ -65,9 +65,9 @@ export const ConcernementsStore = defineStore({
concernement.entites_byid = {};
concernement.entitesagissantes_byid = {};
concernement.has_agissantes = false;
var entites_temp = concernement.entites; // record a temp entites liste
concernement.entites = []; // erase the concernement.entite array as we want to keep only visible entites
entites_temp.forEach(entite => {
// var entites_temp = concernement.entites; // record a temp entites liste
// concernement.entites = []; // erase the concernement.entite array as we want to keep only visible entites
concernement.entites.forEach(entite => {
if (entite.entite) { // entite.entite may be null because of workflow confidentiality
concernement.entites_byid[entite.entite.id] = entite;
// record entite agissante
@@ -77,7 +77,7 @@ export const ConcernementsStore = defineStore({
}
// record a flat list of all entités of all concernement for map-popup
this.allEntitesById[entite.entite.id] = entite;
concernement.entites.push(entite); // fill the entites array with visible entite only
// concernement.entites.push(entite); // fill the entites array with visible entite only
}
});