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

---
 .../table/document-class-options-table-toolbar.tsx | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

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

diff --git a/lib/docu-list-rule/document-class/table/document-class-options-table-toolbar.tsx b/lib/docu-list-rule/document-class/table/document-class-options-table-toolbar.tsx
index 5044d90d..0cd44a4f 100644
--- a/lib/docu-list-rule/document-class/table/document-class-options-table-toolbar.tsx
+++ b/lib/docu-list-rule/document-class/table/document-class-options-table-toolbar.tsx
@@ -3,23 +3,23 @@
 import * as React from "react"
 import { type Table } from "@tanstack/react-table"
 
-import { DocumentClassOptionAddDialog } from "./document-class-option-add-dialog"
-import { DeleteDocumentClassOptionDialog } from "./delete-document-class-option-dialog"
-import { documentClasses, documentClassOptions } from "@/db/schema/documentClasses"
+import { DocumentClassOptionAddDialog } from "@/lib/docu-list-rule/document-class/table/document-class-option-add-dialog"
+import { DeleteDocumentClassOptionDialog } from "@/lib/docu-list-rule/document-class/table/delete-document-class-option-dialog"
+import { documentClassOptions } from "@/db/schema/docu-list-rule"
 
-interface DocumentClassOptionsTableToolbarActionsProps<TData> {
-  table: Table<TData>
-  selectedDocumentClass: typeof documentClasses.$inferSelect | null
+interface DocumentClassOptionsTableToolbarActionsProps {
+  table: Table<typeof documentClassOptions.$inferSelect>
+  documentClassId: number
   onSuccess?: () => void
 }
 
-export function DocumentClassOptionsTableToolbarActions<TData>({
+export function DocumentClassOptionsTableToolbarActions({
   table,
-  selectedDocumentClass,
+  documentClassId,
   onSuccess,
-}: DocumentClassOptionsTableToolbarActionsProps<TData>) {
+}: DocumentClassOptionsTableToolbarActionsProps) {
   const selectedRows = table.getFilteredSelectedRowModel().rows
-  const selectedOptions = selectedRows.map((row) => row.original as typeof documentClassOptions.$inferSelect)
+  const selectedOptions = selectedRows.map((row) => row.original)
 
   return (
     <div className="flex items-center gap-2">
@@ -35,7 +35,7 @@ export function DocumentClassOptionsTableToolbarActions<TData>({
       ) : null}
 
       <DocumentClassOptionAddDialog
-        selectedDocumentClass={selectedDocumentClass}
+        documentClassId={documentClassId}
         onSuccess={onSuccess}
       />
     </div>
-- 
cgit v1.2.3

