From 93cc002186d3816d991925e57d44e0586dba2e75 Mon Sep 17 00:00:00 2001
From: dujinkim <dujin.kim@dtsolution.co.kr>
Date: Wed, 26 Nov 2025 09:55:47 +0000
Subject: (최겸) 구매 입찰 수정 v2
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 lib/bidding/detail/table/bidding-detail-vendor-table.tsx | 9 +++++++++
 1 file changed, 9 insertions(+)

(limited to 'lib/bidding/detail/table/bidding-detail-vendor-table.tsx')

diff --git a/lib/bidding/detail/table/bidding-detail-vendor-table.tsx b/lib/bidding/detail/table/bidding-detail-vendor-table.tsx
index 08fc0293..edb72aca 100644
--- a/lib/bidding/detail/table/bidding-detail-vendor-table.tsx
+++ b/lib/bidding/detail/table/bidding-detail-vendor-table.tsx
@@ -15,6 +15,7 @@ import { Bidding } from '@/db/schema'
 import { PriceAdjustmentDialog } from '@/components/bidding/price-adjustment-dialog'
 import { QuotationHistoryDialog } from './quotation-history-dialog'
 import { ApprovalPreviewDialog } from '@/lib/approval/approval-preview-dialog'
+import { ApplicationReasonDialog } from '@/lib/rfq-last/vendor/application-reason-dialog'
 import { requestBiddingAwardWithApproval } from '@/lib/bidding/approval-actions'
 import { useToast } from '@/hooks/use-toast'
 
@@ -106,6 +107,12 @@ export function BiddingDetailVendorTableContent({
     variables: Record<string, string>
     title: string
     selectionReason: string
+    awardedCompanies: {
+      companyId: number
+      companyName: string | null
+      finalQuoteAmount: number
+      awardRatio: number
+    }[]
   } | null>(null)
   const [isApprovalPreviewDialogOpen, setIsApprovalPreviewDialogOpen] = React.useState(false)
 
@@ -204,6 +211,7 @@ export function BiddingDetailVendorTableContent({
       const result = await requestBiddingAwardWithApproval({
         biddingId,
         selectionReason: approvalPreviewData.selectionReason,
+        awardedCompanies: approvalPreviewData.awardedCompanies,
         currentUser: {
           id: Number(session.user.id),
           epId: session.user.epId || null,
@@ -273,6 +281,7 @@ export function BiddingDetailVendorTableContent({
         onSuccess={onRefresh}
         onApprovalPreview={(data) => {
           setApprovalPreviewData(data)
+          setIsAwardDialogOpen(false)
           setIsApprovalPreviewDialogOpen(true)
         }}
       />
-- 
cgit v1.2.3

