This commit is contained in:
2026-03-23 17:16:47 -05:00
parent d59a0a563d
commit 6bcf81e39b
2 changed files with 65 additions and 9 deletions

View File

@@ -4,6 +4,7 @@ import { getParts } from "@/lib/repository";
export default function PartsPage() {
const parts = getParts();
const activeItems = parts.filter((part) => part.kind === "part" || part.kind === "assembly");
return (
<div className="grid">
@@ -31,9 +32,19 @@ export default function PartsPage() {
</article>
<article className="panel">
<h2 className="section-title">Inventory Adjustment</h2>
<p className="section-copy">Apply opening balances, cycle-count corrections, or manual stock adjustments.</p>
<p className="section-copy">Apply opening balances, cycle-count corrections, or manual stock adjustments. Start typing a SKU or item name to filter the inventory list.</p>
<form action={recordAdjustment} className="form-grid">
<div className="form-row"><label htmlFor="adjust-sku">SKU</label><input className="input" id="adjust-sku" name="sku" required /></div>
<div className="form-row">
<label htmlFor="adjust-sku">Inventory Item</label>
<input className="input" id="adjust-sku" name="sku" list="inventory-adjustment-items" placeholder="Type SKU or item name" required />
<datalist id="inventory-adjustment-items">
{activeItems.map((item) => (
<option key={item.id} value={item.sku}>
{item.name}
</option>
))}
</datalist>
</div>
<div className="form-row"><label htmlFor="quantityDelta">Quantity Delta</label><input className="input" id="quantityDelta" name="quantityDelta" type="number" step="0.01" required /></div>
<div className="form-row"><label htmlFor="adjust-unit-cost">Unit Cost</label><input className="input" id="adjust-unit-cost" name="unitCost" type="number" min="0" step="0.01" defaultValue="0" /></div>
<div className="form-row"><label htmlFor="notes">Notes</label><textarea className="textarea" id="notes" name="notes" /></div>