From c657ef972feeafff16ab0e07cb4771f7dd141ba0 Mon Sep 17 00:00:00 2001
From: dujinkim <dujin.kim@dtsolution.co.kr>
Date: Thu, 10 Jul 2025 09:55:45 +0000
Subject: (대표님) 20250710 작업사항 - 평가 첨부, 로그인, SEDP 변경 요구사항
 반영
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 components/signup/join-form.tsx | 71 ++++++++++++++++++++++++++++++++++++++---
 1 file changed, 67 insertions(+), 4 deletions(-)

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

diff --git a/components/signup/join-form.tsx b/components/signup/join-form.tsx
index ecaf6bc3..60f600b9 100644
--- a/components/signup/join-form.tsx
+++ b/components/signup/join-form.tsx
@@ -100,6 +100,20 @@ const enhancedCountryArray = sortedCountryArray.map(country => ({
     : country.label
 }));
 
+// Contact task options
+const contactTaskOptions = [
+  { value: "PRESIDENT_DIRECTOR", label: "회사대표 President/Director" },
+  { value: "SALES_MANAGEMENT", label: "영업관리 Sales Management" },
+  { value: "ENGINEERING_DESIGN", label: "설계/기술 Engineering/Design" },
+  { value: "PROCUREMENT", label: "구매 Procurement" },
+  { value: "DELIVERY_CONTROL", label: "납기/출하/운송 Delivery Control" },
+  { value: "PM_MANUFACTURING", label: "PM/생산관리 PM/Manufacturing" },
+  { value: "QUALITY_MANAGEMENT", label: "품질관리 Quality Management" },
+  { value: "SHIPPING_DOC_MANAGEMENT", label: "세금계산서/납품서관리 Shipping Doc. Management" },
+  { value: "AS_MANAGEMENT", label: "A/S 관리 A/S Management" },
+  { value: "FIELD_SERVICE_ENGINEER", label: "FSE(야드작업자) Field Service Engineer" }
+];
+
 // Comprehensive list of country dial codes
 export const countryDialCodes: { [key: string]: string } = {
   AF: "+93", AL: "+355", DZ: "+213", AS: "+1-684", AD: "+376", AO: "+244",
@@ -212,11 +226,13 @@ export function JoinForm() {
       representativePhone: "",
       corporateRegistrationNumber: "",
       representativeWorkExpirence: false,
-      // contacts (no isPrimary)
+      // contacts (updated with new fields)
       contacts: [
         {
           contactName: "",
           contactPosition: "",
+          contactDepartment: "",
+          contactTask: "",
           contactEmail: "",
           contactPhone: "",
         },
@@ -802,6 +818,8 @@ export function JoinForm() {
                       addContact({
                         contactName: "",
                         contactPosition: "",
+                        contactDepartment: "",
+                        contactTask: "",
                         contactEmail: "",
                         contactPhone: "",
                       })
@@ -819,7 +837,7 @@ export function JoinForm() {
                       key={contact.id}
                       className="bg-muted/10 rounded-md p-4 space-y-4"
                     >
-                      <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4">
+                      <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4">
                         {/* contactName */}
                         <FormField
                           control={form.control}
@@ -844,7 +862,7 @@ export function JoinForm() {
                           render={({ field }) => (
                             <FormItem>
                               <FormLabel className="after:content-['*'] after:ml-0.5 after:text-red-500">
-                                직급 / 부서
+                                직급
                               </FormLabel>
                               <FormControl>
                                 <Input {...field} disabled={isSubmitting} />
@@ -854,6 +872,51 @@ export function JoinForm() {
                           )}
                         />
 
+                        {/* contactDepartment */}
+                        <FormField
+                          control={form.control}
+                          name={`contacts.${index}.contactDepartment`}
+                          render={({ field }) => (
+                            <FormItem>
+                              <FormLabel className="after:content-['*'] after:ml-0.5 after:text-red-500">
+                                부서
+                              </FormLabel>
+                              <FormControl>
+                                <Input {...field} disabled={isSubmitting} />
+                              </FormControl>
+                              <FormMessage />
+                            </FormItem>
+                          )}
+                        />
+
+                        {/* contactTask - Dropdown */}
+                        <FormField
+                          control={form.control}
+                          name={`contacts.${index}.contactTask`}
+                          render={({ field }) => (
+                            <FormItem>
+                              <FormLabel className="after:content-['*'] after:ml-0.5 after:text-red-500">
+                                담당업무
+                              </FormLabel>
+                              <Select onValueChange={field.onChange} value={field.value} disabled={isSubmitting}>
+                                <FormControl>
+                                  <SelectTrigger>
+                                    <SelectValue placeholder="담당업무를 선택하세요" />
+                                  </SelectTrigger>
+                                </FormControl>
+                                <SelectContent>
+                                  {contactTaskOptions.map((option) => (
+                                    <SelectItem key={option.value} value={option.value}>
+                                      {option.label}
+                                    </SelectItem>
+                                  ))}
+                                </SelectContent>
+                              </Select>
+                              <FormMessage />
+                            </FormItem>
+                          )}
+                        />
+
                         {/* contactEmail */}
                         <FormField
                           control={form.control}
@@ -999,7 +1062,7 @@ export function JoinForm() {
                       )}
                     />
 
-<FormField
+                    <FormField
                       control={form.control}
                       name="representativeWorkExpirence"
                       render={({ field }) => (
-- 
cgit v1.2.3

