Change remove ingredient confirmation

This commit is contained in:
harry 2023-10-18 21:09:33 +01:00
parent cc367bfed2
commit 8bbbc1b9ef

View File

@ -1084,7 +1084,7 @@ export default {
this.$nextTick(() => document.getElementById(`amount_${this.recipe.steps.indexOf(step)}_${step.ingredients.length - 1}`).select()) this.$nextTick(() => document.getElementById(`amount_${this.recipe.steps.indexOf(step)}_${step.ingredients.length - 1}`).select())
}, },
removeIngredient: function (step, ingredient) { removeIngredient: function (step, ingredient) {
if (confirm(this.$t("confirm_delete", {object: this.$t("Ingredient")}))) { if (confirm(this.$t("delete_confirmation", {source: `"${ingredient.food.name}"`}))) {
step.ingredients = step.ingredients.filter((item) => item !== ingredient) step.ingredients = step.ingredients.filter((item) => item !== ingredient)
} }
}, },