From dec7dedd9409f1ee1afa2ac1ca7c17ff611c3df8 Mon Sep 17 00:00:00 2001
From: joonhoekim <26rote@gmail.com>
Date: Tue, 2 Sep 2025 08:50:02 +0000
Subject: (김준회) MDG 프로젝트 마스터 수신시 전체 데이터 projects 비지니스
 테이블에 매핑처리 - 테이블 컬럼 확장 - projects 페이지 프론트엔드 처리 - mdg
 수신 route에서 mapper 확장
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 lib/projects/table/projects-table.tsx | 25 +++++++++++++++++++++++--
 1 file changed, 23 insertions(+), 2 deletions(-)

(limited to 'lib/projects/table/projects-table.tsx')

diff --git a/lib/projects/table/projects-table.tsx b/lib/projects/table/projects-table.tsx
index 3da54b7c..462e8638 100644
--- a/lib/projects/table/projects-table.tsx
+++ b/lib/projects/table/projects-table.tsx
@@ -16,6 +16,7 @@ import { getColumns } from "./projects-table-columns"
 import { getProjectLists } from "../service"
 import { Project } from "@/db/schema"
 import { ProjectTableToolbarActions } from "./projects-table-toolbar-actions"
+import { ProjectDetailDialog } from "@/lib/projects/dialog/project-detail-dialog"
 
 interface ItemsTableProps {
   promises: Promise<
@@ -26,17 +27,28 @@ interface ItemsTableProps {
 }
 
 export function ProjectsTable({ promises }: ItemsTableProps) {
+  // eslint-disable-next-line @typescript-eslint/no-unused-vars
   const { featureFlags } = useFeatureFlags()
 
   const [{ data, pageCount }] =
     React.use(promises)
 
+  // eslint-disable-next-line @typescript-eslint/no-unused-vars
   const [rowAction, setRowAction] =
     React.useState<DataTableRowAction<Project> | null>(null)
 
+  // 상세보기 다이얼로그 상태 관리
+  const [selectedProject, setSelectedProject] = React.useState<Project | null>(null)
+  const [dialogOpen, setDialogOpen] = React.useState(false)
+
+  const handleDetailClick = React.useCallback((project: Project) => {
+    setSelectedProject(project)
+    setDialogOpen(true)
+  }, [])
+
   const columns = React.useMemo(
-    () => getColumns({ setRowAction }),
-    [setRowAction]
+    () => getColumns({ setRowAction, onDetailClick: handleDetailClick }),
+    [setRowAction, handleDetailClick]
   )
 
   /**
@@ -123,6 +135,15 @@ export function ProjectsTable({ promises }: ItemsTableProps) {
           <ProjectTableToolbarActions table={table} />
         </DataTableAdvancedToolbar>
       </DataTable>
+
+      {/* 프로젝트 상세보기 다이얼로그 */}
+      {selectedProject && (
+        <ProjectDetailDialog
+          project={selectedProject}
+          open={dialogOpen}
+          onOpenChange={setDialogOpen}
+        />
+      )}
     </>
   )
 }
-- 
cgit v1.2.3

