Fixes for event deletion and updates
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
060f6c8775
commit
bcfb142d5b
|
@ -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) => {
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue