From 0e1cbaa346153e208d18154c308211a2b88b1efb Mon Sep 17 00:00:00 2001 From: Igor Kedzierawski Date: Sat, 9 Mar 2024 11:25:25 +0100 Subject: [PATCH] replaced string literals with enum values --- corn-frontend/src/app/pages/boards/boards.component.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/corn-frontend/src/app/pages/boards/boards.component.ts b/corn-frontend/src/app/pages/boards/boards.component.ts index 0e49a518..8c7cf712 100644 --- a/corn-frontend/src/app/pages/boards/boards.component.ts +++ b/corn-frontend/src/app/pages/boards/boards.component.ts @@ -14,6 +14,8 @@ import { UserinfoComponent } from '@pages/boards/userinfo/userinfo.component'; import { KeycloakService } from 'keycloak-angular'; import { KeycloakProfile } from 'keycloak-js'; import { MatMenuModule, MatMenuTrigger } from '@angular/material/menu'; +import { RouterPaths } from '@core/enum/RouterPaths'; +import { BoardsPaths } from '@core/enum/BoardsPaths'; @Component({ selector: 'app-boards', @@ -70,16 +72,15 @@ export class BoardsComponent implements OnInit { } navigateToBacklog(): void { - this.router.navigate(['/boards/backlog']); + this.router.navigate([`/${RouterPaths.BOARDS_PATH}/${BoardsPaths.BACKLOG}`]); } navigateToTimeline(): void { - this.router.navigate(['/boards/timeline']); + this.router.navigate([`/${RouterPaths.BOARDS_PATH}/${BoardsPaths.TIMELINE}`]); } navigateToBoard(): void { - //TODO substitute literals with values from BoardPaths.ts enum in these methods - this.router.navigate(['/boards/board']); + this.router.navigate([`/${RouterPaths.BOARDS_PATH}/${BoardsPaths.BOARD}`]); } toggleSidebar(): void {