Management: edit form for store fields in inventory details sheet #27
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
The inventory details sheet shows stock/price but has no way to set
slug,description,images, oris_published. Staff cannot prepare catalog items for the store without using SQL or the API directly.Target
apps/management/app/(dashboard)/stok/inventory-details-sheet.tsxapps/management/app/(dashboard)/stok/inventory-edit-form.tsxChange
FormField/FormInputprimitives with:nama-produk-singkat; show the validator pattern^[a-z0-9]+(?:-[a-z0-9]+)*$.updateInventoryserver action with the changed fields only.router.refresh()and show a sonner toast.inventory-edit-form.tsxto keep the sheet file readable.Patterns to follow
AdjustmentModalfor form shape (FormDialog,FormField,FormInput,useRouter, sonnertoast).DetailsActionsalready in the sheet footer — keep it.Acceptance
updateInventory; success toasts and refreshes; error toasts.is_published: truewithout a slug is blocked at the UI (button disabled).tsc --noEmitandbiome checkpass.