mirror of
https://github.com/RichieCahill/dotfiles.git
synced 2026-04-17 04:58:19 -04:00
added van api and front end
This commit is contained in:
17
python/van_inventory/templates/items.html
Normal file
17
python/van_inventory/templates/items.html
Normal file
@@ -0,0 +1,17 @@
|
||||
{% extends "base.html" %}
|
||||
{% block title %}Inventory - Van{% endblock %}
|
||||
{% block content %}
|
||||
<h1>Van Inventory</h1>
|
||||
|
||||
<form hx-post="/items" hx-target="#item-list" hx-swap="innerHTML" hx-on::after-request="this.reset()">
|
||||
<label>Name <input type="text" name="name" required></label>
|
||||
<label>Qty <input type="number" name="quantity" step="any" value="0" required></label>
|
||||
<label>Unit <input type="text" name="unit" required placeholder="lbs, cans, etc"></label>
|
||||
<label>Category <input type="text" name="category" placeholder="optional"></label>
|
||||
<button type="submit">Add Item</button>
|
||||
</form>
|
||||
|
||||
<div id="item-list">
|
||||
{% include "partials/item_rows.html" %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user