From dcbbbea044a4fc62974b24da5f584c0da152e94a Mon Sep 17 00:00:00 2001 From: Jeon Eonseok Date: Mon, 12 Aug 2024 14:10:57 +0900 Subject: [PATCH 1/3] =?UTF-8?q?feat:=20=EC=A7=80=EC=9B=90=20=EC=8B=9C?= =?UTF-8?q?=EA=B0=84=20=EC=A2=85=EB=A3=8C=20=EC=8B=9C=20=EC=A7=80=EC=9B=90?= =?UTF-8?q?=EC=84=9C=20=EC=A0=9C=EC=B6=9C=20=EB=A7=89=EB=8A=94=20=EB=AA=A8?= =?UTF-8?q?=EB=8B=AC=EC=B0=BD=20=EC=83=9D=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dialogs/PreventApplyDialog/index.tsx | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 src/views/dialogs/PreventApplyDialog/index.tsx diff --git a/src/views/dialogs/PreventApplyDialog/index.tsx b/src/views/dialogs/PreventApplyDialog/index.tsx new file mode 100644 index 00000000..4bfeb1c3 --- /dev/null +++ b/src/views/dialogs/PreventApplyDialog/index.tsx @@ -0,0 +1,24 @@ +import { forwardRef, type KeyboardEvent } from 'react'; + +import Dialog from '@components/Dialog'; + +import { buttonOutside, buttonWrapper, mainText } from '../style.css'; + +const PreventApplyDialog = forwardRef((_, ref) => { + const handlePreventESCKeyPress = (e: KeyboardEvent) => { + if (e.key === 'Escape') e.preventDefault(); + }; + + return ( + +

지원서 제출 기한이 지났어요.

+
+ 확인 +
+
+ ); +}); + +PreventApplyDialog.displayName = 'PreventApplyDialog'; + +export default PreventApplyDialog; From 42435b33301dea464dc364a853bb8e293a55a6cb Mon Sep 17 00:00:00 2001 From: Jeon Eonseok Date: Mon, 12 Aug 2024 14:11:16 +0900 Subject: [PATCH 2/3] =?UTF-8?q?fix:=20=EC=A7=80=EC=9B=90=20=EA=B8=B0?= =?UTF-8?q?=EA=B0=84=20=EC=A7=80=EB=82=98=EB=A9=B4=20=EC=A7=80=EC=9B=90?= =?UTF-8?q?=EC=84=9C=20=EB=B2=84=ED=8A=BC=20=EB=88=8C=EB=9F=AC=EB=8F=84=20?= =?UTF-8?q?=EC=A0=9C=EC=B6=9C=20=EC=95=88=20=EB=90=98=EB=8F=84=EB=A1=9D=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/ApplyPage/index.tsx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/views/ApplyPage/index.tsx b/src/views/ApplyPage/index.tsx index 44589005..f51d3bab 100644 --- a/src/views/ApplyPage/index.tsx +++ b/src/views/ApplyPage/index.tsx @@ -8,6 +8,7 @@ import useCheckBrowser from '@hooks/useCheckBrowser'; import useDate from '@hooks/useDate'; import useScrollToHash from '@hooks/useScrollToHash'; import { DraftDialog, SubmitDialog } from 'views/dialogs'; +import PreventApplyDialog from 'views/dialogs/PreventApplyDialog'; import NoMore from 'views/ErrorPage/components/NoMore'; import BigLoading from 'views/loadings/BigLoding'; @@ -35,6 +36,7 @@ const ApplyPage = ({ onSetComplete }: ApplyPageProps) => { useCheckBrowser(); // 크롬 브라우저 권장 알럿 const draftDialog = useRef(null); + const preventApplyDialog = useRef(null); const submitDialog = useRef(null); const sectionsRef = useRef([]); @@ -187,6 +189,12 @@ const ApplyPage = ({ onSetComplete }: ApplyPageProps) => { const commonQuestionIds = commonQuestions?.questions.map((question) => question.id); const handleSendData = (type: 'draft' | 'submit') => { + if (NoMoreApply) { + preventApplyDialog.current?.showModal(); + + return; + } + const mostRecentSeason = mostRecentSeasonValue === '해당사항 없음' ? 0 : mostRecentSeasonValue; const leaveAbsence = getValues('leaveAbsence') == undefined ? undefined : getValues('leaveAbsence') === '재학' ? false : true; @@ -269,6 +277,7 @@ const ApplyPage = ({ onSetComplete }: ApplyPageProps) => { return ( + Date: Mon, 12 Aug 2024 14:14:01 +0900 Subject: [PATCH 3/3] =?UTF-8?q?fix:=20=EB=AA=A8=EB=8B=AC=20=EB=B2=84?= =?UTF-8?q?=ED=8A=BC=20=EB=94=94=EC=9E=90=EC=9D=B8=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/dialogs/PreventApplyDialog/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/dialogs/PreventApplyDialog/index.tsx b/src/views/dialogs/PreventApplyDialog/index.tsx index 4bfeb1c3..93c482b4 100644 --- a/src/views/dialogs/PreventApplyDialog/index.tsx +++ b/src/views/dialogs/PreventApplyDialog/index.tsx @@ -2,7 +2,7 @@ import { forwardRef, type KeyboardEvent } from 'react'; import Dialog from '@components/Dialog'; -import { buttonOutside, buttonWrapper, mainText } from '../style.css'; +import { buttonInside, buttonOutside, buttonWrapper, mainText } from '../style.css'; const PreventApplyDialog = forwardRef((_, ref) => { const handlePreventESCKeyPress = (e: KeyboardEvent) => { @@ -13,7 +13,7 @@ const PreventApplyDialog = forwardRef((_, ref) => {

지원서 제출 기한이 지났어요.

- 확인 +
);