From bac0228d21b7195065e9cddcc327ae33659c7bcc Mon Sep 17 00:00:00 2001
From: dujinkim <dujin.kim@dtsolution.co.kr>
Date: Sun, 1 Jun 2025 13:52:21 +0000
Subject: (대표님) 20250601까지 작업사항
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 lib/vendors/items-table/item-table.tsx | 23 ++++++++++++++++-------
 1 file changed, 16 insertions(+), 7 deletions(-)

(limited to 'lib/vendors/items-table/item-table.tsx')

diff --git a/lib/vendors/items-table/item-table.tsx b/lib/vendors/items-table/item-table.tsx
index d8cd0ea2..a58a136c 100644
--- a/lib/vendors/items-table/item-table.tsx
+++ b/lib/vendors/items-table/item-table.tsx
@@ -13,8 +13,11 @@ import { DataTable } from "@/components/data-table/data-table"
 import { DataTableAdvancedToolbar } from "@/components/data-table/data-table-advanced-toolbar"
 import { useFeatureFlags } from "./feature-flags-provider"
 import { getColumns } from "./item-table-columns"
-import {  getVendorItems,  } from "../service"
-import { VendorItemsView, vendors } from "@/db/schema/vendors"
+import {
+  getVendorItems,
+} from "../service"
+import { VendorItemsView } from "@/db/schema/vendors"
+import { ItemActionsDialogs } from "./item-action-dialog"
 import { VendorsTableToolbarActions } from "./item-table-toolbar-actions"
 
 interface VendorsTableProps {
@@ -22,25 +25,24 @@ interface VendorsTableProps {
     [
       Awaited<ReturnType<typeof getVendorItems>>,
     ]
-  >, 
-  vendorId:number
+  >,
+  vendorId: number
 }
 
-export function VendorItemsTable({ promises , vendorId}: VendorsTableProps) {
+export function VendorItemsTable({ promises, vendorId }: VendorsTableProps) {
   const { featureFlags } = useFeatureFlags()
 
   // Suspense로 받아온 데이터
   const [{ data, pageCount }] = React.use(promises)
   const [rowAction, setRowAction] = React.useState<DataTableRowAction<VendorItemsView> | null>(null)
 
-  // getColumns() 호출 시, router를 주입
+  // getColumns() 호출 시, setRowAction을 주입
   const columns = React.useMemo(
     () => getColumns({ setRowAction }),
     [setRowAction]
   )
 
   const filterFields: DataTableFilterField<VendorItemsView>[] = [
-    
   ]
 
   const advancedFilterFields: DataTableAdvancedFilterField<VendorItemsView>[] = [
@@ -80,6 +82,13 @@ export function VendorItemsTable({ promises , vendorId}: VendorsTableProps) {
           <VendorsTableToolbarActions table={table} vendorId={vendorId} />
         </DataTableAdvancedToolbar>
       </DataTable>
+
+      {/* 수정/삭제 다이얼로그 추가 */}
+      <ItemActionsDialogs
+        vendorId={vendorId}
+        rowAction={rowAction}
+        setRowAction={setRowAction}
+      />
     </>
   )
 }
\ No newline at end of file
-- 
cgit v1.2.3

