added bound checking to van invintory

This commit is contained in:
2026-03-09 07:20:26 -04:00
parent 58b25f2e89
commit 75a67294ea
7 changed files with 49 additions and 24 deletions

View File

@@ -8,7 +8,7 @@
<td>{{ item.name }}</td>
<td>
<form hx-patch="/items/{{ item.id }}" hx-target="#item-list" hx-swap="innerHTML" style="display:inline; margin:0;">
<input type="number" name="quantity" value="{{ item.quantity }}" step="any" style="width:5rem">
<input type="number" name="quantity" value="{{ item.quantity }}" step="any" min="0" style="width:5rem">
<button type="submit" style="padding:0.2rem 0.5rem; font-size:0.8rem;">Update</button>
</form>
</td>