diff --git a/components/pages/events/index.vue b/components/pages/events/index.vue index a89da0e..0848d79 100644 --- a/components/pages/events/index.vue +++ b/components/pages/events/index.vue @@ -8,6 +8,13 @@ + + {{ snackText }} + @@ -40,7 +47,10 @@ selectedPackage: undefined, selectedImages: [], submitError: "", - user: undefined + user: undefined, + snackbar: false, + snackColor: "success", + snackText: "" }; }, computed: { @@ -62,9 +72,6 @@ isSubmitFailed() { return this.status === "submit-failed"; }, - isNotViewable() { - return this.status === "no-packages"; - }, hasUser() { return this.user !== undefined && this.user !== null; } @@ -126,49 +133,18 @@ ignoreSuccess(name) { return () => { this.fetchEvents(); - this.$Message.success(`${name} har dolts`); + this.snackColor = 'success'; + this.snackText = `${name} har dolts`; + this.snackbar = true; } }, ignoreFailed(name) { return () => { - this.$Message.error(`${name} kunde inte döljas`); + this.snackColor = 'error'; + this.snackText = `${name} kunde inte döljas`; + this.snackbar = true; } } - // switchPackage(pack) { - // this.selectedPackage = pack; - // }, - // switchImage(image) { - // this.selectedImages = [image]; - // }, - // publishCampaign(products) { - // if (this.status !== "ready") { - // return; - // } - // const packageToOrder = { - // products, - // packagePrice: this.selectedPackage.price, - // packageId: this.selectedPackage.id - // }; - // - // this.status = "submitting"; - // orderPackage({ - // package: packageToOrder, - // propertyId: this.propertyId, - // orderId: this.orderId - // }) - // .then(this.publishCampaignSuccess, this.publishCampaignFailed) - // .catch(this.publishCampaignFailed); - // }, - // publishCampaignSuccess(response) { - // if (response.errors) { - // this.publishCampaignFailed(); - // } else { - // this.status = "submitted"; - // } - // }, - // publishCampaignFailed() { - // this.status = "submit-failed"; - // } } };