Replace iview toasts with vuetifys snackbar
This commit is contained in:
@@ -8,6 +8,13 @@
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-container>
|
||||
<v-snackbar
|
||||
v-model="snackbar"
|
||||
:color="snackColor"
|
||||
:timeout="3000"
|
||||
>
|
||||
{{ snackText }}
|
||||
</v-snackbar>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -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";
|
||||
// }
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user