From 1110427907bbe9c11a378da4c1a233b83b5ca3b1 Mon Sep 17 00:00:00 2001
From: joonhoekim <26rote@gmail.com>
Date: Tue, 26 Aug 2025 12:09:39 +0000
Subject: (김준회) 구매정의서 구현 - PO (shi & vendor)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .../vendor-table/shi-vendor-po-toolbar-actions.tsx | 66 ++++++++++++++++++++++
 1 file changed, 66 insertions(+)
 create mode 100644 lib/po/vendor-table/shi-vendor-po-toolbar-actions.tsx

(limited to 'lib/po/vendor-table/shi-vendor-po-toolbar-actions.tsx')

diff --git a/lib/po/vendor-table/shi-vendor-po-toolbar-actions.tsx b/lib/po/vendor-table/shi-vendor-po-toolbar-actions.tsx
new file mode 100644
index 00000000..a18c02da
--- /dev/null
+++ b/lib/po/vendor-table/shi-vendor-po-toolbar-actions.tsx
@@ -0,0 +1,66 @@
+"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<VendorPO>
+  selectedRows: number[]
+  onAction: (poId: number, action: string) => Promise<void>
+  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 (
+    <div className="flex items-center gap-2">
+      {/* Refresh 버튼 */}
+      <Button
+        variant="samsung"
+        size="sm"
+        className="gap-2"
+        onClick={handleRefresh}
+      >
+        <RefreshCcw className="size-4" aria-hidden="true" />
+        <span className="hidden sm:inline">Refresh</span>
+      </Button>
+
+      {/* Export 버튼 */}
+      <Button
+        variant="outline"
+        size="sm"
+        onClick={() =>
+          exportTableToExcel(table, {
+            filename: "vendor-po-list",
+            excludeColumns: ["select", "actions"],
+          })
+        }
+        className="gap-2"
+      >
+        <Download className="size-4" aria-hidden="true" />
+        <span className="hidden sm:inline">Export</span>
+      </Button>
+    </div>
+  )
+}
-- 
cgit v1.2.3

