From c5002d77087b256599b174ada611621657fcc523 Mon Sep 17 00:00:00 2001
From: dujinkim <dujin.kim@dtsolution.co.kr>
Date: Sun, 15 Jun 2025 04:40:22 +0000
Subject: (최겸) 기술영업 조선,해양RFQ 수정
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .../table/detail-table/rfq-detail-table.tsx        | 25 ++++++++--------------
 1 file changed, 9 insertions(+), 16 deletions(-)

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

diff --git a/lib/techsales-rfq/table/detail-table/rfq-detail-table.tsx b/lib/techsales-rfq/table/detail-table/rfq-detail-table.tsx
index ba530fe3..f2eda8d9 100644
--- a/lib/techsales-rfq/table/detail-table/rfq-detail-table.tsx
+++ b/lib/techsales-rfq/table/detail-table/rfq-detail-table.tsx
@@ -30,8 +30,6 @@ interface TechSalesRfq {
   rfqSendDate?: Date | null
   dueDate?: Date | null
   createdByName?: string | null
-  // 필요에 따라 다른 필드들 추가
-  [key: string]: any // eslint-disable-line @typescript-eslint/no-explicit-any
 }
 
 // 프로퍼티 정의
@@ -100,16 +98,12 @@ export function RfqDetailTables({ selectedRfq, maxHeight }: RfqDetailTablesProps
 
     try {
       // 실제 벤더 견적 데이터 다시 로딩
-      const { getTechSalesVendorQuotationsWithJoin } = await import("@/lib/techsales-rfq/service")
+      const { getTechSalesRfqTechVendors } = await import("@/lib/techsales-rfq/service")
       
-      const result = await getTechSalesVendorQuotationsWithJoin({
-        rfqId: selectedRfqId,
-        page: 1,
-        perPage: 1000,
-      })
+      const result = await getTechSalesRfqTechVendors(selectedRfqId)
       
       // 데이터 변환
-      const transformedData = result.data?.map(item => ({
+      const transformedData = result.data?.map((item: any) => ({
         ...item,
         detailId: item.id,
         rfqId: selectedRfqId,
@@ -209,9 +203,9 @@ export function RfqDetailTables({ selectedRfq, maxHeight }: RfqDetailTablesProps
       }
 
       // 서비스 함수 호출
-      const { removeVendorsFromTechSalesRfq } = await import("@/lib/techsales-rfq/service");
+      const { removeTechVendorsFromTechSalesRfq } = await import("@/lib/techsales-rfq/service");
       
-      const result = await removeVendorsFromTechSalesRfq({
+      const result = await removeTechVendorsFromTechSalesRfq({
         rfqId: selectedRfqId,
         vendorIds: vendorIds
       });
@@ -219,9 +213,8 @@ export function RfqDetailTables({ selectedRfq, maxHeight }: RfqDetailTablesProps
       if (result.error) {
         toast.error(result.error);
       } else {
-        const successMessage = `${result.successCount}개의 벤더가 성공적으로 삭제되었습니다`;
-        const errorMessage = result.errorCount && result.errorCount > 0 ? ` (${result.errorCount}개 실패)` : "";
-        toast.success(successMessage + errorMessage);
+        const successCount = result.data?.length || 0
+        toast.success(`${successCount}개의 벤더가 성공적으로 삭제되었습니다`);
       }
       
       // 선택 해제
@@ -395,9 +388,9 @@ export function RfqDetailTables({ selectedRfq, maxHeight }: RfqDetailTablesProps
           }
 
           // 개별 벤더 삭제
-          const { removeVendorFromTechSalesRfq } = await import("@/lib/techsales-rfq/service");
+          const { removeTechVendorFromTechSalesRfq } = await import("@/lib/techsales-rfq/service");
           
-          const result = await removeVendorFromTechSalesRfq({
+          const result = await removeTechVendorFromTechSalesRfq({
             rfqId: selectedRfqId,
             vendorId: vendor.vendorId
           });
-- 
cgit v1.2.3

