diff options
| author | dujinkim <dujin.kim@dtsolution.co.kr> | 2025-06-15 04:40:22 +0000 |
|---|---|---|
| committer | dujinkim <dujin.kim@dtsolution.co.kr> | 2025-06-15 04:40:22 +0000 |
| commit | c5002d77087b256599b174ada611621657fcc523 (patch) | |
| tree | 515aab399709755cf3d57d9927e2d81467dea700 /lib/techsales-rfq/table/rfq-table-toolbar-actions.tsx | |
| parent | 9f3b8915ab20f177edafd3c4a4cc1ca0da0fc766 (diff) | |
(최겸) 기술영업 조선,해양RFQ 수정
Diffstat (limited to 'lib/techsales-rfq/table/rfq-table-toolbar-actions.tsx')
| -rw-r--r-- | lib/techsales-rfq/table/rfq-table-toolbar-actions.tsx | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/lib/techsales-rfq/table/rfq-table-toolbar-actions.tsx b/lib/techsales-rfq/table/rfq-table-toolbar-actions.tsx index da716eeb..a8c2d08c 100644 --- a/lib/techsales-rfq/table/rfq-table-toolbar-actions.tsx +++ b/lib/techsales-rfq/table/rfq-table-toolbar-actions.tsx @@ -7,16 +7,20 @@ import { toast } from "sonner" import { exportTableToExcel } from "@/lib/export" import { Button } from "@/components/ui/button" import { type Table } from "@tanstack/react-table" -import { CreateRfqDialog } from "./create-rfq-dialog" +import { CreateShipRfqDialog } from "./create-rfq-ship-dialog" +import { CreateTopRfqDialog } from "./create-rfq-top-dialog" +import { CreateHullRfqDialog } from "./create-rfq-hull-dialog" interface RFQTableToolbarActionsProps<TData> { selection: Table<TData>; onRefresh?: () => void; + rfqType?: "SHIP" | "TOP" | "HULL"; } export function RFQTableToolbarActions<TData>({ selection, - onRefresh + onRefresh, + rfqType = "SHIP" }: RFQTableToolbarActionsProps<TData>) { // 데이터 새로고침 @@ -27,10 +31,23 @@ export function RFQTableToolbarActions<TData>({ } } + // RFQ 타입에 따른 다이얼로그 렌더링 + const renderRfqDialog = () => { + switch (rfqType) { + case "TOP": + return <CreateTopRfqDialog onCreated={onRefresh} />; + case "HULL": + return <CreateHullRfqDialog onCreated={onRefresh} />; + case "SHIP": + default: + return <CreateShipRfqDialog onCreated={onRefresh} />; + } + } + return ( <div className="flex items-center gap-2"> {/* RFQ 생성 다이얼로그 */} - <CreateRfqDialog onCreated={onRefresh} /> + {renderRfqDialog()} {/* 새로고침 버튼 */} <Button |
