88 lines
3.4 KiB
HTML
88 lines
3.4 KiB
HTML
{{ define "content" }}
|
|
<div class="page-header action-bar">
|
|
<h1>Inventory</h1>
|
|
<button class="btn btn-primary" style="width: auto; padding: 0.6rem 1.2rem; font-size: 0.95rem;" onclick="openItemModal()">
|
|
Add Item
|
|
</button>
|
|
</div>
|
|
|
|
<div class="table-container">
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Name</th>
|
|
<th>Category</th>
|
|
<th>Total Quantity</th>
|
|
<th style="text-align: right;">Actions</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody id="items-table-body">
|
|
<tr><td colspan="4" class="table-loader">Loading inventory...</td></tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div id="item-modal" class="modal">
|
|
<div class="modal-content">
|
|
<h2 id="item-modal-title">New Item</h2>
|
|
<form id="item-form" onsubmit="saveItem(event)">
|
|
<input type="hidden" id="item-id">
|
|
<div class="form-group">
|
|
<input type="text" id="item-name" placeholder="Item Name" required>
|
|
</div>
|
|
<div class="form-group">
|
|
<input type="text" id="item-category" placeholder="Category" required>
|
|
</div>
|
|
<div class="form-group">
|
|
<input type="text" id="item-desc" placeholder="Description">
|
|
</div>
|
|
<div class="button-group">
|
|
<button type="submit" class="btn btn-primary">Save Item</button>
|
|
<button type="button" class="btn btn-secondary" onclick="closeModal('item-modal')">Cancel</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="stock-modal" class="modal">
|
|
<div class="modal-content large">
|
|
<h2 id="stock-modal-title">Manage Stock</h2>
|
|
<div class="modal-split">
|
|
<div>
|
|
<h3>Current Locations</h3>
|
|
<div class="inner-table">
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Location</th>
|
|
<th>Quantity</th>
|
|
<th></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody id="stock-table-body">
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<h3>Update Stock</h3>
|
|
<form id="stock-form" onsubmit="saveStock(event)" style="margin-top: 1rem;">
|
|
<input type="hidden" id="stock-item-id">
|
|
<div class="form-group">
|
|
<select id="stock-location" class="search-input" style="width: 100%; padding: 0.85rem 1rem; background: #111827; color: white; border: 1px solid var(--border); border-radius: 10px;" required>
|
|
<option value="">Select Location...</option>
|
|
</select>
|
|
</div>
|
|
<div class="form-group">
|
|
<input type="number" id="stock-qty" placeholder="Quantity to add/set" required>
|
|
</div>
|
|
<div class="button-group">
|
|
<button type="submit" class="btn btn-primary">Update Stock</button>
|
|
<button type="button" class="btn btn-secondary" onclick="closeModal('stock-modal')">Done</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{{ end }} |