From 2650b7c0bb0ea12b68a58c0439f72d61df04b2f1 Mon Sep 17 00:00:00 2001
From: dujinkim <dujin.kim@dtsolution.co.kr>
Date: Fri, 25 Jul 2025 07:51:15 +0000
Subject: (대표님) 정기평가 대상, 미들웨어 수정, nextauth 토큰 처리 개선, GTC
 등 (최겸) 기술영업
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 lib/techsales-rfq/table/rfq-table.tsx | 28 ++++++++++++++++++++++------
 1 file changed, 22 insertions(+), 6 deletions(-)

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

diff --git a/lib/techsales-rfq/table/rfq-table.tsx b/lib/techsales-rfq/table/rfq-table.tsx
index e3551625..e1e511c8 100644
--- a/lib/techsales-rfq/table/rfq-table.tsx
+++ b/lib/techsales-rfq/table/rfq-table.tsx
@@ -17,7 +17,7 @@ import {
 import { useDataTable } from "@/hooks/use-data-table"
 import { DataTable } from "@/components/data-table/data-table"
 import { getColumns } from "./rfq-table-column"
-import { useEffect, useMemo } from "react"
+import { useEffect, useMemo, useState } from "react"
 import { DataTableAdvancedToolbar } from "@/components/data-table/data-table-advanced-toolbar"
 import { RFQTableToolbarActions } from "./rfq-table-toolbar-actions"
 import { getTechSalesRfqsWithJoin, getTechSalesRfqAttachments } from "@/lib/techsales-rfq/service"
@@ -29,6 +29,7 @@ import { ProjectDetailDialog } from "./project-detail-dialog"
 import { RFQFilterSheet } from "./rfq-filter-sheet"
 import { TechSalesRfqAttachmentsSheet, ExistingTechSalesAttachment } from "./tech-sales-rfq-attachments-sheet"
 import { RfqItemsViewDialog } from "./rfq-items-view-dialog"
+import UpdateSheet from "./update-rfq-sheet"
 // 기본적인 RFQ 타입 정의 (repository selectTechSalesRfqsWithJoin 반환 타입에 맞춤)
 export interface TechSalesRfq {
   id: number
@@ -103,7 +104,10 @@ export function RFQListTable({
   
   // 패널 collapse 상태
   const [panelHeight, setPanelHeight] = React.useState<number>(55)
-  
+  // RFQListTable 컴포넌트 내부의 rowAction 처리 부분 수정
+  const [updateSheetOpen, setUpdateSheetOpen] = useState(false);
+  const [selectedRfqIdForUpdate, setSelectedRfqIdForUpdate] = useState<number | null>(null);
+
   // 고정 높이 설정을 위한 상수 (실제 측정값으로 조정 필요)
   const LAYOUT_HEADER_HEIGHT = 64 // Layout Header 높이
   const LAYOUT_FOOTER_HEIGHT = 60 // Layout Footer 높이 (있다면 실제 값)
@@ -246,8 +250,10 @@ export function RFQListTable({
           setIsProjectDetailOpen(true);
           break;
         case "update":
-          console.log("Update rfq:", rowAction.row.original)
-          break;
+            // RFQ 수정 시트 열기
+            setSelectedRfqIdForUpdate(rowAction.row.original.id);
+            setUpdateSheetOpen(true);
+            break;
         case "delete":
           console.log("Delete rfq:", rowAction.row.original)
           break;
@@ -391,6 +397,7 @@ export function RFQListTable({
         { label: "TS", value: "TS" },
         { label: "TE", value: "TE" },
         { label: "TP", value: "TP" },
+        { label: "TA", value: "TA" },
         // 해양HULL workTypes
         { label: "HA", value: "HA" },
         { label: "HE", value: "HE" },
@@ -450,8 +457,6 @@ export function RFQListTable({
     }
   }
 
-  console.log(panelHeight)
-
   return (
     <div 
       className={cn("flex flex-col relative", className)}
@@ -631,6 +636,17 @@ export function RFQListTable({
           rfqType: selectedRfqForItems.rfqType
         } : null}
       />
+          {updateSheetOpen && selectedRfqIdForUpdate && (
+      <UpdateSheet
+        open={updateSheetOpen}
+        onOpenChange={setUpdateSheetOpen}
+        rfqId={selectedRfqIdForUpdate}
+        onUpdated={() => {
+          // 테이블 새로고침 로직
+          // 필요한 경우 여기에 추가
+        }}
+      />
+    )}
     </div>
   )
 }
\ No newline at end of file
-- 
cgit v1.2.3

