From 7305a614ca20d50e6ab50bbcfbb128a6f1f90e53 Mon Sep 17 00:00:00 2001 From: dujinkim Date: Sun, 15 Jun 2025 04:41:55 +0000 Subject: (최겸) 기술영업 벤더 개발 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../table/tech-vendors-table-toolbar-actions.tsx | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'lib/tech-vendors/table/tech-vendors-table-toolbar-actions.tsx') diff --git a/lib/tech-vendors/table/tech-vendors-table-toolbar-actions.tsx b/lib/tech-vendors/table/tech-vendors-table-toolbar-actions.tsx index 82383a3a..06b2cc42 100644 --- a/lib/tech-vendors/table/tech-vendors-table-toolbar-actions.tsx +++ b/lib/tech-vendors/table/tech-vendors-table-toolbar-actions.tsx @@ -2,7 +2,7 @@ import * as React from "react" import { type Table } from "@tanstack/react-table" -import { Download, FileSpreadsheet, Upload, Check, BuildingIcon, FileText } from "lucide-react" +import { Download, FileSpreadsheet, FileText } from "lucide-react" import { toast } from "sonner" import { exportTableToExcel } from "@/lib/export" @@ -19,12 +19,14 @@ import { exportVendorsWithRelatedData } from "./vendor-all-export" import { TechVendor } from "@/db/schema/techVendors" import { ImportTechVendorButton } from "./import-button" import { exportTechVendorTemplate } from "./excel-template-download" +import { AddVendorDialog } from "./add-vendor-dialog" interface TechVendorsTableToolbarActionsProps { table: Table + onRefresh?: () => void } -export function TechVendorsTableToolbarActions({ table }: TechVendorsTableToolbarActionsProps) { +export function TechVendorsTableToolbarActions({ table, onRefresh }: TechVendorsTableToolbarActionsProps) { const [isExporting, setIsExporting] = React.useState(false); // 선택된 모든 벤더 가져오기 @@ -82,9 +84,22 @@ export function TechVendorsTableToolbarActions({ table }: TechVendorsTableToolba setIsExporting(false); } }; + + // 벤더 추가 성공 시 테이블 새로고침을 위한 핸들러 + const handleVendorAddSuccess = () => { + // 테이블 데이터 리프레시 + if (onRefresh) { + onRefresh(); + } else { + window.location.reload(); // 간단한 새로고침 방법 + } + }; return (
+ {/* 벤더 추가 다이얼로그 추가 */} + + {/* Import 버튼 추가 */} { -- cgit v1.2.3