Skip to content

Commit

Permalink
Merge pull request #70 from szymonpoltorak/DEV-131-EnumifiyRouterStrings
Browse files Browse the repository at this point in the history
replaced string literals with enum values
  • Loading branch information
szymonpoltorak authored Mar 9, 2024
2 parents b3694bd + 0e1cbaa commit c788a37
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions corn-frontend/src/app/pages/boards/boards.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit c788a37

Please sign in to comment.