fix gql cache probleme for getUserEntites
This commit is contained in:
parent
f683978b7c
commit
9a7db9d7d2
@ -215,6 +215,8 @@ export default {
|
||||
'reloadConcernementEntites',
|
||||
'reloadProximites'
|
||||
]),
|
||||
...mapActions(UserStore, ['getUserEntitees']),
|
||||
|
||||
onClickInfos(){
|
||||
this.infos_opened = !this.infos_opened;
|
||||
},
|
||||
@ -269,11 +271,22 @@ export default {
|
||||
this.recordConcernementEntiteField(parag)
|
||||
.then((concernement) => {
|
||||
console.log('concernement', concernement);
|
||||
// TODO reload the map item
|
||||
// reload the map item
|
||||
this.reloadConcernementEntites(concernement.nid[0].value)
|
||||
.then(() => {
|
||||
this.reloading_concernements = false;
|
||||
});
|
||||
|
||||
// TODO reset the user entites liste caching
|
||||
|
||||
// this.getUserEntitees()
|
||||
// .then(() => {
|
||||
// console.log('added entite, user entites reloaded');
|
||||
// })
|
||||
// .catch(error => {
|
||||
// console.warn('Issue with graphql userentites loading', error);
|
||||
// })
|
||||
|
||||
// this.reloadConcernements()
|
||||
// .then(() => {
|
||||
// this.reloading_concernements = false;
|
||||
@ -524,7 +537,8 @@ export default {
|
||||
bundle: 'entite',
|
||||
id: this.entite.id,
|
||||
field: {field_name: 'title', value:'value'}
|
||||
}" />
|
||||
}"
|
||||
v-on:updated="reloadConcernementEntites(cid)"/>
|
||||
|
||||
<!-- proximité -->
|
||||
<section
|
||||
|
@ -393,6 +393,14 @@ export const ConcernementsStore = defineStore({
|
||||
tmp_conc.revisions.push(rev);
|
||||
}
|
||||
})
|
||||
let user = UserStore();
|
||||
user.getUserEntitees()
|
||||
.then(() => {
|
||||
console.log('reloadConcernementEntites graphql userentites loaded')
|
||||
})
|
||||
.catch(error => {
|
||||
console.warn('Issue with graphql userentites loading', error);
|
||||
})
|
||||
resolve(concernement);
|
||||
})
|
||||
.catch(error => {
|
||||
|
@ -184,13 +184,13 @@ export const UserStore = defineStore({
|
||||
return new Promise((resolve, reject) => {
|
||||
const body = {
|
||||
query: `
|
||||
query UserEntites($uid: Int!){
|
||||
userentites(uid: $uid) {
|
||||
query UserEntites($uid: Int!, $time: String){
|
||||
userentites(uid: $uid, time: $time) {
|
||||
id
|
||||
title
|
||||
}
|
||||
}`,
|
||||
variables: { uid: parseInt(this.uid) }
|
||||
variables: { uid: parseInt(this.uid), time: `${Date.now()}` }
|
||||
}
|
||||
|
||||
GQL.post('', body)
|
||||
|
Loading…
x
Reference in New Issue
Block a user