From 2650b7c0bb0ea12b68a58c0439f72d61df04b2f1 Mon Sep 17 00:00:00 2001
From: dujinkim <dujin.kim@dtsolution.co.kr>
Date: Fri, 25 Jul 2025 07:51:15 +0000
Subject: (대표님) 정기평가 대상, 미들웨어 수정, nextauth 토큰 처리 개선, GTC
 등 (최겸) 기술영업
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 components/signup/tech-vendor-join-form.tsx | 45 ++++++++++++++++++++++++-----
 1 file changed, 37 insertions(+), 8 deletions(-)

(limited to 'components/signup/tech-vendor-join-form.tsx')

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}
-- 
cgit v1.2.3

