Allow add ingredient
This commit is contained in:
parent
377e0ef700
commit
61ec004360
1 changed files with 5 additions and 0 deletions
|
|
@ -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 });
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue