diff --git a/web/src/components/modals/AddInventoryFlow.tsx b/web/src/components/modals/AddInventoryFlow.tsx index bb2f04a..2209e4e 100644 --- a/web/src/components/modals/AddInventoryFlow.tsx +++ b/web/src/components/modals/AddInventoryFlow.tsx @@ -62,11 +62,11 @@ export function AddInventoryFlow({ data, onClose }: { data: Bootstrap; onClose: : "Saved" } eyebrow={ - step === "select" - ? "Step 1 · Scan or pick a product" - : step === "details" - ? "Step 2 · This batch's details" - : "Inventory item created" + step === "details" + ? "Batch details" + : step === "done" + ? "Inventory item created" + : "" } onClose={onClose} /> @@ -128,9 +128,6 @@ function SelectProductStep({ const qc = useQueryClient(); const [creating, setCreating] = useState(false); - const [pickedProductId, setPickedProductId] = useState( - data.products[0]?.id ?? "", - ); // New-product subform const [newSku, setNewSku] = useState(""); @@ -213,27 +210,6 @@ function SelectProductStep({ matchedLabel={null} /> - {data.products.length > 0 && !creating && ( -
- - - -
- )} - {!creating && (
setCreating(true)}> @@ -322,13 +298,13 @@ function SelectProductStep({
{creating ? "Create the product, then we'll capture this batch's details." - : "Scan a SKU, pick a product, or create one."} + : "Scan a SKU barcode, or create a new product."}
Cancel - {creating ? ( + {creating && ( <> setCreating(false)}> Back @@ -342,17 +318,6 @@ function SelectProductStep({ {create.isPending ? "Creating…" : "Create product"} - ) : ( - data.products.length > 0 && ( - onPickProduct(pickedProductId)} - > - Add inventory - - ) )}
diff --git a/web/src/components/modals/ModalChrome.tsx b/web/src/components/modals/ModalChrome.tsx index 66e4f66..50025a1 100644 --- a/web/src/components/modals/ModalChrome.tsx +++ b/web/src/components/modals/ModalChrome.tsx @@ -102,9 +102,11 @@ export function ModalHeader({ }} >
-
- {eyebrow} -
+ {eyebrow && ( +
+ {eyebrow} +
+ )}

{title}