User-supplied asset ids; brand on product; strain is the name
Build and push image / build (push) Successful in 48s
Build and push image / build (push) Successful in 48s
Four UX changes after using the rework for a bit: 1. Asset ids are 6-digit numbers from a roll of physical labels — server no longer generates them. POST /api/inventory requires assetId; the add-inventory form has a digits-only input that auto-focuses on entry. 2. Strain and product name are the same thing. Drop products.name; the strain's name supplies the display. Product creation just asks for "Name (strain)" and matches/creates a strain by that name. 3. Brand moves from inventory_items to products. SKUs are brand-specific, so all instances of a product share the brand. Brand selector lives on the product create/edit form, not the per-instance form. 4. Scanning an unknown SKU on the add-inventory step now opens the create-product subform with the SKU prefilled — one less click. Migration: detect prior shape (products.name column present) and rename products/inventory_items/audits to *_v1 archives, recreate empty. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -46,7 +46,7 @@ export function ProductDetail({
|
||||
["Asset id", <span className="mono">{item.assetId}</span>],
|
||||
["SKU", <span className="mono">{item.sku}</span>],
|
||||
["Type", `${item.type} · ${item.kind}`],
|
||||
["Strain", item.strainName ?? <span style={{ color: "var(--ink-3)" }}>Unlinked</span>],
|
||||
["Strain", item.name],
|
||||
["Brand", helpers.brandName(data, item.brandId)],
|
||||
["Shop", helpers.shopName(data, item.shopId)],
|
||||
["Total cannabinoids", `${item.totalCannabinoids.toFixed(1)}%`],
|
||||
|
||||
Reference in New Issue
Block a user