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: {
|
computed: {
|
||||||
tagsStrings: {
|
tagsStrings: {
|
||||||
get() {
|
get() {
|
||||||
return this.$props.data.map((tag: ITag) => tag.title);
|
return this.$props.value.map((tag: ITag) => tag.title);
|
||||||
},
|
},
|
||||||
set(tagStrings) {
|
set(tagStrings) {
|
||||||
const tagEntities = tagStrings.map((tag) => {
|
const tagEntities = tagStrings.map((tag) => {
|
||||||
|
@ -279,6 +279,7 @@ export default class Event extends Vue {
|
|||||||
|
|
||||||
async deleteEvent() {
|
async deleteEvent() {
|
||||||
const router = this.$router;
|
const router = this.$router;
|
||||||
|
const eventTitle = this.event.title;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await this.$apollo.mutate<IParticipant>({
|
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) {
|
} catch (error) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user