summaryrefslogtreecommitdiff
path: root/lib/tech-vendors/table/add-vendor-dialog.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'lib/tech-vendors/table/add-vendor-dialog.tsx')
-rw-r--r--lib/tech-vendors/table/add-vendor-dialog.tsx74
1 files changed, 28 insertions, 46 deletions
diff --git a/lib/tech-vendors/table/add-vendor-dialog.tsx b/lib/tech-vendors/table/add-vendor-dialog.tsx
index da9880d4..22c03bcc 100644
--- a/lib/tech-vendors/table/add-vendor-dialog.tsx
+++ b/lib/tech-vendors/table/add-vendor-dialog.tsx
@@ -51,6 +51,7 @@ const addVendorSchema = z.object({
representativeEmail: z.string().email("올바른 이메일 주소를 입력해주세요").optional().or(z.literal("")),
representativePhone: z.string().optional(),
representativeBirth: z.string().optional(),
+ isQuoteComparison: z.boolean().default(false),
})
type AddVendorFormData = z.infer<typeof addVendorSchema>
@@ -84,6 +85,7 @@ export function AddVendorDialog({ onSuccess }: AddVendorDialogProps) {
representativeEmail: "",
representativePhone: "",
representativeBirth: "",
+ isQuoteComparison: false,
},
})
@@ -108,6 +110,7 @@ export function AddVendorDialog({ onSuccess }: AddVendorDialogProps) {
representativePhone: data.representativePhone || null,
representativeBirth: data.representativeBirth || null,
taxId: data.taxId || "",
+ isQuoteComparison: data.isQuoteComparison,
})
if (result.success) {
@@ -238,6 +241,31 @@ export function AddVendorDialog({ onSuccess }: AddVendorDialogProps) {
</FormItem>
)}
/>
+
+ <FormField
+ control={form.control}
+ name="isQuoteComparison"
+ render={({ field }) => (
+ <FormItem className="flex flex-row items-start space-x-3 space-y-0">
+ <FormControl>
+ <input
+ type="checkbox"
+ checked={field.value}
+ onChange={field.onChange}
+ className="w-4 h-4 mt-1"
+ />
+ </FormControl>
+ <div className="space-y-1 leading-none">
+ <FormLabel className="cursor-pointer">
+ 견적비교용 벤더
+ </FormLabel>
+ <p className="text-sm text-muted-foreground">
+ 체크 시 초대 메일을 발송하고 벤더가 직접 가입할 수 있습니다.
+ </p>
+ </div>
+ </FormItem>
+ )}
+ />
</div>
{/* 연락처 정보 */}
@@ -333,52 +361,6 @@ export function AddVendorDialog({ onSuccess }: AddVendorDialogProps) {
</div>
</div>
- {/* 담당자 정보 */}
- <div className="space-y-4">
- <h3 className="text-lg font-medium">담당자 정보</h3>
- <div className="grid grid-cols-2 gap-4">
- <FormField
- control={form.control}
- name="agentName"
- render={({ field }) => (
- <FormItem>
- <FormLabel>담당자명</FormLabel>
- <FormControl>
- <Input placeholder="담당자명을 입력하세요" {...field} />
- </FormControl>
- <FormMessage />
- </FormItem>
- )}
- />
- <FormField
- control={form.control}
- name="agentPhone"
- render={({ field }) => (
- <FormItem>
- <FormLabel>담당자 전화번호</FormLabel>
- <FormControl>
- <Input placeholder="담당자 전화번호를 입력하세요" {...field} />
- </FormControl>
- <FormMessage />
- </FormItem>
- )}
- />
- </div>
- <FormField
- control={form.control}
- name="agentEmail"
- render={({ field }) => (
- <FormItem>
- <FormLabel>담당자 이메일</FormLabel>
- <FormControl>
- <Input type="email" placeholder="담당자 이메일을 입력하세요" {...field} />
- </FormControl>
- <FormMessage />
- </FormItem>
- )}
- />
- </div>
-
{/* 대표자 정보 */}
<div className="space-y-4">
<h3 className="text-lg font-medium">대표자 정보</h3>