Removed some routes and renamed others
This commit is contained in:
@@ -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';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user