Fixes for event deletion and updates

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2019-09-05 14:55:20 +02:00
parent 060f6c8775
commit bcfb142d5b
No known key found for this signature in database
GPG Key ID: A061B9DDE0CA0773
2 changed files with 9 additions and 2 deletions

View File

@ -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) => {

View File

@ -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<IParticipant>({
@ -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);
}