summaryrefslogtreecommitdiff
path: root/components/vendor-regular-registrations/additional-info-dialog.tsx
diff options
context:
space:
mode:
authordujinkim <dujin.kim@dtsolution.co.kr>2025-10-27 10:28:54 +0000
committerdujinkim <dujin.kim@dtsolution.co.kr>2025-10-27 10:28:54 +0000
commit2d7c41263ee4fda0285397905884e20dec5d8a1f (patch)
tree2a992a0984611805204ff0aa0b158dc809cdf69f /components/vendor-regular-registrations/additional-info-dialog.tsx
parenta3525f8bdfcf849cc1716fab81cb8facadbe9a8e (diff)
(최겸) 구매 PQ 승인 전 재제출가능 및 vendor SHI 커뮤니케이션
Diffstat (limited to 'components/vendor-regular-registrations/additional-info-dialog.tsx')
-rw-r--r--components/vendor-regular-registrations/additional-info-dialog.tsx124
1 files changed, 98 insertions, 26 deletions
diff --git a/components/vendor-regular-registrations/additional-info-dialog.tsx b/components/vendor-regular-registrations/additional-info-dialog.tsx
index 303c6d7e..82751749 100644
--- a/components/vendor-regular-registrations/additional-info-dialog.tsx
+++ b/components/vendor-regular-registrations/additional-info-dialog.tsx
@@ -16,6 +16,14 @@ import { Button } from "@/components/ui/button";
import { Input } from "@/components/ui/input";
import { Label } from "@/components/ui/label";
import { Textarea } from "@/components/ui/textarea";
+import {
+ Select,
+ SelectContent,
+ SelectItem,
+ SelectTrigger,
+ SelectValue,
+} from "@/components/ui/select";
+import { DatePicker } from "@/components/ui/date-picker"
import {
Form,
@@ -80,6 +88,34 @@ const contactTypes = [
{ value: "tax_invoice", label: "세금계산서", required: true },
];
+// 드롭다운 옵션들
+const businessTypeOptions = [
+ "건설업외",
+ "기타숙박업외",
+ "산업기계외",
+ "선박",
+ "선박건조외",
+ "선박산업기기",
+ "임대",
+ "철구조물외"
+];
+
+const industryTypeOptions = [
+ "건설업외",
+ "부동산",
+ "산업",
+ "숙박음식",
+ "제조도매외",
+ "제조업"
+];
+
+const companySizeOptions = [
+ "소기업",
+ "중소기업",
+ "중견기업",
+ "대기업"
+];
+
export function AdditionalInfoDialog({
@@ -349,13 +385,24 @@ export function AdditionalInfoDialog({
render={({ field }) => (
<FormItem>
<FormLabel>사업유형 {!readonly && "*"}</FormLabel>
- <FormControl>
- <Input
- placeholder={readonly ? "" : "사업유형 입력"}
- readOnly={readonly}
- {...field}
- />
- </FormControl>
+ <Select
+ onValueChange={field.onChange}
+ defaultValue={field.value}
+ disabled={readonly}
+ >
+ <FormControl>
+ <SelectTrigger>
+ <SelectValue placeholder={readonly ? "" : "사업유형을 선택하세요"} />
+ </SelectTrigger>
+ </FormControl>
+ <SelectContent>
+ {businessTypeOptions.map((option) => (
+ <SelectItem key={option} value={option}>
+ {option}
+ </SelectItem>
+ ))}
+ </SelectContent>
+ </Select>
<FormMessage />
</FormItem>
)}
@@ -366,13 +413,24 @@ export function AdditionalInfoDialog({
render={({ field }) => (
<FormItem>
<FormLabel>산업유형 {!readonly && "*"}</FormLabel>
- <FormControl>
- <Input
- placeholder={readonly ? "" : "산업유형 입력"}
- readOnly={readonly}
- {...field}
- />
- </FormControl>
+ <Select
+ onValueChange={field.onChange}
+ defaultValue={field.value}
+ disabled={readonly}
+ >
+ <FormControl>
+ <SelectTrigger>
+ <SelectValue placeholder={readonly ? "" : "산업유형을 선택하세요"} />
+ </SelectTrigger>
+ </FormControl>
+ <SelectContent>
+ {industryTypeOptions.map((option) => (
+ <SelectItem key={option} value={option}>
+ {option}
+ </SelectItem>
+ ))}
+ </SelectContent>
+ </Select>
<FormMessage />
</FormItem>
)}
@@ -385,13 +443,24 @@ export function AdditionalInfoDialog({
render={({ field }) => (
<FormItem>
<FormLabel>기업규모 {!readonly && "*"}</FormLabel>
- <FormControl>
- <Input
- placeholder={readonly ? "" : "기업규모 입력"}
- readOnly={readonly}
- {...field}
- />
- </FormControl>
+ <Select
+ onValueChange={field.onChange}
+ defaultValue={field.value}
+ disabled={readonly}
+ >
+ <FormControl>
+ <SelectTrigger>
+ <SelectValue placeholder={readonly ? "" : "기업규모를 선택하세요"} />
+ </SelectTrigger>
+ </FormControl>
+ <SelectContent>
+ {companySizeOptions.map((option) => (
+ <SelectItem key={option} value={option}>
+ {option}
+ </SelectItem>
+ ))}
+ </SelectContent>
+ </Select>
<FormMessage />
</FormItem>
)}
@@ -423,11 +492,14 @@ export function AdditionalInfoDialog({
<FormItem>
<FormLabel>공장설립일 {!readonly && "*"}</FormLabel>
<FormControl>
- <Input
- placeholder={readonly ? "" : "YYYY-MM-DD"}
- type="date"
- readOnly={readonly}
- {...field}
+ {/* datepicker 라이브러리를 사용하는 방식으로 수정 (예: react-datepicker) */}
+ <DatePicker
+ date={field.value ? new Date(field.value) : undefined}
+ onSelect={(date) => {
+ field.onChange(date ? date.toISOString().slice(0, 10) : "");
+ }}
+ placeholder={readonly ? "" : "YYYY-MM-DD"}
+ disabled={readonly}
/>
</FormControl>
<FormMessage />