From b7e0fe6f36ef74a8ad400518597a7ea71aef5e11 Mon Sep 17 00:00:00 2001 From: Snorre Jr Date: Sat, 2 Nov 2024 06:53:13 +0100 Subject: [PATCH] fixed view, and corrected translation --- backend/samfundet/views.py | 2 +- .../RecruitmentUsersWithoutInterviewGangPage.tsx | 9 ++++++++- frontend/src/i18n/constants.ts | 1 + frontend/src/i18n/translations.ts | 2 ++ 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/backend/samfundet/views.py b/backend/samfundet/views.py index 47d2bf40c..514b4431c 100644 --- a/backend/samfundet/views.py +++ b/backend/samfundet/views.py @@ -1348,7 +1348,7 @@ def post(self, request: Request) -> Response: class GangApplicationCountView(APIView): permission_classes = [IsAuthenticated] - def get(self, recruitment_id: int, gang_id: int) -> Response: + def get(self, request: Request, recruitment_id: int, gang_id: int) -> Response: # Get total applications from RecruitmentGangStat gang_stat = get_object_or_404(RecruitmentGangStat, gang_id=gang_id, recruitment_stats__recruitment_id=recruitment_id) diff --git a/frontend/src/PagesAdmin/RecruitmentUsersWithoutInterviewGangPage/RecruitmentUsersWithoutInterviewGangPage.tsx b/frontend/src/PagesAdmin/RecruitmentUsersWithoutInterviewGangPage/RecruitmentUsersWithoutInterviewGangPage.tsx index 2f2012790..503d36277 100644 --- a/frontend/src/PagesAdmin/RecruitmentUsersWithoutInterviewGangPage/RecruitmentUsersWithoutInterviewGangPage.tsx +++ b/frontend/src/PagesAdmin/RecruitmentUsersWithoutInterviewGangPage/RecruitmentUsersWithoutInterviewGangPage.tsx @@ -103,7 +103,14 @@ export function RecruitmentUsersWithoutInterviewGangPage() { {recruitmentGangStat && ( - {`${withoutInterviewCount} ${t(KEY.common_out_of)} ${t(KEY.common_total).toLowerCase()} ${recruitmentGangStat.total_applicants} ${t(KEY.recruitment_applicants_without_interview).toLowerCase()}`} + {[ + withoutInterviewCount, + t(KEY.common_out_of), + `${t(KEY.common_total).toLowerCase()} ${recruitmentGangStat.total_applicants}`, + t(KEY.recruitment_applications), + t(KEY.common_have), + t(KEY.recruitment_interview), + ].join(' ')} )} diff --git a/frontend/src/i18n/constants.ts b/frontend/src/i18n/constants.ts index dec220820..075df6b93 100644 --- a/frontend/src/i18n/constants.ts +++ b/frontend/src/i18n/constants.ts @@ -170,6 +170,7 @@ export const KEY = { common_something_went_wrong: 'common_something_went_wrong', common_click_here: 'common_click_here', common_have: 'common_have', + recruitment_interview: 'recruitment_interview', common_been: 'common_been', common_processed: 'common_processed', common_rejected: 'common_rejected', diff --git a/frontend/src/i18n/translations.ts b/frontend/src/i18n/translations.ts index 5c7784d6a..752e38960 100644 --- a/frontend/src/i18n/translations.ts +++ b/frontend/src/i18n/translations.ts @@ -262,6 +262,7 @@ export const nb = prepareTranslations({ [KEY.recruitment_all_applications]: 'Alle søknader', [KEY.recruitment_not_applied]: 'Du har ikke sendt søknader til noen stillinger ennå', [KEY.recruitment_will_be_anonymized]: 'All info relatert til dine søknader vil bli slettet 3 uker etter opptaket', + [KEY.recruitment_interview]: 'intervju', [KEY.recruitment_interviews]: 'Intervjuer', [KEY.recruitment_interviewer]: 'Intervjuer', [KEY.recruitment_interviewers]: 'Intervjuere', @@ -748,6 +749,7 @@ export const en = prepareTranslations({ [KEY.recruitment_not_applied]: 'You have not applied to any positions yet', [KEY.recruitment_will_be_anonymized]: 'All info related to the applications will be anonymized three weeks after the recruitment is over', + [KEY.recruitment_interview]: 'interview', [KEY.recruitment_interviews]: 'Interviews', [KEY.recruitment_interviewer]: 'Interviewer', [KEY.recruitment_interviewers]: 'Interviewers',