diff --git a/frontend/src/constants/status.ts b/frontend/src/constants/status.ts new file mode 100644 index 000000000..0d9034ff4 --- /dev/null +++ b/frontend/src/constants/status.ts @@ -0,0 +1,8 @@ +import { ApplicationStatus } from '@/types/applicants'; + +export const AVAILABLE_STATUSES = [ + ApplicationStatus.SUBMITTED, // 서류검토 (SUBMITTED 포함) + ApplicationStatus.INTERVIEW_SCHEDULED, // 면접예정 + ApplicationStatus.ACCEPTED, // 합격 + ApplicationStatus.DECLINED, // 불합격 +] as const; diff --git a/frontend/src/pages/AdminPage/tabs/ApplicantsTab/ApplicantDetailPage/ApplicantDetailPage.tsx b/frontend/src/pages/AdminPage/tabs/ApplicantsTab/ApplicantDetailPage/ApplicantDetailPage.tsx index 0c7bcd5bd..405358c5d 100644 --- a/frontend/src/pages/AdminPage/tabs/ApplicantsTab/ApplicantDetailPage/ApplicantDetailPage.tsx +++ b/frontend/src/pages/AdminPage/tabs/ApplicantsTab/ApplicantDetailPage/ApplicantDetailPage.tsx @@ -14,13 +14,7 @@ import { Question } from '@/types/application'; import PrevApplicantButton from '@/assets/images/icons/prev_applicant.svg'; import NextApplicantButton from '@/assets/images/icons/next_applicant.svg'; import { useUpdateApplicant } from '@/hooks/queries/applicants/useUpdateApplicant'; - -const AVAILABLE_STATUSES = [ - ApplicationStatus.SUBMITTED, // 서류검토 (SUBMITTED 포함) - ApplicationStatus.INTERVIEW_SCHEDULED, // 면접예정 - ApplicationStatus.ACCEPTED, // 합격 - ApplicationStatus.DECLINED, // 불합격 -] as const; +import { AVAILABLE_STATUSES } from '@/constants/status'; const getStatusColor = (status: ApplicationStatus | undefined): string => { switch (status) { diff --git a/frontend/src/pages/AdminPage/tabs/ApplicantsTab/ApplicantsTab.tsx b/frontend/src/pages/AdminPage/tabs/ApplicantsTab/ApplicantsTab.tsx index 347c59736..8d04ff0f7 100644 --- a/frontend/src/pages/AdminPage/tabs/ApplicantsTab/ApplicantsTab.tsx +++ b/frontend/src/pages/AdminPage/tabs/ApplicantsTab/ApplicantsTab.tsx @@ -10,6 +10,7 @@ import selectIcon from '@/assets/images/icons/selectArrow.svg'; import deleteIcon from '@/assets/images/icons/applicant_delete.svg'; import selectAllIcon from '@/assets/images/icons/applicant_select_arrow.svg'; import { useUpdateApplicant } from '@/hooks/queries/applicants/useUpdateApplicant'; +import { AVAILABLE_STATUSES } from '@/constants/status'; const ApplicantsTab = () => { const navigate = useNavigate(); @@ -237,34 +238,15 @@ const ApplicantsTab = () => { - { - updateAllApplicants(ApplicationStatus.SUBMITTED); - }} - > - 서류검토 - - { - updateAllApplicants(ApplicationStatus.INTERVIEW_SCHEDULED); - }} - > - 면접예정 - - { - updateAllApplicants(ApplicationStatus.ACCEPTED); - }} - > - 합격 - - { - updateAllApplicants(ApplicationStatus.DECLINED); - }} - > - 불합격 - + {AVAILABLE_STATUSES.map((status) => ( + { + updateAllApplicants(status); + }} + > + {mapStatusToGroup(status).label} + + ))}