Skip to content

Commit

Permalink
Add breadcrumbs to Recruiter Dashboard and give proper title (#1401)
Browse files Browse the repository at this point in the history
* Add breadcrumbs to Recruiter Dashboard

* Use Dashboard as name for recruiter dashboard page
  • Loading branch information
robines authored Sep 26, 2024
1 parent 805cb1f commit e65f650
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export function RecruitmentRecruiterDashboardPage() {
return <></>;
}

const title = `${t(KEY.recruitment_overview)} - ${getObjectFieldOrNumber(recruitment?.organization, 'name')} - ${dbT(
const title = `${t(KEY.recruitment_recruiter_dashboard)} - ${getObjectFieldOrNumber(recruitment?.organization, 'name')} - ${dbT(
recruitment,
'name',
)}`;
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 @@ -336,6 +336,7 @@ export const KEY = {
recruitment_no_current_applications_gang: 'recruitment_no_current_applications_gang',
recruitment_progression: 'recruitment_progression',
recruitment_overview: 'recruitment_overview',
recruitment_recruiter_dashboard: 'recruitment_recruiter_dashboard',
recruitment_dashboard_description: 'recruitment_dashboard_description',
recruitment_application: 'recruitment_application',
recruitment_admitted: 'recruitment_admitted',
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 @@ -299,6 +299,7 @@ export const nb = prepareTranslations({
[KEY.recruitment_applications]: 'søknader',
[KEY.recruitment_progression]: 'Opptak fremgang',
[KEY.recruitment_overview]: 'Opptak oversikt',
[KEY.recruitment_recruiter_dashboard]: 'Dashbord',
[KEY.recruitment_statistics]: 'Opptak statistikk',
[KEY.recruitment_applications_processed]: 'søknader behandlet',
[KEY.recruitment_automatic_rejection]: 'Automatisk avslag',
Expand Down Expand Up @@ -723,6 +724,7 @@ export const en = prepareTranslations({
[KEY.application_deadline]: 'Application deadline',
[KEY.recruitment_progression]: 'Recruitment progression',
[KEY.recruitment_overview]: 'Recruitment overview',
[KEY.recruitment_recruiter_dashboard]: 'Dashboard',
[KEY.recruitment_admitted]: 'admitted',
[KEY.recruitment_statistics]: 'Recruitment statistics',
[KEY.recruitment_applications]: 'applications',
Expand Down
21 changes: 17 additions & 4 deletions frontend/src/router/router.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -378,10 +378,6 @@ export const router = createBrowserRouter(
),
}}
/>
<Route
path={ROUTES.frontend.admin_recruitment_recruiter_dashboard}
element={<RecruitmentRecruiterDashboardPage />}
/>
<Route
path={ROUTES.frontend.admin_recruitment_gang_all_applications}
element={<RecruitmentGangAllApplicantsAdminPage />}
Expand Down Expand Up @@ -429,6 +425,23 @@ export const router = createBrowserRouter(
},
}}
>
<Route
path={ROUTES.frontend.admin_recruitment_recruiter_dashboard}
element={<RecruitmentRecruiterDashboardPage />}
loader={recruitmentLoader}
handle={{
crumb: ({ recruitment }: RecruitmentLoader) => (
<Link
url={reverse({
pattern: ROUTES.frontend.admin_recruitment_recruiter_dashboard,
urlParams: { recruitmentId: recruitment?.id },
})}
>
{t(KEY.recruitment_recruiter_dashboard)}
</Link>
),
}}
/>
<Route
path={ROUTES.frontend.admin_recruitment_gang_separateposition_create}
element={
Expand Down

0 comments on commit e65f650

Please sign in to comment.