From a6ebbc16958eaa1e82f721a1803aefc59c137c15 Mon Sep 17 00:00:00 2001 From: Eugene Kim <67894159+eugene028@users.noreply.github.com> Date: Wed, 4 Sep 2024 18:47:37 +0900 Subject: [PATCH] =?UTF-8?q?[Hotfix]=20=EC=8A=A4=ED=84=B0=EB=94=94=20?= =?UTF-8?q?=EC=BB=A4=EB=A6=AC=ED=81=98=EB=9F=BC=2012=EC=A3=BC=EB=A1=9C=20?= =?UTF-8?q?=EC=97=B0=EC=9E=A5,=20=EC=8A=A4=ED=84=B0=EB=94=94=20=EC=8B=A0?= =?UTF-8?q?=EC=B2=AD=20=EA=B8=B0=EA=B0=84=20=EC=9E=90=EC=9C=A0=EB=A1=AD?= =?UTF-8?q?=EA=B2=8C=20=EC=84=A0=ED=83=9D=20=EA=B0=80=EB=8A=A5=ED=95=98?= =?UTF-8?q?=EB=8F=84=EB=A1=9D=20=EC=88=98=EC=A0=95=20(#123)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: 스터디 신청 기간 및 스터디 커리큘럼 변경 * fix: 코드리뷰 반영 --- .../StudyApplyDatePick.tsx | 19 ++++--------------- .../StudyCourseSelect.tsx | 14 ++++---------- apps/admin/constants/date.ts | 0 apps/admin/constants/studyCurriculum.ts | 4 ++++ 4 files changed, 12 insertions(+), 25 deletions(-) delete mode 100644 apps/admin/constants/date.ts create mode 100644 apps/admin/constants/studyCurriculum.ts diff --git a/apps/admin/app/studies/create-study/_components/StudyBasicInformation/StudyApplyDatePick.tsx b/apps/admin/app/studies/create-study/_components/StudyBasicInformation/StudyApplyDatePick.tsx index b3b90db6..26d58863 100644 --- a/apps/admin/app/studies/create-study/_components/StudyBasicInformation/StudyApplyDatePick.tsx +++ b/apps/admin/app/studies/create-study/_components/StudyBasicInformation/StudyApplyDatePick.tsx @@ -44,20 +44,6 @@ const StudyApplyDatePick = () => { setValue("applicationEndDate", endDateString, { shouldValidate: true }); }; - const disableDateList = [ - { - from: new Date(0), - to: yesterday, - }, - ...(watch("startDate") - ? [ - { - from: studyStartDate, - to: studyStartDateYearLater, - }, - ] - : []), - ]; return ( @@ -89,9 +75,12 @@ const StudyApplyDatePick = () => { {isOpen && (
{ field.onChange(Number(selectedValue)); }} > - - - - - - - - - - + {studyCurriculumList.map(({ text, value }) => ( + + ))} )} rules={{ diff --git a/apps/admin/constants/date.ts b/apps/admin/constants/date.ts deleted file mode 100644 index e69de29b..00000000 diff --git a/apps/admin/constants/studyCurriculum.ts b/apps/admin/constants/studyCurriculum.ts new file mode 100644 index 00000000..5261fc9b --- /dev/null +++ b/apps/admin/constants/studyCurriculum.ts @@ -0,0 +1,4 @@ +export const studyCurriculumList = Array.from({ length: 12 }, (_, index) => { + const week = index + 1; + return { text: `${week}주`, value: `${week}` }; +});