feat: Added price updating
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
|
||||
<div class="card">
|
||||
<h2>{{ drink.name }}</h2>
|
||||
<p>Price: {{ drink.price }}€</p>
|
||||
<p>Price: {{ "%.2f"|format(drink.price) }}€</p>
|
||||
<p>Stock: {{ drink.stock }}</p>
|
||||
</div>
|
||||
|
||||
@@ -26,6 +26,17 @@
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<h3>Adjust price</h3>
|
||||
<form method="POST" action="/drink/{{ drink.id }}/price">
|
||||
<label>
|
||||
New price:
|
||||
<input type="number" step="0.01" name="price" required>
|
||||
</label>
|
||||
<button class="button" type="submit">Change price</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<h3>Danger zone</h3>
|
||||
<form method="POST" action="/drink/{{ drink.id }}/delete" onsubmit="return confirm('Delete this drink?');">
|
||||
|
||||
Reference in New Issue
Block a user