From 44b74ff4170090673b6eeacd8c528e0abf47b7aa Mon Sep 17 00:00:00 2001 From: joonhoekim <26rote@gmail.com> Date: Mon, 1 Dec 2025 19:52:06 +0900 Subject: (김준회) deprecated code 정리 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/cbe/table/cbe-table-toolbar-actions.tsx | 72 ----------------------------- 1 file changed, 72 deletions(-) delete mode 100644 lib/cbe/table/cbe-table-toolbar-actions.tsx (limited to 'lib/cbe/table/cbe-table-toolbar-actions.tsx') diff --git a/lib/cbe/table/cbe-table-toolbar-actions.tsx b/lib/cbe/table/cbe-table-toolbar-actions.tsx deleted file mode 100644 index 34b5b46c..00000000 --- a/lib/cbe/table/cbe-table-toolbar-actions.tsx +++ /dev/null @@ -1,72 +0,0 @@ -"use client" - -import * as React from "react" -import { type Table } from "@tanstack/react-table" -import { Download, Upload } from "lucide-react" -import { toast } from "sonner" - -import { exportTableToExcel } from "@/lib/export" -import { Button } from "@/components/ui/button" - - -import { VendorWithCbeFields } from "@/config/vendorCbeColumnsConfig" -import { InviteVendorsDialog } from "./invite-vendors-dialog" - -interface VendorsTableToolbarActionsProps { - table: Table - rfqId: number -} - -export function VendorsTableToolbarActions({ table, rfqId }: VendorsTableToolbarActionsProps) { - // 파일 input을 숨기고, 버튼 클릭 시 참조해 클릭하는 방식 - const fileInputRef = React.useRef(null) - - // 파일이 선택되었을 때 처리 - - function handleImportClick() { - // 숨겨진 요소를 클릭 - fileInputRef.current?.click() - } - - const uniqueRfqIds = table.getFilteredSelectedRowModel().rows.length > 0 - ? [...new Set(table.getFilteredSelectedRowModel().rows.map(row => row.original.rfqId))] - : []; - -const hasMultipleRfqIds = uniqueRfqIds.length > 1; - -const invitationPossibeVendors = React.useMemo(() => { - return table - .getFilteredSelectedRowModel() - .rows - .map(row => row.original) - .filter(vendor => vendor.commercialResponseStatus === null); -}, [table.getFilteredSelectedRowModel().rows]); - -return ( -
- {invitationPossibeVendors.length > 0 && ( - table.toggleAllRowsSelected(false)} - hasMultipleRfqIds={hasMultipleRfqIds} - /> - )} - - -
- ) -} \ No newline at end of file -- cgit v1.2.3