From 86b1fd1cc801f45642f84d24c0b5c84368454ff0 Mon Sep 17 00:00:00 2001 From: dujinkim Date: Tue, 9 Sep 2025 10:34:05 +0000 Subject: (최겸) 구매 입찰 사전견적, 입찰, 낙찰, 유찰, 재입찰 기능 개발 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bidding-detail-vendor-toolbar-actions.tsx | 29 +++++++++++----------- 1 file changed, 14 insertions(+), 15 deletions(-) (limited to 'lib/bidding/detail/table/bidding-detail-vendor-toolbar-actions.tsx') diff --git a/lib/bidding/detail/table/bidding-detail-vendor-toolbar-actions.tsx b/lib/bidding/detail/table/bidding-detail-vendor-toolbar-actions.tsx index 8cdec191..64c31633 100644 --- a/lib/bidding/detail/table/bidding-detail-vendor-toolbar-actions.tsx +++ b/lib/bidding/detail/table/bidding-detail-vendor-toolbar-actions.tsx @@ -15,6 +15,7 @@ interface BiddingDetailVendorToolbarActionsProps { table: Table biddingId: number bidding: Bidding + userId: string onOpenItemsDialog: () => void onOpenTargetPriceDialog: () => void onOpenAwardDialog: () => void @@ -25,6 +26,7 @@ export function BiddingDetailVendorToolbarActions({ table, biddingId, bidding, + userId, onOpenItemsDialog, onOpenTargetPriceDialog, onOpenAwardDialog, @@ -41,17 +43,17 @@ export function BiddingDetailVendorToolbarActions({ const handleRegister = () => { startTransition(async () => { - const result = await registerBidding(bidding.id, 'current-user') // TODO: 실제 사용자 ID + const result = await registerBidding(bidding.id, userId) if (result.success) { toast({ - title: '성공', + title: result.message, description: result.message, }) router.refresh() } else { toast({ - title: '오류', + title: result.error, description: result.error, variant: 'destructive', }) @@ -61,17 +63,17 @@ export function BiddingDetailVendorToolbarActions({ const handleMarkAsDisposal = () => { startTransition(async () => { - const result = await markAsDisposal(bidding.id, 'current-user') // TODO: 실제 사용자 ID + const result = await markAsDisposal(bidding.id, userId) if (result.success) { toast({ - title: '성공', + title: result.message, description: result.message, }) router.refresh() } else { toast({ - title: '오류', + title: result.error, description: result.error, variant: 'destructive', }) @@ -81,18 +83,18 @@ export function BiddingDetailVendorToolbarActions({ const handleCreateRebidding = () => { startTransition(async () => { - const result = await createRebidding(bidding.id, 'current-user') // TODO: 실제 사용자 ID + const result = await createRebidding(bidding.id, userId) if (result.success) { toast({ - title: '성공', + title: result.message, description: result.message, }) router.refresh() onSuccess() } else { toast({ - title: '오류', + title: result.error, description: result.error, variant: 'destructive', }) @@ -104,7 +106,7 @@ export function BiddingDetailVendorToolbarActions({ <>
{/* 상태별 액션 버튼 */} - {bidding.status === 'bidding_generated' && ( + {bidding.status === 'set_target_price' && ( + */}