Allow add ingredient

This commit is contained in:
jableader 2024-05-04 12:00:05 +10:00
parent 377e0ef700
commit 61ec004360

View file

@ -27,6 +27,8 @@
<button @click="deleteIngredient(ingredient)">Delete</button> <button @click="deleteIngredient(ingredient)">Delete</button>
</li> </li>
</ul> </ul>
<button @click="addIngredient">Add Ingredient</button>
<button class="submit-btn" @click="saveRecipe">Save</button> <button class="submit-btn" @click="saveRecipe">Save</button>
</div> </div>
</div> </div>
@ -168,6 +170,9 @@ export default {
ingredients: [], ingredients: [],
image_urls: [] image_urls: []
} }
},
addIngredient() {
this.recipe.ingredients.push({ line: '', product: null });
} }
}, },
} }