From 9cda8482660a87fd98c9ee43f507d75ff75b4e23 Mon Sep 17 00:00:00 2001 From: dujinkim Date: Fri, 28 Nov 2025 03:12:57 +0000 Subject: (최겸) 구매 입찰 피드백 반영(90%) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bidding/create/bidding-create-dialog.tsx | 451 ++++++++++++++------- 1 file changed, 303 insertions(+), 148 deletions(-) (limited to 'components/bidding/create/bidding-create-dialog.tsx') diff --git a/components/bidding/create/bidding-create-dialog.tsx b/components/bidding/create/bidding-create-dialog.tsx index f298721b..bb7880f5 100644 --- a/components/bidding/create/bidding-create-dialog.tsx +++ b/components/bidding/create/bidding-create-dialog.tsx @@ -2,7 +2,7 @@ import * as React from 'react' import { UseFormReturn } from 'react-hook-form' -import { ChevronRight, Upload, FileText, Eye, User, Building, Calendar, DollarSign, Plus } from 'lucide-react' +import { ChevronRight, Upload, FileText, Eye, User, Building, Calendar, DollarSign, Plus, Check, ChevronsUpDown } from 'lucide-react' import { toast } from 'sonner' import { Button } from '@/components/ui/button' @@ -26,6 +26,20 @@ import { Textarea } from '@/components/ui/textarea' import { Switch } from '@/components/ui/switch' import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card' import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle, DialogTrigger } from '@/components/ui/dialog' +import { + Command, + CommandEmpty, + CommandGroup, + CommandInput, + CommandItem, + CommandList, +} from '@/components/ui/command' +import { + Popover, + PopoverContent, + PopoverTrigger, +} from '@/components/ui/popover' +import { cn } from '@/lib/utils' import type { CreateBiddingSchema } from '@/lib/bidding/validation' import { contractTypeLabels, biddingTypeLabels, awardCountLabels, biddingNoticeTypeLabels } from '@/db/schema' @@ -589,37 +603,62 @@ export function BiddingCreateDialog({ form, onSuccess }: BiddingCreateDialogProp control={form.control} name="biddingConditions.paymentTerms" render={({ field }) => ( - + SHI 지급조건 * - - - + + + + + + + + + + + 검색 결과가 없습니다. + + {paymentTermsOptions.map((option) => ( + { + setBiddingConditions(prev => ({ + ...prev, + paymentTerms: option.code + })) + field.onChange(option.code) + }} + > + + {option.code} {option.description && `(${option.description})`} + + ))} + + + + + )} @@ -632,37 +671,62 @@ export function BiddingCreateDialog({ form, onSuccess }: BiddingCreateDialogProp control={form.control} name="biddingConditions.incoterms" render={({ field }) => ( - + SHI 인도조건 * - + + + + + + + + + + + 검색 결과가 없습니다. + + {incotermsOptions.map((option) => ( + { + setBiddingConditions(prev => ({ + ...prev, + incoterms: option.code + })) + field.onChange(option.code) + }} + > + + {option.code} {option.description && `(${option.description})`} + + ))} + + + + + )} @@ -699,31 +763,60 @@ export function BiddingCreateDialog({ form, onSuccess }: BiddingCreateDialogProp control={form.control} name="biddingConditions.taxConditions" render={({ field }) => ( - + SHI 매입부가가치세 * - - - + + + + + + + + + + + 검색 결과가 없습니다. + + {TAX_CONDITIONS.map((condition) => ( + { + setBiddingConditions(prev => ({ + ...prev, + taxConditions: condition.code + })) + field.onChange(condition.code) + }} + > + + {condition.name} + + ))} + + + + + )} @@ -733,37 +826,62 @@ export function BiddingCreateDialog({ form, onSuccess }: BiddingCreateDialogProp control={form.control} name="biddingConditions.shippingPort" render={({ field }) => ( - + SHI 선적지 - + + + + + + + + + + + 검색 결과가 없습니다. + + {shippingPlaces.map((place) => ( + { + setBiddingConditions(prev => ({ + ...prev, + shippingPort: place.code + })) + field.onChange(place.code) + }} + > + + {place.code} {place.description && `(${place.description})`} + + ))} + + + + + )} @@ -776,43 +894,68 @@ export function BiddingCreateDialog({ form, onSuccess }: BiddingCreateDialogProp control={form.control} name="biddingConditions.destinationPort" render={({ field }) => ( - + SHI 하역지 - + + + + + + + + + + + 검색 결과가 없습니다. + + {destinationPlaces.map((place) => ( + { + setBiddingConditions(prev => ({ + ...prev, + destinationPort: place.code + })) + field.onChange(place.code) + }} + > + + {place.code} {place.description && `(${place.description})`} + + ))} + + + + + )} /> - {/* ( @@ -829,6 +972,8 @@ export function BiddingCreateDialog({ form, onSuccess }: BiddingCreateDialogProp })) field.onChange(e.target.value) }} + min="1900-01-01" + max="2100-12-31" /> @@ -849,7 +994,12 @@ export function BiddingCreateDialog({ form, onSuccess }: BiddingCreateDialogProp 계약기간 시작 - + @@ -866,7 +1016,12 @@ export function BiddingCreateDialog({ form, onSuccess }: BiddingCreateDialogProp 계약기간 종료 - + -- cgit v1.2.3