From bcfb142d5ba0bfbcca55cd2b1a1271d3d6a81c89 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Thu, 5 Sep 2019 14:55:20 +0200 Subject: [PATCH] Fixes for event deletion and updates Signed-off-by: Thomas Citharel --- js/src/components/Event/TagInput.vue | 2 +- js/src/views/Event/Event.vue | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/js/src/components/Event/TagInput.vue b/js/src/components/Event/TagInput.vue index 385f4d38f..30c5326ef 100644 --- a/js/src/components/Event/TagInput.vue +++ b/js/src/components/Event/TagInput.vue @@ -22,7 +22,7 @@ import { ITag } from '@/types/tag.model'; computed: { tagsStrings: { get() { - return this.$props.data.map((tag: ITag) => tag.title); + return this.$props.value.map((tag: ITag) => tag.title); }, set(tagStrings) { const tagEntities = tagStrings.map((tag) => { diff --git a/js/src/views/Event/Event.vue b/js/src/views/Event/Event.vue index 15589877e..5467b6ba5 100644 --- a/js/src/views/Event/Event.vue +++ b/js/src/views/Event/Event.vue @@ -279,6 +279,7 @@ export default class Event extends Vue { async deleteEvent() { const router = this.$router; + const eventTitle = this.event.title; try { await this.$apollo.mutate({ @@ -289,7 +290,13 @@ export default class Event extends Vue { }, }); - await router.push({ name: RouteName.EVENT }); + await router.push({ name: RouteName.HOME }); + this.$buefy.notification.open({ + message: this.$gettextInterpolate('Event %{eventTitle} deleted', { eventTitle }), + type: 'is-success', + position: 'is-bottom-right', + duration: 5000, + }); } catch (error) { console.error(error); }