diff options
| author | dujinkim <dujin.kim@dtsolution.co.kr> | 2025-09-09 10:34:05 +0000 |
|---|---|---|
| committer | dujinkim <dujin.kim@dtsolution.co.kr> | 2025-09-09 10:34:05 +0000 |
| commit | 86b1fd1cc801f45642f84d24c0b5c84368454ff0 (patch) | |
| tree | 63176d1feb6d3fbbb71d942343056ba6d793b586 /lib/bidding/pre-quote/table/bidding-pre-quote-invitation-dialog.tsx | |
| parent | c62ec046327fd388ebce04571b55910747e69a3b (diff) | |
(최겸) 구매 입찰 사전견적, 입찰, 낙찰, 유찰, 재입찰 기능 개발
Diffstat (limited to 'lib/bidding/pre-quote/table/bidding-pre-quote-invitation-dialog.tsx')
| -rw-r--r-- | lib/bidding/pre-quote/table/bidding-pre-quote-invitation-dialog.tsx | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/lib/bidding/pre-quote/table/bidding-pre-quote-invitation-dialog.tsx b/lib/bidding/pre-quote/table/bidding-pre-quote-invitation-dialog.tsx index 84824c1e..1b0598b7 100644 --- a/lib/bidding/pre-quote/table/bidding-pre-quote-invitation-dialog.tsx +++ b/lib/bidding/pre-quote/table/bidding-pre-quote-invitation-dialog.tsx @@ -3,6 +3,8 @@ import * as React from 'react' import { Button } from '@/components/ui/button' import { Checkbox } from '@/components/ui/checkbox' +import { Input } from '@/components/ui/input' +import { Label } from '@/components/ui/label' import { Dialog, DialogContent, @@ -16,7 +18,7 @@ import { BiddingCompany } from './bidding-pre-quote-vendor-columns' import { sendPreQuoteInvitations } from '../service' import { useToast } from '@/hooks/use-toast' import { useTransition } from 'react' -import { Mail, Building2 } from 'lucide-react' +import { Mail, Building2, Calendar } from 'lucide-react' interface BiddingPreQuoteInvitationDialogProps { open: boolean @@ -34,6 +36,7 @@ export function BiddingPreQuoteInvitationDialog({ const { toast } = useToast() const [isPending, startTransition] = useTransition() const [selectedCompanyIds, setSelectedCompanyIds] = React.useState<number[]>([]) + const [preQuoteDeadline, setPreQuoteDeadline] = React.useState('') // 초대 가능한 업체들 (pending 상태인 업체들) const invitableCompanies = companies.filter(company => @@ -67,7 +70,10 @@ export function BiddingPreQuoteInvitationDialog({ } startTransition(async () => { - const response = await sendPreQuoteInvitations(selectedCompanyIds) + const response = await sendPreQuoteInvitations( + selectedCompanyIds, + preQuoteDeadline || undefined + ) if (response.success) { toast({ @@ -75,6 +81,7 @@ export function BiddingPreQuoteInvitationDialog({ description: response.message, }) setSelectedCompanyIds([]) + setPreQuoteDeadline('') onOpenChange(false) onSuccess() } else { @@ -91,6 +98,7 @@ export function BiddingPreQuoteInvitationDialog({ onOpenChange(open) if (!open) { setSelectedCompanyIds([]) + setPreQuoteDeadline('') } } @@ -114,6 +122,24 @@ export function BiddingPreQuoteInvitationDialog({ </div> ) : ( <> + {/* 견적마감일 설정 */} + <div className="mb-6 p-4 border rounded-lg bg-muted/30"> + <Label htmlFor="preQuoteDeadline" className="text-sm font-medium mb-2 flex items-center gap-2"> + <Calendar className="w-4 h-4" /> + 견적 마감일 (선택사항) + </Label> + <Input + id="preQuoteDeadline" + type="datetime-local" + value={preQuoteDeadline} + onChange={(e) => setPreQuoteDeadline(e.target.value)} + className="w-full" + /> + <p className="text-xs text-muted-foreground mt-1"> + 설정하지 않으면 마감일 없이 초대가 발송됩니다. + </p> + </div> + {/* 전체 선택 */} <div className="flex items-center space-x-2 mb-4 pb-2 border-b"> <Checkbox |
