promoted statics on header menu #2194, crédits paysage sonor (récit) #2148

This commit is contained in:
2023-07-06 11:08:07 +02:00
parent 689d00d3de
commit 5c41bfc04a
6 changed files with 33 additions and 20 deletions

View File

@@ -20,7 +20,7 @@ export const CommonStore = defineStore({
this.hover_elmt = elmt;
},
addPaperSymbolDefinition(name, path) {
console.log(`addPaperSymbolDefinition ${name}`, path);
// console.log(`addPaperSymbolDefinition ${name}`, path);
// mode can be : terraindevie, proximite, superposition, puissancedagir, action, doleancer
this.paper_symbol_definitions[name] = new paper.SymbolDefinition(path);
}

View File

@@ -23,7 +23,7 @@ export const StaticsStore = defineStore({
console.log('statics store loadStatics');
return new Promise((resolve, reject) => {
const ast = gql`{
allstatics {
promotedstatics {
...StaticsFields
}
}
@@ -31,11 +31,11 @@ export const StaticsStore = defineStore({
`
console.log('ast', ast);
GQL.post('', { query: print(ast) })
.then(({ data : { data : { allstatics } } }) => {
console.log('loadstatics loaded', allstatics)
this.statics = allstatics
.then(({ data : { data : { promotedstatics } } }) => {
console.log('loadstatics loaded', promotedstatics)
this.statics = promotedstatics
allstatics.forEach((s) => {
promotedstatics.forEach((s) => {
// console.log("s", s);
this.statics_byid[s.id] = s
});