summaryrefslogtreecommitdiff
path: root/components/signup
diff options
context:
space:
mode:
Diffstat (limited to 'components/signup')
-rw-r--r--components/signup/tech-vendor-join-form.tsx45
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}