summaryrefslogtreecommitdiff
path: root/lib/bidding/list/create-bidding-dialog.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'lib/bidding/list/create-bidding-dialog.tsx')
-rw-r--r--lib/bidding/list/create-bidding-dialog.tsx650
1 files changed, 304 insertions, 346 deletions
diff --git a/lib/bidding/list/create-bidding-dialog.tsx b/lib/bidding/list/create-bidding-dialog.tsx
index e99ac06f..50246f58 100644
--- a/lib/bidding/list/create-bidding-dialog.tsx
+++ b/lib/bidding/list/create-bidding-dialog.tsx
@@ -126,7 +126,7 @@ interface PRItemInfo {
}
// 탭 순서 정의
-const TAB_ORDER = ["basic", "contract", "schedule", "conditions", "details", "manager"] as const
+const TAB_ORDER = ["basic", "schedule", "details", "manager"] as const
type TabType = typeof TAB_ORDER[number]
export function CreateBiddingDialog() {
@@ -184,11 +184,11 @@ export function CreateBiddingDialog() {
// 파일 첨부를 위해 선택된 아이템 ID
const [selectedItemForFile, setSelectedItemForFile] = React.useState<string | null>(null)
- // 입찰 조건 상태
+ // 입찰 조건 상태 (기본값 설정 포함)
const [biddingConditions, setBiddingConditions] = React.useState({
- paymentTerms: "",
- taxConditions: "",
- incoterms: "",
+ paymentTerms: "", // 초기값 빈값, 데이터 로드 후 설정
+ taxConditions: "", // 초기값 빈값, 데이터 로드 후 설정
+ incoterms: "", // 초기값 빈값, 데이터 로드 후 설정
contractDeliveryDate: "",
shippingPort: "",
destinationPort: "",
@@ -202,26 +202,49 @@ export function CreateBiddingDialog() {
try {
const data = await getPaymentTermsForSelection();
setPaymentTermsOptions(data);
+ // 기본값 설정 로직: P008이 있으면 P008로, 없으면 첫 번째 항목으로 설정
+ const setDefaultPaymentTerms = () => {
+ const p008Exists = data.some(item => item.code === "P008");
+ if (p008Exists) {
+ setBiddingConditions(prev => ({ ...prev, paymentTerms: "P008" }));
+ }
+ };
+
+ setDefaultPaymentTerms();
} catch (error) {
console.error("Failed to load payment terms:", error);
toast.error("결제조건 목록을 불러오는데 실패했습니다.");
+ // 에러 시 기본값 초기화
+ if (biddingConditions.paymentTerms === "P008") {
+ setBiddingConditions(prev => ({ ...prev, paymentTerms: "" }));
+ }
} finally {
setProcurementLoading(false);
}
- }, []);
+ }, [biddingConditions.paymentTerms]);
const loadIncoterms = React.useCallback(async () => {
setProcurementLoading(true);
try {
const data = await getIncotermsForSelection();
setIncotermsOptions(data);
+
+ // 기본값 설정 로직: DAP가 있으면 DAP로, 없으면 첫 번째 항목으로 설정
+ const setDefaultIncoterms = () => {
+ const dapExists = data.some(item => item.code === "DAP");
+ if (dapExists) {
+ setBiddingConditions(prev => ({ ...prev, incoterms: "DAP" }));
+ }
+ };
+
+ setDefaultIncoterms();
} catch (error) {
console.error("Failed to load incoterms:", error);
toast.error("운송조건 목록을 불러오는데 실패했습니다.");
} finally {
setProcurementLoading(false);
}
- }, []);
+ }, [biddingConditions.incoterms]);
const loadShippingPlaces = React.useCallback(async () => {
setProcurementLoading(true);
@@ -249,13 +272,19 @@ export function CreateBiddingDialog() {
}
}, []);
- // 다이얼로그 열릴 때 procurement 데이터 로드
+ // 다이얼로그 열릴 때 procurement 데이터 로드 및 기본값 설정
React.useEffect(() => {
if (open) {
loadPaymentTerms();
loadIncoterms();
loadShippingPlaces();
loadDestinationPlaces();
+
+ // 세금조건 기본값 설정 (V1이 있는지 확인하고 설정)
+ const v1Exists = TAX_CONDITIONS.some(item => item.code === "V1");
+ if (v1Exists) {
+ setBiddingConditions(prev => ({ ...prev, taxConditions: "V1" }));
+ }
}
}, [open, loadPaymentTerms, loadIncoterms, loadShippingPlaces, loadDestinationPlaces])
@@ -294,6 +323,7 @@ export function CreateBiddingDialog() {
contractType: "general",
biddingType: "equipment",
+ biddingTypeCustom: "",
awardCount: "single",
contractStartDate: "",
contractEndDate: "",
@@ -344,10 +374,8 @@ export function CreateBiddingDialog() {
return {
basic: {
- isValid: formValues.projectId > 0 &&
- formValues.itemName.trim() !== "" &&
- formValues.title.trim() !== "",
- hasErrors: !!(formErrors.projectId || formErrors.itemName || formErrors.title)
+ isValid: formValues.title.trim() !== "",
+ hasErrors: !!(formErrors.title)
},
contract: {
isValid: formValues.contractType &&
@@ -399,11 +427,18 @@ export function CreateBiddingDialog() {
return representativeItem?.prNumber || ""
}, [prItems])
- // hasPrDocument 필드와 prNumber를 자동으로 업데이트
+ // 대표 품목명 자동 계산 (첫 번째 PR 아이템의 itemInfo)
+ const representativeItemName = React.useMemo(() => {
+ const representativeItem = prItems.find(item => item.isRepresentative)
+ return representativeItem?.itemInfo || ""
+ }, [prItems])
+
+ // hasPrDocument 필드와 prNumber, itemName을 자동으로 업데이트
React.useEffect(() => {
form.setValue("hasPrDocument", hasPrDocuments)
form.setValue("prNumber", representativePrNumber)
- }, [hasPrDocuments, representativePrNumber, form])
+ form.setValue("itemName", representativeItemName)
+ }, [hasPrDocuments, representativePrNumber, representativeItemName, form])
@@ -525,7 +560,7 @@ export function CreateBiddingDialog() {
if (!isCurrentTabValid()) {
// 특정 탭별 에러 메시지
if (activeTab === "basic") {
- toast.error("기본 정보를 모두 입력해주세요 (프로젝트, 품목명, 입찰명)")
+ toast.error("기본 정보를 모두 입력해주세요 (품목명, 입찰명)")
} else if (activeTab === "contract") {
toast.error("계약 정보를 모두 입력해주세요")
} else if (activeTab === "schedule") {
@@ -535,7 +570,7 @@ export function CreateBiddingDialog() {
toast.error("제출 시작일시와 마감일시를 입력해주세요")
}
} else if (activeTab === "conditions") {
- toast.error("입찰 조건을 모두 입력해주세요 (지급조건, 세금조건, 운송조건, 계약납품일, 선적지, 하역지)")
+ toast.error("입찰 조건을 모두 입력해주세요 (지급조건, 세금조건, 운송조건, 계약납품일)")
} else if (activeTab === "details") {
toast.error("품목정보, 수량/단위 또는 중량/중량단위를 입력해주세요")
}
@@ -617,6 +652,7 @@ export function CreateBiddingDialog() {
content: "",
contractType: "general",
biddingType: "equipment",
+ biddingTypeCustom: "",
awardCount: "single",
contractStartDate: "",
contractEndDate: "",
@@ -625,9 +661,6 @@ export function CreateBiddingDialog() {
hasSpecificationMeeting: false,
prNumber: "",
currency: "KRW",
- budget: "",
- targetPrice: "",
- finalBidPrice: "",
status: "bidding_generated",
isPublic: false,
managerName: "",
@@ -780,20 +813,6 @@ export function CreateBiddingDialog() {
</button>
<button
type="button"
- onClick={() => setActiveTab("contract")}
- className={`relative px-3 py-2 text-sm font-medium rounded-md transition-all whitespace-nowrap flex-shrink-0 ${
- activeTab === "contract"
- ? "bg-background text-foreground shadow-sm"
- : "text-muted-foreground hover:text-foreground"
- }`}
- >
- 계약정보
- {!tabValidation.contract.isValid && (
- <span className="absolute -top-1 -right-1 h-2 w-2 bg-red-500 rounded-full"></span>
- )}
- </button>
- <button
- type="button"
onClick={() => setActiveTab("schedule")}
className={`relative px-3 py-2 text-sm font-medium rounded-md transition-all whitespace-nowrap flex-shrink-0 ${
activeTab === "schedule"
@@ -801,27 +820,13 @@ export function CreateBiddingDialog() {
: "text-muted-foreground hover:text-foreground"
}`}
>
- 일정회의
+ 입찰계획
{!tabValidation.schedule.isValid && (
<span className="absolute -top-1 -right-1 h-2 w-2 bg-red-500 rounded-full"></span>
)}
</button>
<button
type="button"
- onClick={() => setActiveTab("conditions")}
- className={`relative px-3 py-2 text-sm font-medium rounded-md transition-all whitespace-nowrap flex-shrink-0 ${
- activeTab === "conditions"
- ? "bg-background text-foreground shadow-sm"
- : "text-muted-foreground hover:text-foreground"
- }`}
- >
- 입찰조건
- {!tabValidation.conditions.isValid && (
- <span className="absolute -top-1 -right-1 h-2 w-2 bg-red-500 rounded-full"></span>
- )}
- </button>
- <button
- type="button"
onClick={() => setActiveTab("details")}
className={`relative px-3 py-2 text-sm font-medium rounded-md transition-all whitespace-nowrap flex-shrink-0 ${
activeTab === "details"
@@ -853,7 +858,7 @@ export function CreateBiddingDialog() {
<TabsContent value="basic" className="mt-0 space-y-6">
<Card>
<CardHeader>
- <CardTitle>기본 정보</CardTitle>
+ <CardTitle>기본 정보 및 계약 정보</CardTitle>
</CardHeader>
<CardContent className="space-y-6">
{/* 프로젝트 선택 */}
@@ -863,7 +868,7 @@ export function CreateBiddingDialog() {
render={({ field }) => (
<FormItem>
<FormLabel>
- 프로젝트 <span className="text-red-500">*</span>
+ 프로젝트
</FormLabel>
<FormControl>
<ProjectSelector
@@ -877,9 +882,9 @@ export function CreateBiddingDialog() {
)}
/>
- <div className="grid grid-cols-2 gap-6">
+ {/* <div className="grid grid-cols-2 gap-6"> */}
{/* 품목명 */}
- <FormField
+ {/* <FormField
control={form.control}
name="itemName"
render={({ field }) => (
@@ -896,10 +901,10 @@ export function CreateBiddingDialog() {
<FormMessage />
</FormItem>
)}
- />
+ /> */}
{/* 리비전 */}
- <FormField
+ {/* <FormField
control={form.control}
name="revision"
render={({ field }) => (
@@ -916,8 +921,8 @@ export function CreateBiddingDialog() {
<FormMessage />
</FormItem>
)}
- />
- </div>
+ /> */}
+ {/* </div> */}
{/* 입찰명 */}
<FormField
@@ -957,17 +962,8 @@ export function CreateBiddingDialog() {
</FormItem>
)}
/>
- </CardContent>
- </Card>
- </TabsContent>
- {/* 계약 정보 탭 */}
- <TabsContent value="contract" className="mt-0 space-y-6">
- <Card>
- <CardHeader>
- <CardTitle>계약 정보</CardTitle>
- </CardHeader>
- <CardContent className="space-y-6">
+ {/* 계약 정보 섹션 */}
<div className="grid grid-cols-2 gap-6">
{/* 계약구분 */}
<FormField
@@ -1024,6 +1020,28 @@ export function CreateBiddingDialog() {
</FormItem>
)}
/>
+
+ {/* 기타 입찰유형 직접입력 */}
+ {form.watch("biddingType") === "other" && (
+ <FormField
+ control={form.control}
+ name="biddingTypeCustom"
+ render={({ field }) => (
+ <FormItem>
+ <FormLabel>
+ 기타 입찰유형 <span className="text-red-500">*</span>
+ </FormLabel>
+ <FormControl>
+ <Input
+ placeholder="직접 입력하세요"
+ {...field}
+ />
+ </FormControl>
+ <FormMessage />
+ </FormItem>
+ )}
+ />
+ )}
</div>
<div className="grid grid-cols-2 gap-6">
@@ -1091,15 +1109,8 @@ export function CreateBiddingDialog() {
)}
/>
</div>
- </CardContent>
- </Card>
- <Card>
- <CardHeader>
- <CardTitle>가격 정보</CardTitle>
- </CardHeader>
- <CardContent className="space-y-6">
- {/* 통화 */}
+ {/* 통화 선택만 유지 */}
<FormField
control={form.control}
name="currency"
@@ -1126,71 +1137,204 @@ export function CreateBiddingDialog() {
)}
/>
- <div className="grid grid-cols-3 gap-6">
- {/* 예산 */}
- <FormField
- control={form.control}
- name="budget"
- render={({ field }) => (
- <FormItem>
- <FormLabel>예산</FormLabel>
- <FormControl>
- <Input
- type="number"
- step="0.01"
- placeholder="0"
- {...field}
- />
- </FormControl>
- <FormMessage />
- </FormItem>
- )}
- />
+ {/* 입찰 조건 섹션 */}
+ <Card>
+ <CardHeader>
+ <CardTitle>입찰 조건</CardTitle>
+ <p className="text-sm text-muted-foreground">
+ 벤더가 사전견적 시 참고할 입찰 조건을 설정하세요
+ </p>
+ </CardHeader>
+ <CardContent className="space-y-6">
+ <div className="grid grid-cols-2 gap-6">
+ <div className="space-y-2">
+ <label className="text-sm font-medium">
+ 지급조건 <span className="text-red-500">*</span>
+ </label>
+ <Select
+ value={biddingConditions.paymentTerms}
+ onValueChange={(value) => setBiddingConditions(prev => ({
+ ...prev,
+ paymentTerms: value
+ }))}
+ >
+ <SelectTrigger>
+ <SelectValue placeholder="지급조건 선택" />
+ </SelectTrigger>
+ <SelectContent>
+ {paymentTermsOptions.length > 0 ? (
+ paymentTermsOptions.map((option) => (
+ <SelectItem key={option.code} value={option.code}>
+ {option.code} {option.description && `(${option.description})`}
+ </SelectItem>
+ ))
+ ) : (
+ <SelectItem value="loading" disabled>
+ 데이터를 불러오는 중...
+ </SelectItem>
+ )}
+ </SelectContent>
+ </Select>
+ </div>
- {/* 내정가 */}
- <FormField
- control={form.control}
- name="targetPrice"
- render={({ field }) => (
- <FormItem>
- <FormLabel>내정가</FormLabel>
- <FormControl>
- <Input
- type="number"
- step="0.01"
- placeholder="0"
- {...field}
- />
- </FormControl>
- <FormMessage />
- </FormItem>
- )}
- />
+ <div className="space-y-2">
+ <label className="text-sm font-medium">
+ 세금조건 <span className="text-red-500">*</span>
+ </label>
+ <Select
+ value={biddingConditions.taxConditions}
+ onValueChange={(value) => setBiddingConditions(prev => ({
+ ...prev,
+ taxConditions: value
+ }))}
+ >
+ <SelectTrigger>
+ <SelectValue placeholder="세금조건 선택" />
+ </SelectTrigger>
+ <SelectContent>
+ {TAX_CONDITIONS.map((condition) => (
+ <SelectItem key={condition.code} value={condition.code}>
+ {condition.name}
+ </SelectItem>
+ ))}
+ </SelectContent>
+ </Select>
+ </div>
- {/* 최종입찰가 */}
- <FormField
- control={form.control}
- name="finalBidPrice"
- render={({ field }) => (
- <FormItem>
- <FormLabel>최종입찰가</FormLabel>
- <FormControl>
- <Input
- type="number"
- step="0.01"
- placeholder="0"
- {...field}
- />
- </FormControl>
- <FormMessage />
- </FormItem>
- )}
- />
- </div>
+ <div className="space-y-2">
+ <label className="text-sm font-medium">
+ 운송조건(인코텀즈) <span className="text-red-500">*</span>
+ </label>
+ <Select
+ value={biddingConditions.incoterms}
+ onValueChange={(value) => setBiddingConditions(prev => ({
+ ...prev,
+ incoterms: value
+ }))}
+ >
+ <SelectTrigger>
+ <SelectValue placeholder="인코텀즈 선택" />
+ </SelectTrigger>
+ <SelectContent>
+ {incotermsOptions.length > 0 ? (
+ incotermsOptions.map((option) => (
+ <SelectItem key={option.code} value={option.code}>
+ {option.code} {option.description && `(${option.description})`}
+ </SelectItem>
+ ))
+ ) : (
+ <SelectItem value="loading" disabled>
+ 데이터를 불러오는 중...
+ </SelectItem>
+ )}
+ </SelectContent>
+ </Select>
+ </div>
+
+ <div className="space-y-2">
+ <label className="text-sm font-medium">
+ 계약 납품일 <span className="text-red-500">*</span>
+ </label>
+ <Input
+ type="date"
+ value={biddingConditions.contractDeliveryDate}
+ onChange={(e) => setBiddingConditions(prev => ({
+ ...prev,
+ contractDeliveryDate: e.target.value
+ }))}
+ />
+ </div>
+
+ <div className="space-y-2">
+ <label className="text-sm font-medium">선적지 (선택사항)</label>
+ <Select
+ value={biddingConditions.shippingPort}
+ onValueChange={(value) => setBiddingConditions(prev => ({
+ ...prev,
+ shippingPort: value
+ }))}
+ >
+ <SelectTrigger>
+ <SelectValue placeholder="선적지 선택" />
+ </SelectTrigger>
+ <SelectContent>
+ {shippingPlaces.length > 0 ? (
+ shippingPlaces.map((place) => (
+ <SelectItem key={place.code} value={place.code}>
+ {place.code} {place.description && `(${place.description})`}
+ </SelectItem>
+ ))
+ ) : (
+ <SelectItem value="loading" disabled>
+ 데이터를 불러오는 중...
+ </SelectItem>
+ )}
+ </SelectContent>
+ </Select>
+ </div>
+
+ <div className="space-y-2">
+ <label className="text-sm font-medium">하역지 (선택사항)</label>
+ <Select
+ value={biddingConditions.destinationPort}
+ onValueChange={(value) => setBiddingConditions(prev => ({
+ ...prev,
+ destinationPort: value
+ }))}
+ >
+ <SelectTrigger>
+ <SelectValue placeholder="하역지 선택" />
+ </SelectTrigger>
+ <SelectContent>
+ {destinationPlaces.length > 0 ? (
+ destinationPlaces.map((place) => (
+ <SelectItem key={place.code} value={place.code}>
+ {place.code} {place.description && `(${place.description})`}
+ </SelectItem>
+ ))
+ ) : (
+ <SelectItem value="loading" disabled>
+ 데이터를 불러오는 중...
+ </SelectItem>
+ )}
+ </SelectContent>
+ </Select>
+ </div>
+ </div>
+
+ <div className="flex items-center space-x-2">
+ <Switch
+ id="price-adjustment"
+ checked={biddingConditions.isPriceAdjustmentApplicable}
+ onCheckedChange={(checked) => setBiddingConditions(prev => ({
+ ...prev,
+ isPriceAdjustmentApplicable: checked
+ }))}
+ />
+ <label htmlFor="price-adjustment" className="text-sm font-medium">
+ 연동제 적용 요건 문의
+ </label>
+ </div>
+
+ <div className="space-y-2">
+ <label className="text-sm font-medium">스페어파트 옵션</label>
+ <Textarea
+ placeholder="스페어파트 관련 옵션을 입력하세요"
+ value={biddingConditions.sparePartOptions}
+ onChange={(e) => setBiddingConditions(prev => ({
+ ...prev,
+ sparePartOptions: e.target.value
+ }))}
+ rows={3}
+ />
+ </div>
+ </CardContent>
+ </Card>
</CardContent>
</Card>
</TabsContent>
+
{/* 일정 & 회의 탭 */}
<TabsContent value="schedule" className="mt-0 space-y-6">
<Card>
@@ -1444,204 +1588,40 @@ export function CreateBiddingDialog() {
)}
</CardContent>
</Card>
- </TabsContent>
- {/* 입찰 조건 탭 */}
- <TabsContent value="conditions" className="mt-0 space-y-6">
+ {/* 긴급 입찰 설정 */}
<Card>
<CardHeader>
- <CardTitle>입찰 조건</CardTitle>
- <p className="text-sm text-muted-foreground">
- 벤더가 사전견적 시 참고할 입찰 조건을 설정하세요
- </p>
+ <CardTitle>긴급 입찰 설정</CardTitle>
</CardHeader>
<CardContent className="space-y-6">
- <div className="grid grid-cols-2 gap-6">
- <div className="space-y-2">
- <label className="text-sm font-medium">
- 지급조건 <span className="text-red-500">*</span>
- </label>
- <Select
- value={biddingConditions.paymentTerms}
- onValueChange={(value) => setBiddingConditions(prev => ({
- ...prev,
- paymentTerms: value
- }))}
- >
- <SelectTrigger>
- <SelectValue placeholder="지급조건 선택" />
- </SelectTrigger>
- <SelectContent>
- {paymentTermsOptions.length > 0 ? (
- paymentTermsOptions.map((option) => (
- <SelectItem key={option.code} value={option.code}>
- {option.code} {option.description && `(${option.description})`}
- </SelectItem>
- ))
- ) : (
- <SelectItem value="loading" disabled>
- 데이터를 불러오는 중...
- </SelectItem>
- )}
- </SelectContent>
- </Select>
- </div>
-
- <div className="space-y-2">
- <label className="text-sm font-medium">
- 세금조건 <span className="text-red-500">*</span>
- </label>
- <Select
- value={biddingConditions.taxConditions}
- onValueChange={(value) => setBiddingConditions(prev => ({
- ...prev,
- taxConditions: value
- }))}
- >
- <SelectTrigger>
- <SelectValue placeholder="세금조건 선택" />
- </SelectTrigger>
- <SelectContent>
- {TAX_CONDITIONS.map((condition) => (
- <SelectItem key={condition.code} value={condition.code}>
- {condition.name}
- </SelectItem>
- ))}
- </SelectContent>
- </Select>
- </div>
-
- <div className="space-y-2">
- <label className="text-sm font-medium">
- 운송조건(인코텀즈) <span className="text-red-500">*</span>
- </label>
- <Select
- value={biddingConditions.incoterms}
- onValueChange={(value) => setBiddingConditions(prev => ({
- ...prev,
- incoterms: value
- }))}
- >
- <SelectTrigger>
- <SelectValue placeholder="인코텀즈 선택" />
- </SelectTrigger>
- <SelectContent>
- {incotermsOptions.length > 0 ? (
- incotermsOptions.map((option) => (
- <SelectItem key={option.code} value={option.code}>
- {option.code} {option.description && `(${option.description})`}
- </SelectItem>
- ))
- ) : (
- <SelectItem value="loading" disabled>
- 데이터를 불러오는 중...
- </SelectItem>
- )}
- </SelectContent>
- </Select>
- </div>
-
- <div className="space-y-2">
- <label className="text-sm font-medium">
- 계약 납품일 <span className="text-red-500">*</span>
- </label>
- <Input
- type="date"
- value={biddingConditions.contractDeliveryDate}
- onChange={(e) => setBiddingConditions(prev => ({
- ...prev,
- contractDeliveryDate: e.target.value
- }))}
- />
- </div>
-
- <div className="space-y-2">
- <label className="text-sm font-medium">선적지 <span className="text-red-500">*</span></label>
- <Select
- value={biddingConditions.shippingPort}
- onValueChange={(value) => setBiddingConditions(prev => ({
- ...prev,
- shippingPort: value
- }))}
- >
- <SelectTrigger>
- <SelectValue placeholder="선적지 선택" />
- </SelectTrigger>
- <SelectContent>
- {shippingPlaces.length > 0 ? (
- shippingPlaces.map((place) => (
- <SelectItem key={place.code} value={place.code}>
- {place.code} {place.description && `(${place.description})`}
- </SelectItem>
- ))
- ) : (
- <SelectItem value="loading" disabled>
- 데이터를 불러오는 중...
- </SelectItem>
- )}
- </SelectContent>
- </Select>
- </div>
-
- <div className="space-y-2">
- <label className="text-sm font-medium">하역지 <span className="text-red-500">*</span></label>
- <Select
- value={biddingConditions.destinationPort}
- onValueChange={(value) => setBiddingConditions(prev => ({
- ...prev,
- destinationPort: value
- }))}
- >
- <SelectTrigger>
- <SelectValue placeholder="하역지 선택" />
- </SelectTrigger>
- <SelectContent>
- {destinationPlaces.length > 0 ? (
- destinationPlaces.map((place) => (
- <SelectItem key={place.code} value={place.code}>
- {place.code} {place.description && `(${place.description})`}
- </SelectItem>
- ))
- ) : (
- <SelectItem value="loading" disabled>
- 데이터를 불러오는 중...
- </SelectItem>
- )}
- </SelectContent>
- </Select>
- </div>
- </div>
-
- <div className="flex items-center space-x-2">
- <Switch
- id="price-adjustment"
- checked={biddingConditions.isPriceAdjustmentApplicable}
- onCheckedChange={(checked) => setBiddingConditions(prev => ({
- ...prev,
- isPriceAdjustmentApplicable: checked
- }))}
- />
- <label htmlFor="price-adjustment" className="text-sm font-medium">
- 연동제 적용 가능
- </label>
- </div>
-
- <div className="space-y-2">
- <label className="text-sm font-medium">스페어파트 옵션</label>
- <Textarea
- placeholder="스페어파트 관련 옵션을 입력하세요"
- value={biddingConditions.sparePartOptions}
- onChange={(e) => setBiddingConditions(prev => ({
- ...prev,
- sparePartOptions: e.target.value
- }))}
- rows={3}
- />
- </div>
+ <FormField
+ control={form.control}
+ name="isUrgent"
+ render={({ field }) => (
+ <FormItem className="flex flex-row items-center justify-between rounded-lg border p-4">
+ <div className="space-y-0.5">
+ <FormLabel className="text-base">
+ 긴급 입찰
+ </FormLabel>
+ <FormDescription>
+ 긴급 입찰 여부를 설정합니다
+ </FormDescription>
+ </div>
+ <FormControl>
+ <Switch
+ checked={field.value}
+ onCheckedChange={field.onChange}
+ />
+ </FormControl>
+ </FormItem>
+ )}
+ />
</CardContent>
</Card>
</TabsContent>
+
{/* 세부내역 탭 */}
<TabsContent value="details" className="mt-0 space-y-6">
<Card>
@@ -2029,28 +2009,6 @@ export function CreateBiddingDialog() {
)}
/>
- <FormField
- control={form.control}
- name="isUrgent"
- render={({ field }) => (
- <FormItem className="flex flex-row items-center justify-between rounded-lg border p-4">
- <div className="space-y-0.5">
- <FormLabel className="text-base">
- 긴급 입찰
- </FormLabel>
- <FormDescription>
- 긴급 입찰 여부를 설정합니다
- </FormDescription>
- </div>
- <FormControl>
- <Switch
- checked={field.value}
- onCheckedChange={field.onChange}
- />
- </FormControl>
- </FormItem>
- )}
- />
<FormField
control={form.control}
@@ -2073,7 +2031,7 @@ export function CreateBiddingDialog() {
</Card>
{/* 입찰 생성 요약 */}
- <Card>
+ {/* <Card>
<CardHeader>
<CardTitle>입찰 생성 요약</CardTitle>
</CardHeader>
@@ -2129,7 +2087,7 @@ export function CreateBiddingDialog() {
</div>
</div>
</CardContent>
- </Card>
+ </Card> */}
</TabsContent>
</div>