updated standard toast function

This commit is contained in:
vabene1111
2022-04-23 01:31:15 +02:00
parent 3850287deb
commit e4223787be
20 changed files with 204 additions and 149 deletions

View File

@ -114,10 +114,10 @@ export default {
apiClient
.updateRecipeBook(this.book_copy.id, this.book_copy)
.then((result) => {
StandardToasts.makeStandardToast(StandardToasts.SUCCESS_UPDATE)
StandardToasts.makeStandardToast(this,StandardToasts.SUCCESS_UPDATE)
})
.catch((error) => {
StandardToasts.makeStandardToast(StandardToasts.FAIL_UPDATE)
StandardToasts.makeStandardToast(this,StandardToasts.FAIL_UPDATE)
})
},
refreshData: function () {
@ -135,10 +135,10 @@ export default {
.destroyRecipeBook(this.book.id)
.then((result) => {
this.$emit("refresh")
StandardToasts.makeStandardToast(StandardToasts.SUCCESS_DELETE)
StandardToasts.makeStandardToast(this,StandardToasts.SUCCESS_DELETE)
})
.catch((error) => {
StandardToasts.makeStandardToast(StandardToasts.FAIL_DELETE)
StandardToasts.makeStandardToast(this,StandardToasts.FAIL_DELETE)
})
}
},