Skip to content

Commit

Permalink
✨feat: 지원 상태 상세 조회 기획 질문 사항 반영하기 #41
Browse files Browse the repository at this point in the history
  • Loading branch information
naarang committed Oct 25, 2024
1 parent 59a4992 commit 3c5ecc1
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const ApplicationDetailStep4 = () => {

const onClickYellowButton = () => {
// TODO: 6.13 조회
// 서류 상태? 페이지가 어디임?
window.location.reload();
};

const onClickContact = () => {
Expand Down
3 changes: 2 additions & 1 deletion src/components/ApplicationDetail/ApplicationDetailStep5.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ const ApplicationDetailStep5 = () => {
const [isShowBottomsheet, setIsShowBottomSheet] = useState<boolean>(false);

const onClickBlackButton = () => {
// TODO: 하이코리아 전자민원 신청으로 이동
window.location.href =
'https://www.hikorea.go.kr/cvlappl/CvlapplStep1.pt#this';
};

const onClickYellowButton = () => {
Expand Down
24 changes: 24 additions & 0 deletions src/components/ApplicationDetail/ApplicationDetailStepEtc.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import { APPLICATION_STEP } from '@/constants/application';
import { ApplicationStepType } from '@/types/application/applicationItem';

type ApplicationDetailStepEtcProps = {
result: ApplicationStepType;
};

const ApplicationDetailStepEtc = ({
result,
}: ApplicationDetailStepEtcProps) => {
return (
<>
<section className="w-full px-[1.5rem] pt-[0.75rem] pb-[3.125rem] text-center">
<p className="button-2 text-[#FF6F61]">
{result == APPLICATION_STEP.PENDING
? "I'm on standby for more than two weeks"
: 'Your resume has been rejected'}
</p>
</section>
</>
);
};

export default ApplicationDetailStepEtc;
7 changes: 6 additions & 1 deletion src/pages/ApplicationDetail/ApplicationDetailPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { useNavigate } from 'react-router-dom';
import ApplicationDetailStep7 from '@/components/ApplicationDetail/ApplicationDetailStep7';
import { ApplicationDetailItemType } from '@/types/application/applicationItem';
import { findCurrentStep } from '@/utils/application';
import ApplicationDetailStepEtc from '@/components/ApplicationDetail/ApplicationDetailStepEtc';

// 더미데이터
const APPICATION_DETAIL_DATA: ApplicationDetailItemType = {
Expand Down Expand Up @@ -40,7 +41,7 @@ const APPICATION_DETAIL_DATA: ApplicationDetailItemType = {
},
],
},
step: 'APPLICATION_SUCCESS',
step: 'PENDING',
};

// TODO: enum에 따라서 몇번째 step인지 숫자로 반환하도록 하기! 그에 따른 step과 하단 버튼 구현하기
Expand All @@ -63,6 +64,10 @@ const ApplicationDetailPage = () => {
return <ApplicationDetailStep6 />;
case 7:
return <ApplicationDetailStep7 result={APPICATION_DETAIL_DATA.step} />;
default:
return (
<ApplicationDetailStepEtc result={APPICATION_DETAIL_DATA.step} />
);
}
};

Expand Down
4 changes: 3 additions & 1 deletion src/utils/application.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,13 @@ export const findCurrentStep = (step: ApplicationStepType) => {
return 4;
case APPLICATION_STEP.APPLICATION_IN_PROGRESS:
return 5;
case APPLICATION_STEP.REGISTRATION_RESULTS:
return 6;
case APPLICATION_STEP.APPLICATION_SUCCESS:
return 7;
case APPLICATION_STEP.APPLICATION_REJECTED:
return 7;
default:
return 6;
return 0;
}
};

0 comments on commit 3c5ecc1

Please sign in to comment.