From b67e36df49f067cbd5ba899f9fbcc755f38d4b4f Mon Sep 17 00:00:00 2001
From: dujinkim <dujin.kim@dtsolution.co.kr>
Date: Thu, 4 Sep 2025 08:31:31 +0000
Subject: (대표님, 최겸, 임수민) 작업사항 커밋
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .../bidding-pre-quote-vendor-toolbar-actions.tsx   | 92 ++++++++++++++++++++++
 1 file changed, 92 insertions(+)
 create mode 100644 lib/bidding/pre-quote/table/bidding-pre-quote-vendor-toolbar-actions.tsx

(limited to 'lib/bidding/pre-quote/table/bidding-pre-quote-vendor-toolbar-actions.tsx')

diff --git a/lib/bidding/pre-quote/table/bidding-pre-quote-vendor-toolbar-actions.tsx b/lib/bidding/pre-quote/table/bidding-pre-quote-vendor-toolbar-actions.tsx
new file mode 100644
index 00000000..c1b1baa5
--- /dev/null
+++ b/lib/bidding/pre-quote/table/bidding-pre-quote-vendor-toolbar-actions.tsx
@@ -0,0 +1,92 @@
+"use client"
+
+import * as React from "react"
+import { type Table } from "@tanstack/react-table"
+import { useTransition } from "react"
+import { Button } from "@/components/ui/button"
+import { Plus, Send, Mail } from "lucide-react"
+import { BiddingCompany } from "./bidding-pre-quote-vendor-columns"
+import { BiddingPreQuoteVendorCreateDialog } from "./bidding-pre-quote-vendor-create-dialog"
+import { BiddingPreQuoteInvitationDialog } from "./bidding-pre-quote-invitation-dialog"
+import { Bidding } from "@/db/schema" 
+import { useToast } from "@/hooks/use-toast"
+
+interface BiddingPreQuoteVendorToolbarActionsProps {
+  table: Table<BiddingCompany>
+  biddingId: number
+  bidding: Bidding
+  biddingCompanies: BiddingCompany[]
+  onOpenItemsDialog: () => void
+  onOpenTargetPriceDialog: () => void
+  onOpenSelectionReasonDialog: () => void
+  onSuccess: () => void
+}
+
+export function BiddingPreQuoteVendorToolbarActions({
+  table,
+  biddingId,
+  bidding,
+  biddingCompanies,
+  onOpenItemsDialog,
+  onOpenTargetPriceDialog,
+  onOpenSelectionReasonDialog,
+  onSuccess
+}: BiddingPreQuoteVendorToolbarActionsProps) {
+  const { toast } = useToast()
+  const [isPending, startTransition] = useTransition()
+  const [isCreateDialogOpen, setIsCreateDialogOpen] = React.useState(false)
+  const [isInvitationDialogOpen, setIsInvitationDialogOpen] = React.useState(false)
+
+  const handleCreateCompany = () => {
+    setIsCreateDialogOpen(true)
+  }
+
+  const handleSendInvitations = () => {
+    setIsInvitationDialogOpen(true)
+  }
+
+
+
+  return (
+    <>
+      <div className="flex items-center gap-2">
+        <Button
+          variant="outline"
+          size="sm"
+          onClick={handleCreateCompany}
+          disabled={isPending}
+        >
+          <Plus className="mr-2 h-4 w-4" />
+          업체 추가
+        </Button>
+        
+        <Button
+          variant="default"
+          size="sm"
+          onClick={handleSendInvitations}
+          disabled={isPending}
+        >
+          <Mail className="mr-2 h-4 w-4" />
+          초대 발송
+        </Button>
+      </div>
+
+      <BiddingPreQuoteVendorCreateDialog
+        biddingId={biddingId}
+        open={isCreateDialogOpen}
+        onOpenChange={setIsCreateDialogOpen}
+        onSuccess={() => {
+          onSuccess()
+          setIsCreateDialogOpen(false)
+        }}
+      />
+
+      <BiddingPreQuoteInvitationDialog
+        open={isInvitationDialogOpen}
+        onOpenChange={setIsInvitationDialogOpen}
+        companies={biddingCompanies}
+        onSuccess={onSuccess}
+      />
+    </>
+  )
+}
-- 
cgit v1.2.3

