Replace iview toasts with vuetifys snackbar
This commit is contained in:
@@ -8,6 +8,13 @@
|
|||||||
</v-flex>
|
</v-flex>
|
||||||
</v-layout>
|
</v-layout>
|
||||||
</v-container>
|
</v-container>
|
||||||
|
<v-snackbar
|
||||||
|
v-model="snackbar"
|
||||||
|
:color="snackColor"
|
||||||
|
:timeout="3000"
|
||||||
|
>
|
||||||
|
{{ snackText }}
|
||||||
|
</v-snackbar>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -40,7 +47,10 @@
|
|||||||
selectedPackage: undefined,
|
selectedPackage: undefined,
|
||||||
selectedImages: [],
|
selectedImages: [],
|
||||||
submitError: "",
|
submitError: "",
|
||||||
user: undefined
|
user: undefined,
|
||||||
|
snackbar: false,
|
||||||
|
snackColor: "success",
|
||||||
|
snackText: ""
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -62,9 +72,6 @@
|
|||||||
isSubmitFailed() {
|
isSubmitFailed() {
|
||||||
return this.status === "submit-failed";
|
return this.status === "submit-failed";
|
||||||
},
|
},
|
||||||
isNotViewable() {
|
|
||||||
return this.status === "no-packages";
|
|
||||||
},
|
|
||||||
hasUser() {
|
hasUser() {
|
||||||
return this.user !== undefined && this.user !== null;
|
return this.user !== undefined && this.user !== null;
|
||||||
}
|
}
|
||||||
@@ -126,49 +133,18 @@
|
|||||||
ignoreSuccess(name) {
|
ignoreSuccess(name) {
|
||||||
return () => {
|
return () => {
|
||||||
this.fetchEvents();
|
this.fetchEvents();
|
||||||
this.$Message.success(`${name} har dolts`);
|
this.snackColor = 'success';
|
||||||
|
this.snackText = `${name} har dolts`;
|
||||||
|
this.snackbar = true;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
ignoreFailed(name) {
|
ignoreFailed(name) {
|
||||||
return () => {
|
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>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user