Removed some routes and renamed others

This commit is contained in:
Erik Tiekstra
2021-09-03 12:01:29 +02:00
parent 5ed4b79d9c
commit 1fef2fe173
5 changed files with 22 additions and 17 deletions

View File

@@ -15,9 +15,15 @@ export function mapPathsToBreadcrumbs(
if (isEmployeeCardRoute(paths)) {
breadcrumbs[breadcrumbs.length - 1].text = 'Personal information';
} else if (isEmployeeEditRoute(paths)) {
breadcrumbs[breadcrumbs.length - 2] = {
text: 'Hantera personal',
routerLink: '/administration/personal',
};
breadcrumbs[breadcrumbs.length - 1].text = 'Redigera konto';
} else if (isParticipantCardRoute(paths)) {
breadcrumbs[breadcrumbs.length - 1].text = 'Deltagarinformation';
}
}
return breadcrumbs;
}
@@ -25,6 +31,10 @@ function isEmployeeCardRoute(paths: string[]): boolean {
return paths.length === 3 && paths[1] === 'personal';
}
function isEmployeeEditRoute(paths: string[]): boolean {
return paths.length === 3 && paths[1] === 'redigera-konto';
}
function isParticipantCardRoute(paths: string[]): boolean {
return paths.length === 2 && paths[0] === 'deltagare';
}