Skip to content

Commit

Permalink
fixed view, and corrected translation
Browse files Browse the repository at this point in the history
  • Loading branch information
Snorre98 committed Nov 2, 2024
1 parent 39a9624 commit b7e0fe6
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion backend/samfundet/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,14 @@ export function RecruitmentUsersWithoutInterviewGangPage() {
<AdminPageLayout title={title} backendUrl={ROUTES.backend.samfundet__user} header={header} loading={showSpinner}>
{recruitmentGangStat && (
<Text size="l">
{`${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(' ')}
</Text>
)}
<RecruitmentWithoutInterviewTable applicants={users} />
Expand Down
1 change: 1 addition & 0 deletions frontend/src/i18n/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/i18n/translations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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',
Expand Down

0 comments on commit b7e0fe6

Please sign in to comment.