From 59b5715ebb3e1fd7bd4eb02ce50399715734f865 Mon Sep 17 00:00:00 2001
From: 0-Zz-ang <s1998319@gmail.com>
Date: Mon, 4 Aug 2025 14:59:15 +0900
Subject: (박서영) docu-list-rule detail sheet 컴포넌트 추가 및 검색 필터 기능
 오류 수정
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .../document-class/table/document-class-table-columns.tsx         | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

(limited to 'lib/docu-list-rule/document-class/table/document-class-table-columns.tsx')

diff --git a/lib/docu-list-rule/document-class/table/document-class-table-columns.tsx b/lib/docu-list-rule/document-class/table/document-class-table-columns.tsx
index 6684d13a..8c391def 100644
--- a/lib/docu-list-rule/document-class/table/document-class-table-columns.tsx
+++ b/lib/docu-list-rule/document-class/table/document-class-table-columns.tsx
@@ -22,12 +22,13 @@ import { documentClasses } from "@/db/schema/docu-list-rule"
 
 interface GetColumnsProps {
   setRowAction: React.Dispatch<React.SetStateAction<DataTableRowAction<typeof documentClasses.$inferSelect> | null>>
+  onDetail?: (documentClass: typeof documentClasses.$inferSelect) => void
 }
 
 /**
  * tanstack table 컬럼 정의
  */
-export function getColumns({ setRowAction }: GetColumnsProps): ColumnDef<typeof documentClasses.$inferSelect>[] {
+export function getColumns({ setRowAction, onDetail }: GetColumnsProps): ColumnDef<typeof documentClasses.$inferSelect>[] {
   // ----------------------------------------------------------------
   // 1) select 컬럼 (체크박스)
   // ----------------------------------------------------------------
@@ -76,6 +77,11 @@ export function getColumns({ setRowAction }: GetColumnsProps): ColumnDef<typeof
             </Button>
           </DropdownMenuTrigger>
           <DropdownMenuContent align="end" className="w-40">
+            <DropdownMenuItem
+              onSelect={() => onDetail?.(row.original)}
+            >
+              Detail
+            </DropdownMenuItem>
             <DropdownMenuItem
               onSelect={() => setRowAction({ row, type: "update" })}
             >
-- 
cgit v1.2.3

