From ef4c533ebacc2cdc97e518f30e9a9350004fcdfb Mon Sep 17 00:00:00 2001 From: dujinkim Date: Mon, 28 Apr 2025 02:13:30 +0000 Subject: ~20250428 작업사항 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/vendor-investigation/table/items-dialog.tsx | 73 +++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 lib/vendor-investigation/table/items-dialog.tsx (limited to 'lib/vendor-investigation/table/items-dialog.tsx') diff --git a/lib/vendor-investigation/table/items-dialog.tsx b/lib/vendor-investigation/table/items-dialog.tsx new file mode 100644 index 00000000..5d010ff4 --- /dev/null +++ b/lib/vendor-investigation/table/items-dialog.tsx @@ -0,0 +1,73 @@ +"use client" + +import * as React from "react" +import { + Sheet, + SheetContent, + SheetDescription, + SheetHeader, + SheetTitle, + SheetFooter, +} from "@/components/ui/sheet" +import { Button } from "@/components/ui/button" +import { ScrollArea } from "@/components/ui/scroll-area" +import { PossibleItem } from "@/config/vendorInvestigationsColumnsConfig" + +interface ItemsDrawerProps { + open: boolean + onOpenChange: (open: boolean) => void + investigationId: number | null + items: PossibleItem[] +} + +export function ItemsDrawer({ + open, + onOpenChange, + investigationId, + items, +}: ItemsDrawerProps) { + return ( + + + + Possible Items + + {items.length > 0 + ? `Showing ${items.length} items for investigation #${investigationId}` + : `No items found for investigation #${investigationId}`} + + + + {items.length > 0 ? ( +
+ {items.map((item, index) => ( +
+
+

{item.itemName || "Unknown Item"}

+ {item.itemName && ( + + {item.itemCode} + + )} +
+ + +
+ ))} +
+ ) : ( +
+ No items available +
+ )} +
+ + + +
+
+ ) +} \ No newline at end of file -- cgit v1.2.3