1
0
Fork 0
mirror of https://framagit.org/framasoft/mobilizon.git synced 2024-12-22 07:52:43 +00:00

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);
}