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

@ -162,10 +162,10 @@ export default {
this.servings_value = result.data.servings
this.addToShopping()
}
StandardToasts.makeStandardToast(StandardToasts.SUCCESS_CREATE)
StandardToasts.makeStandardToast(this,StandardToasts.SUCCESS_CREATE)
})
.catch((error) => {
StandardToasts.makeStandardToast(StandardToasts.FAIL_CREATE)
StandardToasts.makeStandardToast(this,StandardToasts.FAIL_CREATE)
})
},
createMealPlan(data) {
@ -228,11 +228,11 @@ export default {
apiClient
.createRecipe(recipe)
.then((new_recipe) => {
StandardToasts.makeStandardToast(StandardToasts.SUCCESS_CREATE)
StandardToasts.makeStandardToast(this,StandardToasts.SUCCESS_CREATE)
window.open(this.resolveDjangoUrl("view_recipe", new_recipe.data.id))
})
.catch((error) => {
StandardToasts.makeStandardToast(StandardToasts.FAIL_CREATE)
StandardToasts.makeStandardToast(this,StandardToasts.FAIL_CREATE)
})
})
},