From d15a6d7db5d27be3069eada7193840addb940ac6 Mon Sep 17 00:00:00 2001 From: Jeon Eonseok Date: Mon, 16 Dec 2024 22:10:37 +0900 Subject: [PATCH 1/7] =?UTF-8?q?docs:=20react=20hook=20form=20register=20na?= =?UTF-8?q?ming=20=EC=A0=95=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- src/components/org/naming.md | 294 +++++++++++++++++++++++++++++++++++ 2 files changed, 295 insertions(+), 1 deletion(-) create mode 100644 src/components/org/naming.md diff --git a/package.json b/package.json index 2b3d629..397cac8 100644 --- a/package.json +++ b/package.json @@ -80,4 +80,4 @@ "webpack": "^5.95.0" }, "packageManager": "yarn@4.5.0" -} \ No newline at end of file +} diff --git a/src/components/org/naming.md b/src/components/org/naming.md new file mode 100644 index 0000000..deda185 --- /dev/null +++ b/src/components/org/naming.md @@ -0,0 +1,294 @@ +# react hook form register 네이밍 + +## 공홈 탭 + +### 기수 정보 + +#### 기수 + +``` +generation +``` + +#### 기수명 + +``` +name +``` + +### 모집 일정 + +#### OB/YB 서류 접수 시작 + +``` +recruitSchedule_OB_schedule_applicationStartTime +recruitSchedule_YB_schedule_applicationStartTime +``` + +#### OB/YB 서류 접수 마감 + +``` +recruitSchedule_OB_schedule_applicationEndTime +recruitSchedule_YB_schedule_applicationEndTime +``` + +#### OB/YB 서류 결과 발표 + +``` +recruitSchedule_OB_schedule_applicationResultTime +recruitSchedule_YB_schedule_applicationResultTime +``` + +#### OB/YB 면접 시작 + +``` +recruitSchedule_OB_schedule_interviewStartTime +recruitSchedule_YB_schedule_interviewStartTime +``` + +#### OB/YB 면접 마감 + +``` +recruitSchedule_OB_schedule_interviewEndTime +recruitSchedule_YB_schedule_interviewEndTime +``` + +#### OB/YB 최종 결과 발표 + +``` +recruitSchedule_OB_schedule_finalResultTime +recruitSchedule_YB_schedule_finalResultTime +``` + +### 브랜딩 컬러 + +#### 키컬러 (메인) + +``` +brandingColor_main +``` + +#### 키컬러 (저명도) + +``` +brandingColor_low +``` + +#### 키컬러 (고명도) + +``` +brandingColor_high +``` + +#### 서브 컬러 (강조 그레이 컬러) + +``` +brandingColor_point +``` + +## 홈 탭 + +### 파트별 소개 + +#### 파트별 소개 설명 + +``` +partIntroduction기획 +... +partIntroduction서버 +``` + +### 최신 소식 + +#### 솝트의 최신 소식이 궁금하다면! + +## 소개 탭 + +### 소개탭 헤더 + +#### 이미지 + +``` +headerImageFileName +``` + +### 핵심 가치 + +#### 핵심 가치 + +``` +coreValue1.imageFileName +coreValue2.imageFileName +coreValue3.imageFileName +``` + +#### 가치 + +``` +coreValue1.value +coreValue2.value +coreValue3.value +``` + +#### 가치 설명 + +``` +coreValue1.description +coreValue2.description +coreValue3.description +``` + +### 커리큘럼 + +#### 파트별 커리큘럼 + +``` +partCurriculum.기획.0 +partCurriculum.기획.1 +... +partCurriculum.기획.7 +``` + +### 임원진 + +#### 프로필 사진 + +``` +member.회장.profileImageFileName +... +member.메이커스 팀장.profileImageFileName +member.기획.profileImageFileName +... +member.서버.profileImageFileName +``` + +#### 이름 + +``` +member.회장.name +... +member.메이커스 팀장.name +member.기획.name +... +member.서버.name +``` + +#### 소속 - optional + +``` +member.회장.affiliation +... +member.메이커스 팀장.affiliation +member.기획.affiliation +... +member.서버.affiliation +``` + +#### 한 줄 소개 + +``` +member.회장.introduction +... +member.메이커스 팀장.introduction +member.기획.introduction +... +member.서버.introduction +``` + +#### SNS - optional + +##### email + +``` +member.회장.sns.email +... +member.메이커스 팀장.sns.email +member.기획.sns.email +... +member.서버.sns.email +``` + +##### linkedin + +``` +member.회장.sns.linkedin +... +member.메이커스 팀장.sns.linkedin +member.기획.sns.linkedin +... +member.서버.sns.linkedin +``` + +##### github + +``` +member.회장.sns.github +... +member.메이커스 팀장.sns.github +member.기획.sns.github +... +member.서버.sns.github +``` + +##### behance + +``` +member.회장.sns.behance +... +member.메이커스 팀장.sns.behance +member.기획.sns.behance +... +member.서버.sns.behance +``` + +## 지원하기 탭 + +### 지원하기탭 헤더 + +#### 이미지 + +recruitHeaderImage + +### 파트별 소개 + +#### ㅇㅇ 파트는 이런 걸 배워요. + +``` +recruitPartCurriculum_기획_content +... +recruitPartCurriculum_서버_content +``` + +#### 이런 분이면 좋아요! + +``` +recruitPartCurriculum_기획_preference +... +recruitPartCurriculum_서버_preference +``` + +### 자주 묻는 질문 + +#### 질문 1 + +``` +recruitQuestion_기획_questions_0_question +recruitQuestion_기획_questions_1_question +recruitQuestion_기획_questions_2_question +... +recruitQuestion_서버_questions_0_question +recruitQuestion_서버_questions_1_question +recruitQuestion_서버_questions_2_question +``` + +#### 답변 1 + +``` +recruitQuestion_기획_questions_0_answer +recruitQuestion_기획_questions_1_answer +recruitQuestion_기획_questions_2_answer +... +recruitQuestion_서버_questions_0_answer +recruitQuestion_서버_questions_1_answer +recruitQuestion_서버_questions_2_answer +``` From 8607797ab73dc7ea9e7c6c099e3a3cf5ea9220a5 Mon Sep 17 00:00:00 2001 From: Jeon Eonseok Date: Mon, 23 Dec 2024 18:40:54 +0900 Subject: [PATCH 2/7] =?UTF-8?q?refactor:=20=EB=AA=A8=EC=A7=91=20=EA=B8=B0?= =?UTF-8?q?=EA=B0=84=20register=20=EB=84=A4=EC=9D=B4=EB=B0=8D=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CommonSection/RecruitSchedule.tsx | 9 ++- src/components/org/OrgAdmin/index.tsx | 79 ++++++++----------- src/utils/org.ts | 24 +++--- 3 files changed, 49 insertions(+), 63 deletions(-) diff --git a/src/components/org/OrgAdmin/CommonSection/RecruitSchedule.tsx b/src/components/org/OrgAdmin/CommonSection/RecruitSchedule.tsx index 94ac159..4e63454 100644 --- a/src/components/org/OrgAdmin/CommonSection/RecruitSchedule.tsx +++ b/src/components/org/OrgAdmin/CommonSection/RecruitSchedule.tsx @@ -24,6 +24,7 @@ const ScheduleInput = ({ id, label }: ScheduleInputProps) => { formState: { errors }, watch, } = useFormContext(); + const [recruitSchedule, group, time] = id.split('.'); return ( { labelText={label} id={id} type="datetime-local" - hasValue={!!watch(id)} - isError={!!errors[id]?.message} - errorMessage={errors[id]?.message as string} + hasValue={!!watch(`${recruitSchedule}.${group}.${time}`)} + isError={!!(errors as any)[recruitSchedule]?.[group]?.[time]?.message} + errorMessage={ + (errors as any)[recruitSchedule]?.[group]?.[time]?.message as string + } /> ); }; diff --git a/src/components/org/OrgAdmin/index.tsx b/src/components/org/OrgAdmin/index.tsx index 87ac5b1..d1aee9d 100644 --- a/src/components/org/OrgAdmin/index.tsx +++ b/src/components/org/OrgAdmin/index.tsx @@ -37,22 +37,24 @@ function OrgAdmin() { const { sendMutate, sendIsLoading } = useMutateSendData({ headerImageFile: getValues('headerImageFileName')?.file, - coreValueImageFile1: getValues('coreValue1.imageFileName')?.file, - coreValueImageFile2: getValues('coreValue2.imageFileName')?.file, - coreValueImageFile3: getValues('coreValue3.imageFileName')?.file, - memberImageFile1: getValues('member.회장.profileImageFileName')?.file, - memberImageFile2: getValues('member.부회장.profileImageFileName')?.file, - memberImageFile3: getValues('member.총무.profileImageFileName')?.file, - memberImageFile4: getValues('member.운영팀장.profileImageFileName')?.file, - memberImageFile5: getValues('member.미디어팀장.profileImageFileName')?.file, - memberImageFile6: getValues('member.메이커스팀장.profileImageFileName') - ?.file, - memberImageFile7: getValues('member.기획.profileImageFileName')?.file, - memberImageFile8: getValues('member.디자인.profileImageFileName')?.file, - memberImageFile9: getValues('member.안드로이드.profileImageFileName')?.file, - memberImageFile10: getValues('member.iOS.profileImageFileName')?.file, - memberImageFile11: getValues('member.웹.profileImageFileName')?.file, - memberImageFile12: getValues('member.서버.profileImageFileName')?.file, + coreValueImageFile1: getValues('coreValue1')?.imageFileName.file, + coreValueImageFile2: getValues('coreValue2')?.imageFileName.file, + coreValueImageFile3: getValues('coreValue3')?.imageFileName.file, + memberImageFile1: getValues('member')?.회장.profileImageFileName.file, + memberImageFile2: getValues('member')?.부회장.profileImageFileName.file, + memberImageFile3: getValues('member')?.총무.profileImageFileName.file, + memberImageFile4: + getValues('member')?.['운영 팀장']?.profileImageFileName.file, + memberImageFile5: + getValues('member')?.['미디어 팀장'].profileImageFileName.file, + memberImageFile6: + getValues('member')?.['메이커스 팀장'].profileImageFileName.file, + memberImageFile7: getValues('member')?.기획.profileImageFileName.file, + memberImageFile8: getValues('member')?.디자인.profileImageFileName.file, + memberImageFile9: getValues('member')?.안드로이드.profileImageFileName.file, + memberImageFile10: getValues('member')?.iOS.profileImageFileName.file, + memberImageFile11: getValues('member')?.웹.profileImageFileName.file, + memberImageFile12: getValues('member')?.서버.profileImageFileName.file, recruitHeaderImageFile: getValues('recruitHeaderImage')?.file, }); @@ -183,18 +185,7 @@ function OrgAdmin() { recruitQuestion_웹_questions_1_question, recruitQuestion_웹_questions_2_answer, recruitQuestion_웹_questions_2_question, - recruitSchedule_OB_schedule_applicationEndTime, - recruitSchedule_OB_schedule_applicationResultTime, - recruitSchedule_OB_schedule_applicationStartTime, - recruitSchedule_OB_schedule_finalResultTime, - recruitSchedule_OB_schedule_interviewEndTime, - recruitSchedule_OB_schedule_interviewStartTime, - recruitSchedule_YB_schedule_applicationEndTime, - recruitSchedule_YB_schedule_applicationResultTime, - recruitSchedule_YB_schedule_applicationStartTime, - recruitSchedule_YB_schedule_finalResultTime, - recruitSchedule_YB_schedule_interviewEndTime, - recruitSchedule_YB_schedule_interviewStartTime, + recruitSchedule, headerImageFileName, coreValue1, coreValue2, @@ -211,31 +202,23 @@ function OrgAdmin() { { type: 'OB', schedule: { - applicationStartTime: - recruitSchedule_OB_schedule_applicationStartTime, - applicationEndTime: - recruitSchedule_OB_schedule_applicationEndTime, - applicationResultTime: - recruitSchedule_OB_schedule_applicationResultTime, - interviewStartTime: - recruitSchedule_OB_schedule_interviewStartTime, - interviewEndTime: recruitSchedule_OB_schedule_interviewEndTime, - finalResultTime: recruitSchedule_OB_schedule_finalResultTime, + applicationStartTime: recruitSchedule.OB.applicationStartTime, + applicationEndTime: recruitSchedule.OB.applicationEndTime, + applicationResultTime: recruitSchedule.OB.applicationResultTime, + interviewStartTime: recruitSchedule.OB.interviewStartTime, + interviewEndTime: recruitSchedule.OB.interviewEndTime, + finalResultTime: recruitSchedule.OB.finalResultTime, }, }, { type: 'YB', schedule: { - applicationStartTime: - recruitSchedule_YB_schedule_applicationStartTime, - applicationEndTime: - recruitSchedule_YB_schedule_applicationEndTime, - applicationResultTime: - recruitSchedule_YB_schedule_applicationResultTime, - interviewStartTime: - recruitSchedule_YB_schedule_interviewStartTime, - interviewEndTime: recruitSchedule_YB_schedule_interviewEndTime, - finalResultTime: recruitSchedule_YB_schedule_finalResultTime, + applicationStartTime: recruitSchedule.YB.applicationStartTime, + applicationEndTime: recruitSchedule.YB.applicationEndTime, + applicationResultTime: recruitSchedule.YB.applicationResultTime, + interviewStartTime: recruitSchedule.YB.interviewStartTime, + interviewEndTime: recruitSchedule.YB.interviewEndTime, + finalResultTime: recruitSchedule.YB.finalResultTime, }, }, ], diff --git a/src/utils/org.ts b/src/utils/org.ts index d8f2e3e..3693afa 100644 --- a/src/utils/org.ts +++ b/src/utils/org.ts @@ -47,31 +47,31 @@ export const SCHEDULE_FIELDS = { OB: { application: [ { - id: 'recruitSchedule_OB_schedule_applicationStartTime', + id: 'recruitSchedule.OB.applicationStartTime', label: 'OB 서류 접수 시작', }, { - id: 'recruitSchedule_OB_schedule_applicationEndTime', + id: 'recruitSchedule.OB.applicationEndTime', label: 'OB 서류 접수 마감', }, { - id: 'recruitSchedule_OB_schedule_applicationResultTime', + id: 'recruitSchedule.OB.applicationResultTime', label: 'OB 서류 결과 발표', }, ], interview: [ { - id: 'recruitSchedule_OB_schedule_interviewStartTime', + id: 'recruitSchedule.OB.interviewStartTime', label: 'OB 면접 시작', }, { - id: 'recruitSchedule_OB_schedule_interviewEndTime', + id: 'recruitSchedule.OB.interviewEndTime', label: 'OB 면접 마감', }, ], final: [ { - id: 'recruitSchedule_OB_schedule_finalResultTime', + id: 'recruitSchedule.OB.finalResultTime', label: 'OB 최종 결과 발표', }, ], @@ -79,31 +79,31 @@ export const SCHEDULE_FIELDS = { YB: { application: [ { - id: 'recruitSchedule_YB_schedule_applicationStartTime', + id: 'recruitSchedule.YB.applicationStartTime', label: 'YB 서류 접수 시작', }, { - id: 'recruitSchedule_YB_schedule_applicationEndTime', + id: 'recruitSchedule.YB.applicationEndTime', label: 'YB 서류 접수 마감', }, { - id: 'recruitSchedule_YB_schedule_applicationResultTime', + id: 'recruitSchedule.YB.applicationResultTime', label: 'YB 서류 결과 발표', }, ], interview: [ { - id: 'recruitSchedule_YB_schedule_interviewStartTime', + id: 'recruitSchedule.YB.interviewStartTime', label: 'YB 면접 시작', }, { - id: 'recruitSchedule_YB_schedule_interviewEndTime', + id: 'recruitSchedule.YB.interviewEndTime', label: 'YB 면접 마감', }, ], final: [ { - id: 'recruitSchedule_YB_schedule_finalResultTime', + id: 'recruitSchedule.YB.finalResultTime', label: 'YB 최종 결과 발표', }, ], From e6ca49f3d20a540a1f65049401a817b9912919c3 Mon Sep 17 00:00:00 2001 From: Jeon Eonseok Date: Mon, 23 Dec 2024 20:10:18 +0900 Subject: [PATCH 3/7] =?UTF-8?q?refactor:=20recruit=20part=20curriculum=20?= =?UTF-8?q?=20register=20=EB=84=A4=EC=9D=B4=EB=B0=8D=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../RecruitSection/PartCurriculum.tsx | 24 +++---- src/components/org/OrgAdmin/index.tsx | 62 +++---------------- 2 files changed, 19 insertions(+), 67 deletions(-) diff --git a/src/components/org/OrgAdmin/RecruitSection/PartCurriculum.tsx b/src/components/org/OrgAdmin/RecruitSection/PartCurriculum.tsx index dc5ca3e..6b8ac31 100644 --- a/src/components/org/OrgAdmin/RecruitSection/PartCurriculum.tsx +++ b/src/components/org/OrgAdmin/RecruitSection/PartCurriculum.tsx @@ -37,7 +37,7 @@ const PartCurriculum = ({ /> { if (e.currentTarget.value) { - clearErrors(`recruitPartCurriculum_${curriculumPart}_content`); + clearErrors(`recruitPartCurriculum.${curriculumPart}.content`); } else { - setError(`recruitPartCurriculum_${curriculumPart}_content`, { + setError(`recruitPartCurriculum.${curriculumPart}.content`, { type: 'required', message: VALIDATION_CHECK.required.errorText, }); } }} isError={ - errors[`recruitPartCurriculum_${curriculumPart}_content`] - ?.message != undefined + !!(errors as any).recruitPartCurriculum?.[curriculumPart]?.content + ?.message } errorMessage={ - errors[`recruitPartCurriculum_${curriculumPart}_content`] + (errors as any).recruitPartCurriculum?.[curriculumPart]?.content ?.message as string } /> { if (e.currentTarget.value) { - clearErrors(`recruitPartCurriculum_${curriculumPart}_preference`); + clearErrors(`recruitPartCurriculum.${curriculumPart}.preference`); } else { - setError(`recruitPartCurriculum_${curriculumPart}_preference`, { + setError(`recruitPartCurriculum.${curriculumPart}.preference`, { type: 'required', message: VALIDATION_CHECK.required.errorText, }); } }} isError={ - errors[`recruitPartCurriculum_${curriculumPart}_preference`] - ?.message != undefined + !!(errors as any).recruitPartCurriculum?.[curriculumPart] + ?.preference?.message } errorMessage={ - errors[`recruitPartCurriculum_${curriculumPart}_preference`] + (errors as any).recruitPartCurriculum?.[curriculumPart]?.preference ?.message as string } /> diff --git a/src/components/org/OrgAdmin/index.tsx b/src/components/org/OrgAdmin/index.tsx index d1aee9d..2a94fc6 100644 --- a/src/components/org/OrgAdmin/index.tsx +++ b/src/components/org/OrgAdmin/index.tsx @@ -137,18 +137,7 @@ function OrgAdmin() { generation, name, recruitHeaderImage: { fileName: recruitHeaderImageFileName }, - recruitPartCurriculum_iOS_content, - recruitPartCurriculum_iOS_preference, - recruitPartCurriculum_기획_content, - recruitPartCurriculum_기획_preference, - recruitPartCurriculum_디자인_content, - recruitPartCurriculum_디자인_preference, - recruitPartCurriculum_서버_content, - recruitPartCurriculum_서버_preference, - recruitPartCurriculum_안드로이드_content, - recruitPartCurriculum_안드로이드_preference, - recruitPartCurriculum_웹_content, - recruitPartCurriculum_웹_preference, + recruitPartCurriculum, recruitQuestion_iOS_questions_0_answer, recruitQuestion_iOS_questions_0_question, recruitQuestion_iOS_questions_1_answer, @@ -279,50 +268,13 @@ function OrgAdmin() { }; }), recruitHeaderImageFileName, - recruitPartCurriculum: [ - { - part: '기획', - introduction: { - content: recruitPartCurriculum_기획_content, - preference: recruitPartCurriculum_기획_preference, - }, - }, - { - part: '디자인', - introduction: { - content: recruitPartCurriculum_디자인_content, - preference: recruitPartCurriculum_디자인_preference, - }, - }, - { - part: '안드로이드', - introduction: { - content: recruitPartCurriculum_안드로이드_content, - preference: recruitPartCurriculum_안드로이드_preference, - }, - }, - { - part: 'iOS', - introduction: { - content: recruitPartCurriculum_iOS_content, - preference: recruitPartCurriculum_iOS_preference, - }, - }, - { - part: '웹', - introduction: { - content: recruitPartCurriculum_웹_content, - preference: recruitPartCurriculum_웹_preference, - }, - }, - { - part: '서버', - introduction: { - content: recruitPartCurriculum_서버_content, - preference: recruitPartCurriculum_서버_preference, - }, + recruitPartCurriculum: PART_LIST.map((v) => ({ + part: v, + introduction: { + content: recruitPartCurriculum.v.content, + preference: recruitPartCurriculum.v.preference, }, - ], + })), recruitQuestion: [ { part: '기획', From cea9141394380e2535af40192ed6d2acf009251a Mon Sep 17 00:00:00 2001 From: Jeon Eonseok Date: Mon, 23 Dec 2024 20:23:03 +0900 Subject: [PATCH 4/7] =?UTF-8?q?refactor:=20recruit=20questions=20register?= =?UTF-8?q?=20=EB=84=A4=EC=9D=B4=EB=B0=8D=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../org/OrgAdmin/RecruitSection/Fna.tsx | 35 ++-- src/components/org/OrgAdmin/index.tsx | 149 ++---------------- 2 files changed, 24 insertions(+), 160 deletions(-) diff --git a/src/components/org/OrgAdmin/RecruitSection/Fna.tsx b/src/components/org/OrgAdmin/RecruitSection/Fna.tsx index 3052652..9ee1cbd 100644 --- a/src/components/org/OrgAdmin/RecruitSection/Fna.tsx +++ b/src/components/org/OrgAdmin/RecruitSection/Fna.tsx @@ -49,12 +49,9 @@ const Fna = ({ fnaPart, onChangeFnaPart }: FnaProps) => { {QUESTION_NUMBERS.map((index) => ( { placeholder="질문을 입력해주세요." onChange={(e) => handleValidation( - `recruitQuestion_${fnaPart}_questions_${index}_question`, + `recruitQuestion.${fnaPart}.question${index}`, e.currentTarget.value, ) } isError={ - !!errors[ - `recruitQuestion_${fnaPart}_questions_${index}_question` - ] + !!(errors as any).recruitQuestion?.[fnaPart]?.[ + `question${index}` + ]?.message } errorMessage={ - errors[`recruitQuestion_${fnaPart}_questions_${index}_question`] + (errors as any).recruitQuestion?.[fnaPart]?.[`question${index}`] ?.message as string } /> handleValidation( - `recruitQuestion_${fnaPart}_questions_${index}_answer`, + `recruitQuestion.${fnaPart}.answer${index}`, e.currentTarget.value, ) } isError={ - !!errors[`recruitQuestion_${fnaPart}_questions_${index}_answer`] + !!(errors as any).recruitQuestion?.[fnaPart]?.[`answer${index}`] + ?.message } errorMessage={ - errors[`recruitQuestion_${fnaPart}_questions_${index}_answer`] + (errors as any).recruitQuestion?.[fnaPart]?.[`answer${index}`] ?.message as string } /> diff --git a/src/components/org/OrgAdmin/index.tsx b/src/components/org/OrgAdmin/index.tsx index 2a94fc6..3411411 100644 --- a/src/components/org/OrgAdmin/index.tsx +++ b/src/components/org/OrgAdmin/index.tsx @@ -138,42 +138,7 @@ function OrgAdmin() { name, recruitHeaderImage: { fileName: recruitHeaderImageFileName }, recruitPartCurriculum, - recruitQuestion_iOS_questions_0_answer, - recruitQuestion_iOS_questions_0_question, - recruitQuestion_iOS_questions_1_answer, - recruitQuestion_iOS_questions_1_question, - recruitQuestion_iOS_questions_2_answer, - recruitQuestion_iOS_questions_2_question, - recruitQuestion_기획_questions_0_answer, - recruitQuestion_기획_questions_0_question, - recruitQuestion_기획_questions_1_answer, - recruitQuestion_기획_questions_1_question, - recruitQuestion_기획_questions_2_answer, - recruitQuestion_기획_questions_2_question, - recruitQuestion_디자인_questions_0_answer, - recruitQuestion_디자인_questions_0_question, - recruitQuestion_디자인_questions_1_answer, - recruitQuestion_디자인_questions_1_question, - recruitQuestion_디자인_questions_2_answer, - recruitQuestion_디자인_questions_2_question, - recruitQuestion_서버_questions_0_answer, - recruitQuestion_서버_questions_0_question, - recruitQuestion_서버_questions_1_answer, - recruitQuestion_서버_questions_1_question, - recruitQuestion_서버_questions_2_answer, - recruitQuestion_서버_questions_2_question, - recruitQuestion_안드로이드_questions_0_answer, - recruitQuestion_안드로이드_questions_0_question, - recruitQuestion_안드로이드_questions_1_answer, - recruitQuestion_안드로이드_questions_1_question, - recruitQuestion_안드로이드_questions_2_answer, - recruitQuestion_안드로이드_questions_2_question, - recruitQuestion_웹_questions_0_answer, - recruitQuestion_웹_questions_0_question, - recruitQuestion_웹_questions_1_answer, - recruitQuestion_웹_questions_1_question, - recruitQuestion_웹_questions_2_answer, - recruitQuestion_웹_questions_2_question, + recruitQuestion, recruitSchedule, headerImageFileName, coreValue1, @@ -182,6 +147,7 @@ function OrgAdmin() { partCurriculum, member, } = data; + console.log(data); const 임원진 = [...임원진_LIST, ...PART_LIST]; const sendingData: AddAdminRequestDto = { @@ -275,110 +241,13 @@ function OrgAdmin() { preference: recruitPartCurriculum.v.preference, }, })), - recruitQuestion: [ - { - part: '기획', - questions: [ - { - question: recruitQuestion_기획_questions_0_question, - answer: recruitQuestion_기획_questions_0_answer, - }, - { - question: recruitQuestion_기획_questions_1_question, - answer: recruitQuestion_기획_questions_1_answer, - }, - { - question: recruitQuestion_기획_questions_2_question, - answer: recruitQuestion_기획_questions_2_answer, - }, - ], - }, - { - part: '디자인', - questions: [ - { - question: recruitQuestion_디자인_questions_0_question, - answer: recruitQuestion_디자인_questions_0_answer, - }, - { - question: recruitQuestion_디자인_questions_1_question, - answer: recruitQuestion_디자인_questions_1_answer, - }, - { - question: recruitQuestion_디자인_questions_2_question, - answer: recruitQuestion_디자인_questions_2_answer, - }, - ], - }, - { - part: '안드로이드', - questions: [ - { - question: recruitQuestion_안드로이드_questions_0_question, - answer: recruitQuestion_안드로이드_questions_0_answer, - }, - { - question: recruitQuestion_안드로이드_questions_1_question, - answer: recruitQuestion_안드로이드_questions_1_answer, - }, - { - question: recruitQuestion_안드로이드_questions_2_question, - answer: recruitQuestion_안드로이드_questions_2_answer, - }, - ], - }, - { - part: 'iOS', - questions: [ - { - question: recruitQuestion_iOS_questions_0_question, - answer: recruitQuestion_iOS_questions_0_answer, - }, - { - question: recruitQuestion_iOS_questions_1_question, - answer: recruitQuestion_iOS_questions_1_answer, - }, - { - question: recruitQuestion_iOS_questions_2_question, - answer: recruitQuestion_iOS_questions_2_answer, - }, - ], - }, - { - part: '웹', - questions: [ - { - question: recruitQuestion_웹_questions_0_question, - answer: recruitQuestion_웹_questions_0_answer, - }, - { - question: recruitQuestion_웹_questions_1_question, - answer: recruitQuestion_웹_questions_1_answer, - }, - { - question: recruitQuestion_웹_questions_2_question, - answer: recruitQuestion_웹_questions_2_answer, - }, - ], - }, - { - part: '서버', - questions: [ - { - question: recruitQuestion_서버_questions_0_question, - answer: recruitQuestion_서버_questions_0_answer, - }, - { - question: recruitQuestion_서버_questions_1_question, - answer: recruitQuestion_서버_questions_1_answer, - }, - { - question: recruitQuestion_서버_questions_2_question, - answer: recruitQuestion_서버_questions_2_answer, - }, - ], - }, - ], + recruitQuestion: PART_LIST.map((v) => ({ + part: v, + questions: [0, 1, 2].map((n) => ({ + question: `${recruitQuestion}.${v}.question${n}}`, + answer: `${recruitQuestion}.${v}.answer${n}}`, + })), + })), }; sendMutate(sendingData); From d86e91ed8c249875e732e1047b0199bf1d1bf2d7 Mon Sep 17 00:00:00 2001 From: Jeon Eonseok Date: Mon, 23 Dec 2024 20:30:10 +0900 Subject: [PATCH 5/7] =?UTF-8?q?chore:=20=EB=B6=88=ED=95=84=EC=9A=94?= =?UTF-8?q?=ED=95=9C=20=ED=8C=8C=EC=9D=BC=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/org/naming.md | 294 ----------------------------------- 1 file changed, 294 deletions(-) delete mode 100644 src/components/org/naming.md diff --git a/src/components/org/naming.md b/src/components/org/naming.md deleted file mode 100644 index deda185..0000000 --- a/src/components/org/naming.md +++ /dev/null @@ -1,294 +0,0 @@ -# react hook form register 네이밍 - -## 공홈 탭 - -### 기수 정보 - -#### 기수 - -``` -generation -``` - -#### 기수명 - -``` -name -``` - -### 모집 일정 - -#### OB/YB 서류 접수 시작 - -``` -recruitSchedule_OB_schedule_applicationStartTime -recruitSchedule_YB_schedule_applicationStartTime -``` - -#### OB/YB 서류 접수 마감 - -``` -recruitSchedule_OB_schedule_applicationEndTime -recruitSchedule_YB_schedule_applicationEndTime -``` - -#### OB/YB 서류 결과 발표 - -``` -recruitSchedule_OB_schedule_applicationResultTime -recruitSchedule_YB_schedule_applicationResultTime -``` - -#### OB/YB 면접 시작 - -``` -recruitSchedule_OB_schedule_interviewStartTime -recruitSchedule_YB_schedule_interviewStartTime -``` - -#### OB/YB 면접 마감 - -``` -recruitSchedule_OB_schedule_interviewEndTime -recruitSchedule_YB_schedule_interviewEndTime -``` - -#### OB/YB 최종 결과 발표 - -``` -recruitSchedule_OB_schedule_finalResultTime -recruitSchedule_YB_schedule_finalResultTime -``` - -### 브랜딩 컬러 - -#### 키컬러 (메인) - -``` -brandingColor_main -``` - -#### 키컬러 (저명도) - -``` -brandingColor_low -``` - -#### 키컬러 (고명도) - -``` -brandingColor_high -``` - -#### 서브 컬러 (강조 그레이 컬러) - -``` -brandingColor_point -``` - -## 홈 탭 - -### 파트별 소개 - -#### 파트별 소개 설명 - -``` -partIntroduction기획 -... -partIntroduction서버 -``` - -### 최신 소식 - -#### 솝트의 최신 소식이 궁금하다면! - -## 소개 탭 - -### 소개탭 헤더 - -#### 이미지 - -``` -headerImageFileName -``` - -### 핵심 가치 - -#### 핵심 가치 - -``` -coreValue1.imageFileName -coreValue2.imageFileName -coreValue3.imageFileName -``` - -#### 가치 - -``` -coreValue1.value -coreValue2.value -coreValue3.value -``` - -#### 가치 설명 - -``` -coreValue1.description -coreValue2.description -coreValue3.description -``` - -### 커리큘럼 - -#### 파트별 커리큘럼 - -``` -partCurriculum.기획.0 -partCurriculum.기획.1 -... -partCurriculum.기획.7 -``` - -### 임원진 - -#### 프로필 사진 - -``` -member.회장.profileImageFileName -... -member.메이커스 팀장.profileImageFileName -member.기획.profileImageFileName -... -member.서버.profileImageFileName -``` - -#### 이름 - -``` -member.회장.name -... -member.메이커스 팀장.name -member.기획.name -... -member.서버.name -``` - -#### 소속 - optional - -``` -member.회장.affiliation -... -member.메이커스 팀장.affiliation -member.기획.affiliation -... -member.서버.affiliation -``` - -#### 한 줄 소개 - -``` -member.회장.introduction -... -member.메이커스 팀장.introduction -member.기획.introduction -... -member.서버.introduction -``` - -#### SNS - optional - -##### email - -``` -member.회장.sns.email -... -member.메이커스 팀장.sns.email -member.기획.sns.email -... -member.서버.sns.email -``` - -##### linkedin - -``` -member.회장.sns.linkedin -... -member.메이커스 팀장.sns.linkedin -member.기획.sns.linkedin -... -member.서버.sns.linkedin -``` - -##### github - -``` -member.회장.sns.github -... -member.메이커스 팀장.sns.github -member.기획.sns.github -... -member.서버.sns.github -``` - -##### behance - -``` -member.회장.sns.behance -... -member.메이커스 팀장.sns.behance -member.기획.sns.behance -... -member.서버.sns.behance -``` - -## 지원하기 탭 - -### 지원하기탭 헤더 - -#### 이미지 - -recruitHeaderImage - -### 파트별 소개 - -#### ㅇㅇ 파트는 이런 걸 배워요. - -``` -recruitPartCurriculum_기획_content -... -recruitPartCurriculum_서버_content -``` - -#### 이런 분이면 좋아요! - -``` -recruitPartCurriculum_기획_preference -... -recruitPartCurriculum_서버_preference -``` - -### 자주 묻는 질문 - -#### 질문 1 - -``` -recruitQuestion_기획_questions_0_question -recruitQuestion_기획_questions_1_question -recruitQuestion_기획_questions_2_question -... -recruitQuestion_서버_questions_0_question -recruitQuestion_서버_questions_1_question -recruitQuestion_서버_questions_2_question -``` - -#### 답변 1 - -``` -recruitQuestion_기획_questions_0_answer -recruitQuestion_기획_questions_1_answer -recruitQuestion_기획_questions_2_answer -... -recruitQuestion_서버_questions_0_answer -recruitQuestion_서버_questions_1_answer -recruitQuestion_서버_questions_2_answer -``` From ac98fce0afc17149d6ddf33eea85343fefad29e6 Mon Sep 17 00:00:00 2001 From: Jeon Eonseok Date: Mon, 23 Dec 2024 20:43:47 +0900 Subject: [PATCH 6/7] =?UTF-8?q?chore:=20console=20log=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/org/OrgAdmin/index.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/components/org/OrgAdmin/index.tsx b/src/components/org/OrgAdmin/index.tsx index 3411411..389c43f 100644 --- a/src/components/org/OrgAdmin/index.tsx +++ b/src/components/org/OrgAdmin/index.tsx @@ -147,7 +147,6 @@ function OrgAdmin() { partCurriculum, member, } = data; - console.log(data); const 임원진 = [...임원진_LIST, ...PART_LIST]; const sendingData: AddAdminRequestDto = { From 28e1cb1f7cec23b23e469c4be1df0befbf676446 Mon Sep 17 00:00:00 2001 From: Jeon Eonseok Date: Mon, 23 Dec 2024 21:33:10 +0900 Subject: [PATCH 7/7] =?UTF-8?q?refactor:=20branding=20color=20register=20?= =?UTF-8?q?=EB=84=A4=EC=9D=B4=EB=B0=8D=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../org/OrgAdmin/CommonSection/BrandingColor.tsx | 6 +++--- .../org/OrgAdmin/CommonSection/BrandingSubColor.tsx | 10 +++++----- .../org/OrgAdmin/CommonSection/ColorInputField.tsx | 7 +++++-- src/components/org/OrgAdmin/index.tsx | 13 +++++-------- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/components/org/OrgAdmin/CommonSection/BrandingColor.tsx b/src/components/org/OrgAdmin/CommonSection/BrandingColor.tsx index 0870367..cac0119 100644 --- a/src/components/org/OrgAdmin/CommonSection/BrandingColor.tsx +++ b/src/components/org/OrgAdmin/CommonSection/BrandingColor.tsx @@ -22,9 +22,9 @@ const BrandingColor = () => { 다크 모드를 고려하여 선정해주세요. - - - + + + {' '} diff --git a/src/components/org/OrgAdmin/CommonSection/BrandingSubColor.tsx b/src/components/org/OrgAdmin/CommonSection/BrandingSubColor.tsx index 7a96ac9..9435adb 100644 --- a/src/components/org/OrgAdmin/CommonSection/BrandingSubColor.tsx +++ b/src/components/org/OrgAdmin/CommonSection/BrandingSubColor.tsx @@ -27,7 +27,7 @@ const BrandingSubColor = ({ setValue('brandingColor_point', e.target.value)} + value={expandHexColor(watch('brandingColor.point'))} + onChange={(e) => setValue('brandingColor.point', e.target.value)} /> diff --git a/src/components/org/OrgAdmin/CommonSection/ColorInputField.tsx b/src/components/org/OrgAdmin/CommonSection/ColorInputField.tsx index 83b85fd..204af30 100644 --- a/src/components/org/OrgAdmin/CommonSection/ColorInputField.tsx +++ b/src/components/org/OrgAdmin/CommonSection/ColorInputField.tsx @@ -18,6 +18,7 @@ const ColorInputField = ({ label, id }: ColorInputFieldProps) => { watch, setValue, } = useFormContext(); + const [brandingColor, color] = id.split('.'); return ( @@ -31,8 +32,10 @@ const ColorInputField = ({ label, id }: ColorInputFieldProps) => { type="text" maxLength={9} placeholder="ex. #ffffff" - isError={errors[id]?.message != undefined} - errorMessage={errors[id]?.message as string} + isError={!!(errors as any)[brandingColor]?.[color]?.message} + errorMessage={ + (errors as any)[brandingColor]?.[color]?.message as string + } />