"use client" import * as React from "react" import { type Table } from "@tanstack/react-table" import { Download, RefreshCcw } from "lucide-react" import { toast } from "sonner" import { exportTableToExcel } from "@/lib/export" import { Button } from "@/components/ui/button" import { VendorPO } from "./types" interface ShiVendorPOToolbarActionsProps { table: Table selectedRows: number[] onAction: (poId: number, action: string) => Promise onViewItems: (po: VendorPO) => void } export function ShiVendorPOToolbarActions({ table, selectedRows, onAction, onViewItems }: ShiVendorPOToolbarActionsProps) { const handleRefresh = async () => { try { toast.success("데이터를 새로고침했습니다.") // TODO: 실제 데이터 새로고침 로직 추가 window.location.reload() } catch (error) { toast.error("데이터 새로고침 중 오류가 발생했습니다.") } } return (
{/* Refresh 버튼 */} {/* Export 버튼 */}
) }