From ef4c533ebacc2cdc97e518f30e9a9350004fcdfb Mon Sep 17 00:00:00 2001
From: dujinkim <dujin.kim@dtsolution.co.kr>
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 (
+    <Sheet open={open} onOpenChange={onOpenChange}>
+      <SheetContent className="sm:max-w-md">
+        <SheetHeader>
+          <SheetTitle>Possible Items</SheetTitle>
+          <SheetDescription>
+            {items.length > 0
+              ? `Showing ${items.length} items for investigation #${investigationId}`
+              : `No items found for investigation #${investigationId}`}
+          </SheetDescription>
+        </SheetHeader>
+        <ScrollArea className="max-h-[70vh] mt-6 pr-4">
+          {items.length > 0 ? (
+            <div className="space-y-4">
+              {items.map((item, index) => (
+                <div
+                  key={index}
+                  className="flex flex-col gap-2 p-3 rounded-lg border"
+                >
+                  <div className="flex justify-between items-start">
+                    <h4 className="font-medium">{item.itemName || "Unknown Item"}</h4>
+                    {item.itemName && (
+                      <span className="text-xs bg-muted px-2 py-1 rounded">
+                     {item.itemCode}
+                      </span>
+                    )}
+                  </div>
+
+
+                </div>
+              ))}
+            </div>
+          ) : (
+            <div className="text-center py-6 text-muted-foreground">
+              No items available
+            </div>
+          )}
+        </ScrollArea>
+        <SheetFooter className="mt-4">
+          <Button onClick={() => onOpenChange(false)}>Close</Button>
+        </SheetFooter>
+      </SheetContent>
+    </Sheet>
+  )
+}
\ No newline at end of file
-- 
cgit v1.2.3

