Confirm deletes
This commit is contained in:
parent
9f3001b298
commit
8adda59d70
1 changed files with 3 additions and 1 deletions
|
|
@ -145,7 +145,9 @@ export default {
|
||||||
return date.toLocaleDateString('en-au', { day: 'numeric', month: 'numeric' });
|
return date.toLocaleDateString('en-au', { day: 'numeric', month: 'numeric' });
|
||||||
},
|
},
|
||||||
removeRecipe(mealRecipe) {
|
removeRecipe(mealRecipe) {
|
||||||
|
if (confirm(`Are you sure you want to remove ${mealRecipe.servings} servings of ${mealRecipe.recipe.name} from this meal?`)) {
|
||||||
this.meal.recipes = this.meal.recipes.filter(r => r != mealRecipe);
|
this.meal.recipes = this.meal.recipes.filter(r => r != mealRecipe);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
addIngredient() {
|
addIngredient() {
|
||||||
this.meal.extra_ingredients = [{ line: '', product: null }, ...this.meal.extra_ingredients];
|
this.meal.extra_ingredients = [{ line: '', product: null }, ...this.meal.extra_ingredients];
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue