From ebfe33789cca7324972b1fa6cf9faedc5e4c8716 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Sun, 13 Oct 2019 14:00:40 +0200 Subject: [PATCH] Make sure number of available places gets updated when participation status changes Signed-off-by: Thomas Citharel --- js/src/views/Event/Event.vue | 2 ++ 1 file changed, 2 insertions(+) diff --git a/js/src/views/Event/Event.vue b/js/src/views/Event/Event.vue index 077f33266..040e2cf83 100644 --- a/js/src/views/Event/Event.vue +++ b/js/src/views/Event/Event.vue @@ -389,6 +389,7 @@ export default class Event extends EventMixin { event.participantStats.unapproved = event.participantStats.unapproved + 1; } else { event.participantStats.approved = event.participantStats.approved + 1; + event.participantStats.participants = event.participantStats.participants + 1; } store.writeQuery({ query: FETCH_EVENT, variables: { uuid: this.uuid }, data: { event } }); @@ -459,6 +460,7 @@ export default class Event extends EventMixin { event.participantStats.unapproved = event.participantStats.unapproved - 1; } else { event.participantStats.approved = event.participantStats.approved - 1; + event.participantStats.participants = event.participantStats.participants - 1; } store.writeQuery({ query: FETCH_EVENT, variables: { uuid: this.uuid }, data: { event } }); },