diff --git a/frontend/app/(sidebar)/inventory/edit-inventory-item.tsx b/frontend/app/(sidebar)/inventory/edit-inventory-item.tsx index 0affb70..b5d2a7a 100644 --- a/frontend/app/(sidebar)/inventory/edit-inventory-item.tsx +++ b/frontend/app/(sidebar)/inventory/edit-inventory-item.tsx @@ -36,14 +36,32 @@ import { cn } from "@/lib/utils"; // import { updateInventoryItem } from "@/api/inventory"; // import type { UpdateInventoryItemInput } from "@/types"; -export function EditInventoryItem() { - const [date, setDate] = useState(); +export interface EditInventoryItemProps { + id: string; + name: string; + category: string; + status: string; + type: string; + unit: string; + quantity: number; +} + +export function EditInventoryItem({ + id, + name, + category, + status, + type, + unit, + quantity, +}: EditInventoryItemProps) { const [open, setOpen] = useState(false); - const [itemName, setItemName] = useState(""); - const [itemType, setItemType] = useState(""); - const [itemCategory, setItemCategory] = useState(""); - const [itemQuantity, setItemQuantity] = useState(0); - const [itemUnit, setItemUnit] = useState(""); + const [itemName, setItemName] = useState(name); + const [itemType, setItemType] = useState(type); + const [itemCategory, setItemCategory] = useState(category); + const [itemQuantity, setItemQuantity] = useState(quantity); + const [itemUnit, setItemUnit] = useState(unit); + const [itemStatus, setItemStatus] = useState(status); // const queryClient = useQueryClient(); @@ -103,7 +121,7 @@ export function EditInventoryItem() { - @@ -116,6 +134,27 @@ export function EditInventoryItem() { +
+ + +
-
- - - - - - - - - -