From 1e5f5325e802d0faf01cbd241c0240d4522cf3a6 Mon Sep 17 00:00:00 2001 From: Snorre Jr Date: Tue, 5 Nov 2024 22:19:53 +0100 Subject: [PATCH] handle recruiter_priority , status being null --- .../RecruitmentGangAllApplicantsAdminPage.tsx | 8 ++++++-- frontend/src/dto.ts | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/frontend/src/PagesAdmin/RecruitmentGangAllApplicantsAdminPage/RecruitmentGangAllApplicantsAdminPage.tsx b/frontend/src/PagesAdmin/RecruitmentGangAllApplicantsAdminPage/RecruitmentGangAllApplicantsAdminPage.tsx index 57d8a87e3..e35d79a0f 100644 --- a/frontend/src/PagesAdmin/RecruitmentGangAllApplicantsAdminPage/RecruitmentGangAllApplicantsAdminPage.tsx +++ b/frontend/src/PagesAdmin/RecruitmentGangAllApplicantsAdminPage/RecruitmentGangAllApplicantsAdminPage.tsx @@ -107,8 +107,12 @@ export function RecruitmentGangAllApplicantsAdminPage() { { content: {dbT(application.recruitment_position, 'name')} }, application.interview?.interview_time, application.interview?.interview_location, - RecruitmentPriorityChoicesMapping[application.recruiter_priority as number], - RecruitmentStatusChoicesMapping[application.recruiter_status as number], + application.recruiter_priority !== undefined + ? RecruitmentPriorityChoicesMapping[application.recruiter_priority] + : 'N/A', + application.recruiter_status !== undefined + ? RecruitmentStatusChoicesMapping[application.recruiter_status] + : 'N/A', ], }; }); diff --git a/frontend/src/dto.ts b/frontend/src/dto.ts index 4cd54cb1c..3a538bd24 100644 --- a/frontend/src/dto.ts +++ b/frontend/src/dto.ts @@ -505,7 +505,7 @@ export type RecruitmentApplicationDto = { recruitment: number; user: UserDto; applicant_priority: number; - recruiter_priority?: number | string; + recruiter_priority?: number; recruiter_status?: number; applicant_state?: number; created_at: string;