diff options
| author | dujinkim <dujin.kim@dtsolution.co.kr> | 2025-07-25 07:51:15 +0000 |
|---|---|---|
| committer | dujinkim <dujin.kim@dtsolution.co.kr> | 2025-07-25 07:51:15 +0000 |
| commit | 2650b7c0bb0ea12b68a58c0439f72d61df04b2f1 (patch) | |
| tree | 17156183fd74b69d78178065388ac61a18ac07b4 /components/signup | |
| parent | d32acea05915bd6c1ed4b95e56c41ef9204347bc (diff) | |
(대표님) 정기평가 대상, 미들웨어 수정, nextauth 토큰 처리 개선, GTC 등
(최겸) 기술영업
Diffstat (limited to 'components/signup')
| -rw-r--r-- | components/signup/tech-vendor-join-form.tsx | 45 |
1 files changed, 37 insertions, 8 deletions
diff --git a/components/signup/tech-vendor-join-form.tsx b/components/signup/tech-vendor-join-form.tsx index 4d17398d..d554079f 100644 --- a/components/signup/tech-vendor-join-form.tsx +++ b/components/signup/tech-vendor-join-form.tsx @@ -171,6 +171,8 @@ export function TechVendorJoinForm() { {
contactName: "",
contactPosition: "",
+ contactTitle: "",
+ contactCountry: "",
contactEmail: "",
contactPhone: "",
},
@@ -269,9 +271,9 @@ export function TechVendorJoinForm() { }
const isFormValid = form.formState.isValid
- // console.log("Form errors:", form.formState.errors);
- // console.log("Form values:", form.getValues());
- // console.log("Form valid:", form.formState.isValid);
+ console.log("Form errors:", form.formState.errors);
+ console.log("Form values:", form.getValues());
+ console.log("Form valid:", form.formState.isValid);
// Dropzone handlers
const handleDropAccepted = (acceptedFiles: File[]) => {
@@ -297,11 +299,11 @@ export function TechVendorJoinForm() { form.setValue("files", updated, { shouldValidate: true })
}
- const handleItemsSelected = (itemCodes: string[]) => {
- setSelectedItemCodes(itemCodes)
- // 선택된 아이템 코드들을 콤마로 구분하여 items 필드에 설정
- const itemsString = itemCodes.join(", ")
- form.setValue("items", itemsString)
+ type SelectedItem = { type: "SHIP" | "TOP" | "HULL", id: number, code: string, name: string };
+
+ const handleItemsSelected = (items: SelectedItem[]) => {
+ setSelectedItemCodes(items.map(item => item.code));
+ form.setValue("items", JSON.stringify(items));
}
// Submit
@@ -805,6 +807,33 @@ export function TechVendorJoinForm() { </FormItem>
)}
/>
+ <FormField
+ control={form.control}
+ name={`contacts.${index}.contactTitle`}
+ render={({ field }) => (
+ <FormItem>
+ <FormLabel>직위</FormLabel>
+ <FormControl>
+ <Input placeholder="직위를 입력하세요" {...field} />
+ </FormControl>
+ <FormMessage />
+ </FormItem>
+ )}
+ />
+
+ <FormField
+ control={form.control}
+ name={`contacts.${index}.contactCountry`}
+ render={({ field }) => (
+ <FormItem>
+ <FormLabel>국가</FormLabel>
+ <FormControl>
+ <Input placeholder="국가를 입력하세요" {...field} />
+ </FormControl>
+ <FormMessage />
+ </FormItem>
+ )}
+ />
<FormField
control={form.control}
|
