Multiples fixes

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2020-06-15 18:12:49 +02:00
parent c3ba3b26d8
commit 918dc6f10b
14 changed files with 108 additions and 85 deletions

View File

@@ -592,7 +592,7 @@ import PopoverActorCard from "../../components/Account/PopoverActorCard.vue";
},
},
update: (data) => {
if (data && data.person) return data.person.participations;
if (data && data.person) return data.person.participations.elements;
return [];
},
skip() {
@@ -809,7 +809,8 @@ export default class Event extends EventMixin {
console.error("Cannot update participation cache, because of null value.");
return;
}
person.participations.push(data.joinEvent);
person.participations.elements.push(data.joinEvent);
person.participations.total += 1;
store.writeQuery({
query: EVENT_PERSON_PARTICIPATION,
variables: { eventId: this.event.id, actorId: identity.id },