From 4863ba5d336297dddcc8d6d4b414beceb5559742 Mon Sep 17 00:00:00 2001
From: dujinkim <dujin.kim@dtsolution.co.kr>
Date: Mon, 8 Dec 2025 03:03:26 +0000
Subject: (최겸) 기술영업 rfq eml첨부기능 추가
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .../possible-items/possible-items-table.tsx            | 18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)

(limited to 'lib/tech-vendors/possible-items/possible-items-table.tsx')

diff --git a/lib/tech-vendors/possible-items/possible-items-table.tsx b/lib/tech-vendors/possible-items/possible-items-table.tsx
index 100ef04a..226cddf7 100644
--- a/lib/tech-vendors/possible-items/possible-items-table.tsx
+++ b/lib/tech-vendors/possible-items/possible-items-table.tsx
@@ -37,7 +37,8 @@ import { getTechVendorPossibleItems } from "../../tech-vendor-possible-items/ser
 import { deleteTechVendorPossibleItem, getTechVendorDetailById } from "../service"
 import type { TechVendorPossibleItem } from "../validations"
 import { PossibleItemsTableToolbarActions } from "./possible-items-toolbar-actions"
-import { AddItemDialog } from "./add-item-dialog" // 주석처리
+import { AddItemDialog } from "./add-item-dialog"
+import { ConnectItemVendorDialog } from "./connect-item-vendor-dialog"
 
 interface TechVendorPossibleItemsTableProps {
   promises: Promise<
@@ -55,7 +56,8 @@ export function TechVendorPossibleItemsTable({
   // Suspense로 받아온 데이터
   const [{ data, pageCount }] = React.use(promises)
   const [rowAction, setRowAction] = React.useState<DataTableRowAction<TechVendorPossibleItem> | null>(null)
-  const [showAddDialog, setShowAddDialog] = React.useState(false) // 주석처리
+  const [showAddDialog, setShowAddDialog] = React.useState(false)
+  const [showConnectDialog, setShowConnectDialog] = React.useState(false)
   const [showDeleteAlert, setShowDeleteAlert] = React.useState(false)
   const [isDeleting, setIsDeleting] = React.useState(false)
   
@@ -189,7 +191,8 @@ export function TechVendorPossibleItemsTable({
             <PossibleItemsTableToolbarActions
               table={table}
               vendorId={vendorId}
-              onAdd={() => setShowAddDialog(true)} // 주석처리
+              onAdd={() => setShowAddDialog(true)}
+              onConnect={() => setShowConnectDialog(true)}
               onRefresh={() => {
                 // 페이지 새로고침을 위한 콜백
                 window.location.reload()
@@ -199,13 +202,20 @@ export function TechVendorPossibleItemsTable({
         </DataTableAdvancedToolbar>
       </DataTable>
 
-      {/* Add Item Dialog */}
+      {/* Add Item Dialog (벤더 기준) */}
       <AddItemDialog
         open={showAddDialog}
         onOpenChange={setShowAddDialog}
         vendorId={vendorId}
       />
 
+      {/* Item -> Vendor Connect Dialog (아이템 기준) */}
+      <ConnectItemVendorDialog
+        open={showConnectDialog}
+        onOpenChange={setShowConnectDialog}
+        onConnected={() => window.location.reload()}
+      />
+
       {/* Vendor Items Dialog */}
       <Dialog open={showItemsDialog} onOpenChange={setShowItemsDialog}>
         <DialogContent className="max-w-2xl max-h-[80vh]">
-- 
cgit v1.2.3

