setName(event.target.value)}
placeholder={t("inventory.dialog.namePlaceholder")}
value={name}
/>
setForm(event.target.value)}
placeholder={t("inventory.dialog.formPlaceholder")}
value={form}
/>
setStrength(event.target.value)}
placeholder={t("inventory.dialog.strengthPlaceholder")}
value={strength}
/>
setStockQuantity(event.target.value)}
type="number"
value={stockQuantity}
/>
setUnit(event.target.value)}
placeholder={t("inventory.dialog.unitPlaceholder")}
value={unit}
/>
setReorderThreshold(event.target.value)}
type="number"
value={reorderThreshold}
/>
setLocation(event.target.value)}
placeholder={t("inventory.dialog.locationPlaceholder")}
value={location}
/>
setExpiresAt(event.target.value)}
type="date"
value={expiresAt}
/>
setBarcode(event.target.value)}
// A hardware scanner sends Enter after the code; parse it here
// (instead of submitting the form) so a scan into this field is
// handled like the global wedge burst.
onKeyDown={(event) => {
if (event.key === "Enter") {
event.preventDefault();
if (barcode.trim()) handleScan(barcode);
}
}}
placeholder={t("inventory.dialog.barcodePlaceholder")}
value={barcode}
/>
{t("inventory.dialog.scanHint")}