From b7917faa559d78300b399de4cf1b5547d4a89c99 Mon Sep 17 00:00:00 2001 From: minbo Date: Thu, 29 Aug 2024 17:34:41 +0900 Subject: [PATCH 1/5] =?UTF-8?q?refactor:=20=EC=8B=A0=EC=9E=85=20=EB=AA=A8?= =?UTF-8?q?=EC=A7=91=20=EB=A7=88=EA=B0=90=20=EB=82=A0=EC=A7=9C=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 --- frontend/src/constants/application/28.ts | 4 ++++ frontend/src/hooks/useApplication.tsx | 13 ++++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/frontend/src/constants/application/28.ts b/frontend/src/constants/application/28.ts index 2db9ff5f..af528a44 100644 --- a/frontend/src/constants/application/28.ts +++ b/frontend/src/constants/application/28.ts @@ -199,8 +199,12 @@ export const APPLICATION_TIMELINE: ApplicationTimeline = { * @property {date}: 1차 모집 마감 날짜 (1-31) */ export const END_DATE = { + year: 2024, month: 9, date: 15, + hours: 15, + minutes: 0, + seconds: 0, }; /** diff --git a/frontend/src/hooks/useApplication.tsx b/frontend/src/hooks/useApplication.tsx index f6f5fe1c..d54c6c1c 100644 --- a/frontend/src/hooks/useApplication.tsx +++ b/frontend/src/hooks/useApplication.tsx @@ -17,6 +17,7 @@ import { applicationDataAtom, applicationIndexAtom, } from "../stores/application"; +import { END_DATE } from "../constants/application/28"; export const useApplication = () => { // TODO: 질문의 이름마다 side effect가 있으니 주의하면 좋을 것 @@ -84,7 +85,17 @@ export const useApplication = () => { ) => { const isSend = confirm("지원서를 제출하시겠습니까?"); if (!isSend) return false; - if (Date.now() > Date.UTC(2024, 2, 15, 15, 0, 0)) { + if ( + Date.now() > + Date.UTC( + END_DATE.year, + END_DATE.month - 1, + END_DATE.date, + END_DATE.hours, + END_DATE.minutes, + END_DATE.seconds + ) + ) { alert("지원 기간이 종료되었습니다."); return false; } From 75a08744ca19faeeab50c686943710e6a29449ea Mon Sep 17 00:00:00 2001 From: minbo Date: Sat, 31 Aug 2024 19:11:49 +0900 Subject: [PATCH 2/5] =?UTF-8?q?docs:=20JS=20Doc=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/constants/application/28.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/frontend/src/constants/application/28.ts b/frontend/src/constants/application/28.ts index af528a44..11f5c4df 100644 --- a/frontend/src/constants/application/28.ts +++ b/frontend/src/constants/application/28.ts @@ -195,8 +195,12 @@ export const APPLICATION_TIMELINE: ApplicationTimeline = { /** * @description 개인정보 수집에 대한 1차 모집 마감일 상수 데이터 - * @property {month}: 1차 모집 마감 달 (1-12) - * @property {date}: 1차 모집 마감 날짜 (1-31) + * @property {number} year - 1차 모집 마감 연도 + * @property {number} month - 1차 모집 마감 달 (1-12) + * @property {number} date - 1차 모집 마감 날짜 (1-31) + * @property {number} hours - 1차 모집 마감 시간(시) (0-23) + * @property {number} minutes - 1차 모집 마감 시간(분) (0-59) + * @property {number} seconds - 1차 모집 마감 시간(초) (0-59) */ export const END_DATE = { year: 2024, From 02b41d7780a76a072f19dcbd604f207e922eab3a Mon Sep 17 00:00:00 2001 From: minbo Date: Sat, 31 Aug 2024 19:37:20 +0900 Subject: [PATCH 3/5] =?UTF-8?q?refactor:=20END=5FDATE=EB=A5=BC=20=EB=B6=88?= =?UTF-8?q?=EB=9F=AC=EC=98=A4=EB=8A=94=20import=20=EA=B5=AC=EB=AC=B8?= =?UTF-8?q?=EC=9D=84=20=EB=8F=99=EC=A0=81=20import=EB=A1=9C=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/hooks/useApplication.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frontend/src/hooks/useApplication.tsx b/frontend/src/hooks/useApplication.tsx index d54c6c1c..b95c7857 100644 --- a/frontend/src/hooks/useApplication.tsx +++ b/frontend/src/hooks/useApplication.tsx @@ -17,13 +17,16 @@ import { applicationDataAtom, applicationIndexAtom, } from "../stores/application"; -import { END_DATE } from "../constants/application/28"; export const useApplication = () => { // TODO: 질문의 이름마다 side effect가 있으니 주의하면 좋을 것 const setApplicationIndex = useSetAtom(applicationIndexAtom); const applicationData = useAtomValue(applicationDataAtom); + const { + END_DATE, + } = require(`@/src/constants/application/${CURRENT_GENERATION}.ts`); + const canApplicationNext = (applicationNames: Array) => { const nonValidatedQuestion = applicationNames .map((name) => { From 1b3b6d1036d43789f0104bf9b542c7bea93dfd77 Mon Sep 17 00:00:00 2001 From: minbo Date: Sat, 31 Aug 2024 20:44:24 +0900 Subject: [PATCH 4/5] =?UTF-8?q?refactor:=20UTC=20=EC=8B=9C=EA=B0=84?= =?UTF-8?q?=EC=9D=84=20=EA=B3=A0=EB=A0=A4=ED=95=98=EC=97=AC=20=EC=8B=9C?= =?UTF-8?q?=EA=B0=84=20=EC=A1=B0=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/hooks/useApplication.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/hooks/useApplication.tsx b/frontend/src/hooks/useApplication.tsx index b95c7857..931221cf 100644 --- a/frontend/src/hooks/useApplication.tsx +++ b/frontend/src/hooks/useApplication.tsx @@ -94,7 +94,7 @@ export const useApplication = () => { END_DATE.year, END_DATE.month - 1, END_DATE.date, - END_DATE.hours, + END_DATE.hours - 9, END_DATE.minutes, END_DATE.seconds ) From 5fd8c2a6b662d23d808f6e056aee07cc6c12e521 Mon Sep 17 00:00:00 2001 From: minbo Date: Sat, 31 Aug 2024 20:45:16 +0900 Subject: [PATCH 5/5] =?UTF-8?q?refactor:=201=EC=B0=A8=20=EB=AA=A8=EC=A7=91?= =?UTF-8?q?=20=EA=B8=B0=EA=B0=84=20=EB=82=A0=EC=A7=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/constants/application/28.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/src/constants/application/28.ts b/frontend/src/constants/application/28.ts index 11f5c4df..3856e5cc 100644 --- a/frontend/src/constants/application/28.ts +++ b/frontend/src/constants/application/28.ts @@ -206,9 +206,9 @@ export const END_DATE = { year: 2024, month: 9, date: 15, - hours: 15, - minutes: 0, - seconds: 0, + hours: 23, + minutes: 59, + seconds: 59, }; /**