From 95866a13ba4e1c235373834460aa284b763fe0d9 Mon Sep 17 00:00:00 2001
From: dujinkim <dujin.kim@dtsolution.co.kr>
Date: Mon, 23 Jun 2025 09:03:29 +0000
Subject: (최겸) 기술영업 RFQ 개발(0620 요구사항, 첨부파일, REV 등)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 lib/techsales-rfq/table/detail-table/add-vendor-dialog.tsx | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

(limited to 'lib/techsales-rfq/table/detail-table/add-vendor-dialog.tsx')

diff --git a/lib/techsales-rfq/table/detail-table/add-vendor-dialog.tsx b/lib/techsales-rfq/table/detail-table/add-vendor-dialog.tsx
index 3574111f..8f2fe948 100644
--- a/lib/techsales-rfq/table/detail-table/add-vendor-dialog.tsx
+++ b/lib/techsales-rfq/table/detail-table/add-vendor-dialog.tsx
@@ -29,6 +29,8 @@ type VendorFormValues = z.infer<typeof vendorFormSchema>
 type TechSalesRfq = {
   id: number
   rfqCode: string | null
+  rfqType: "SHIP" | "TOP" | "HULL" | null
+  ptypeNm: string | null // 프로젝트 타입명 추가
   status: string
   [key: string]: any // eslint-disable-line @typescript-eslint/no-explicit-any
 }
@@ -118,10 +120,8 @@ export function AddVendorDialog({
       setIsSearching(true)
       try {
         // 선택된 RFQ의 타입을 기반으로 벤더 검색
-        const rfqType = selectedRfq?.rfqCode?.includes("SHIP") ? "SHIP" :
-                       selectedRfq?.rfqCode?.includes("TOP") ? "TOP" :
-                       selectedRfq?.rfqCode?.includes("HULL") ? "HULL" : undefined;
-        
+        const rfqType = selectedRfq?.rfqType || undefined;
+        console.log("rfqType", rfqType) // 디버깅용
         const results = await searchTechVendors(term, 100, rfqType)
         
         // 이미 추가된 벤더 제외
@@ -136,7 +136,7 @@ export function AddVendorDialog({
         setIsSearching(false)
       }
     },
-    [existingVendorIds]
+    [existingVendorIds, selectedRfq?.rfqType]
   )
 
   // 검색어 변경 시 디바운스 적용
-- 
cgit v1.2.3

