Add grid cell inventory linking and component quick-create
- New 'grid' location type on inventory entries (grid_id, grid_row, grid_col) - Clicking a grid cell shows a popup with what's stored there - Popup has '+ Add entry' pre-filled with the cell coordinates - Inventory dialog: 'New...' button next to component selector opens component creation dialog on top, returns with new component selected - Grid entries display as e.g. 'Black Component Box R3C5' in lists - Store original filename on source image upload Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -115,6 +115,7 @@
|
||||
<option value="physical">Physical</option>
|
||||
<option value="bom">BOM / Drawing</option>
|
||||
<option value="digital">Digital / Note</option>
|
||||
<option value="grid">Grid cell</option>
|
||||
</select>
|
||||
<button class="btn btn-primary" id="btn-add-inventory">+ Add entry</button>
|
||||
</div>
|
||||
@@ -354,9 +355,12 @@
|
||||
<form method="dialog" id="form-inventory">
|
||||
<div class="form-row">
|
||||
<label for="i-component">Component</label>
|
||||
<select id="i-component" required class="filter-select wide">
|
||||
<option value="">— select component —</option>
|
||||
</select>
|
||||
<div class="input-with-action">
|
||||
<select id="i-component" required class="filter-select">
|
||||
<option value="">— select component —</option>
|
||||
</select>
|
||||
<button type="button" class="btn btn-secondary btn-sm" id="i-new-component">New…</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<label for="i-type">Location type</label>
|
||||
@@ -364,12 +368,25 @@
|
||||
<option value="physical">Physical location</option>
|
||||
<option value="bom">BOM / Drawing</option>
|
||||
<option value="digital">Digital / Note</option>
|
||||
<option value="grid">Grid cell</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<label for="i-ref" id="i-ref-label">Location reference</label>
|
||||
<input type="text" id="i-ref" autocomplete="off">
|
||||
</div>
|
||||
<div class="form-row" id="i-grid-row" hidden>
|
||||
<label>Grid cell</label>
|
||||
<div class="i-grid-cell-picker">
|
||||
<select id="i-grid-select" class="filter-select"></select>
|
||||
<div class="i-grid-coords">
|
||||
<label for="i-grid-row-num">Row</label>
|
||||
<input type="number" id="i-grid-row-num" min="1" class="input-narrow">
|
||||
<label for="i-grid-col-num">Col</label>
|
||||
<input type="number" id="i-grid-col-num" min="1" class="input-narrow">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<label for="i-qty">Quantity</label>
|
||||
<input type="text" id="i-qty" autocomplete="off" placeholder="e.g. 10, ~50, see BOM">
|
||||
@@ -479,3 +496,17 @@
|
||||
</div>
|
||||
</dialog>
|
||||
</template>
|
||||
|
||||
<!-- ===== CELL INVENTORY OVERLAY ===== -->
|
||||
<template id="t-cell-inventory">
|
||||
<div class="cell-inventory-overlay" id="cell-inventory-overlay">
|
||||
<div class="cell-inventory-header">
|
||||
<span class="cell-inventory-title"></span>
|
||||
<button type="button" class="btn-icon" id="cell-inv-close">✕</button>
|
||||
</div>
|
||||
<div class="cell-inventory-list" id="cell-inventory-list"></div>
|
||||
<div class="cell-inventory-actions">
|
||||
<button type="button" class="btn btn-primary btn-sm" id="cell-inv-add">+ Add entry</button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user