Manage Benchmarks
diff --git a/apps/client/src/app/components/benchmark-comparator/benchmark-comparator.component.ts b/apps/client/src/app/components/benchmark-comparator/benchmark-comparator.component.ts
index afcb561f6..c98f01fb7 100644
--- a/apps/client/src/app/components/benchmark-comparator/benchmark-comparator.component.ts
+++ b/apps/client/src/app/components/benchmark-comparator/benchmark-comparator.component.ts
@@ -12,6 +12,7 @@ import {
parseDate
} from '@ghostfolio/common/helper';
import { LineChartItem, User } from '@ghostfolio/common/interfaces';
+import { paths } from '@ghostfolio/common/paths';
import { hasPermission, permissions } from '@ghostfolio/common/permissions';
import { ColorScheme } from '@ghostfolio/common/types';
@@ -63,6 +64,10 @@ export class BenchmarkComparatorComponent implements OnChanges, OnDestroy {
public chart: Chart<'line'>;
public hasPermissionToAccessAdminControl: boolean;
+ public routerLinkAdminControlMarketData = [
+ '/' + paths.adminControl,
+ paths.marketData
+ ];
public constructor() {
Chart.register(
diff --git a/apps/client/src/app/components/header/header.component.html b/apps/client/src/app/components/header/header.component.html
index b14d142f4..74737ca05 100644
--- a/apps/client/src/app/components/header/header.component.html
+++ b/apps/client/src/app/components/header/header.component.html
@@ -20,9 +20,9 @@
mat-flat-button
[ngClass]="{
'font-weight-bold':
- currentRoute === 'home' || currentRoute === 'zen',
+ currentRoute === paths.home || currentRoute === paths.zen,
'text-decoration-underline':
- currentRoute === 'home' || currentRoute === 'zen'
+ currentRoute === paths.home || currentRoute === paths.zen
}"
[routerLink]="['/']"
>OverviewPortfolio
@@ -47,10 +47,10 @@
i18n
mat-flat-button
[ngClass]="{
- 'font-weight-bold': currentRoute === 'accounts',
- 'text-decoration-underline': currentRoute === 'accounts'
+ 'font-weight-bold': currentRoute === paths.accounts,
+ 'text-decoration-underline': currentRoute === paths.accounts
}"
- [routerLink]="['/accounts']"
+ [routerLink]="routerLinkAccounts"
>Accounts
@@ -61,10 +61,10 @@
i18n
mat-flat-button
[ngClass]="{
- 'font-weight-bold': currentRoute === 'admin',
- 'text-decoration-underline': currentRoute === 'admin'
+ 'font-weight-bold': currentRoute === paths.adminControl,
+ 'text-decoration-underline': currentRoute === paths.adminControl
}"
- [routerLink]="['/admin']"
+ [routerLink]="routerLinkAdminControl"
>Admin Control
@@ -235,7 +235,7 @@
mat-menu-item
[ngClass]="{
'font-weight-bold':
- currentRoute === 'home' || currentRoute === 'zen'
+ currentRoute === paths.home || currentRoute === paths.zen
}"
[routerLink]="['/']"
>OverviewPortfolio
Accounts
My Ghostfolio
@if (hasPermissionToAccessAdminControl) {
@@ -270,8 +270,10 @@
class="d-flex d-sm-none"
i18n
mat-menu-item
- [ngClass]="{ 'font-weight-bold': currentRoute === 'admin' }"
- [routerLink]="['/admin']"
+ [ngClass]="{
+ 'font-weight-bold': currentRoute === paths.adminControl
+ }"
+ [routerLink]="routerLinkAdminControl"
>Admin Control
}
diff --git a/apps/client/src/app/components/header/header.component.ts b/apps/client/src/app/components/header/header.component.ts
index a0fbe8c84..52418bcb7 100644
--- a/apps/client/src/app/components/header/header.component.ts
+++ b/apps/client/src/app/components/header/header.component.ts
@@ -80,14 +80,19 @@ export class HeaderComponent implements OnChanges {
public hasPermissionToCreateUser: boolean;
public impersonationId: string;
public isMenuOpen: boolean;
+ public paths = paths;
public routeAbout = paths.about;
public routeFeatures = paths.features;
public routeMarkets = paths.markets;
public routePricing = paths.pricing;
public routeResources = paths.resources;
public routerLinkAbout = ['/' + paths.about];
+ public routerLinkAccount = ['/' + paths.account];
+ public routerLinkAccounts = ['/' + paths.accounts];
+ public routerLinkAdminControl = ['/' + paths.adminControl];
public routerLinkFeatures = ['/' + paths.features];
public routerLinkMarkets = ['/' + paths.markets];
+ public routerLinkPortfolio = ['/' + paths.portfolio];
public routerLinkPricing = ['/' + paths.pricing];
public routerLinkRegister = ['/' + paths.register];
public routerLinkResources = ['/' + paths.resources];
diff --git a/apps/client/src/app/components/home-holdings/home-holdings.component.ts b/apps/client/src/app/components/home-holdings/home-holdings.component.ts
index dd411f6cc..9f772a3e4 100644
--- a/apps/client/src/app/components/home-holdings/home-holdings.component.ts
+++ b/apps/client/src/app/components/home-holdings/home-holdings.component.ts
@@ -7,6 +7,7 @@ import {
ToggleOption,
User
} from '@ghostfolio/common/interfaces';
+import { paths } from '@ghostfolio/common/paths';
import { hasPermission, permissions } from '@ghostfolio/common/permissions';
import { HoldingType, HoldingsViewMode } from '@ghostfolio/common/types';
@@ -36,6 +37,10 @@ export class HomeHoldingsComponent implements OnDestroy, OnInit {
{ label: $localize`Active`, value: 'ACTIVE' },
{ label: $localize`Closed`, value: 'CLOSED' }
];
+ public routerLinkPortfolioActivities = [
+ '/' + paths.portfolio,
+ paths.activities
+ ];
public user: User;
public viewModeFormControl = new FormControl
(
HomeHoldingsComponent.DEFAULT_HOLDINGS_VIEW_MODE
diff --git a/apps/client/src/app/components/home-holdings/home-holdings.html b/apps/client/src/app/components/home-holdings/home-holdings.html
index f981e50a1..6040ffe2a 100644
--- a/apps/client/src/app/components/home-holdings/home-holdings.html
+++ b/apps/client/src/app/components/home-holdings/home-holdings.html
@@ -58,7 +58,7 @@
class="mt-3"
i18n
mat-stroked-button
- [routerLink]="['/portfolio', 'activities']"
+ [routerLink]="routerLinkPortfolioActivities"
>Manage Activities
diff --git a/apps/client/src/app/components/home-overview/home-overview.component.ts b/apps/client/src/app/components/home-overview/home-overview.component.ts
index b0e7be320..783b7d1b9 100644
--- a/apps/client/src/app/components/home-overview/home-overview.component.ts
+++ b/apps/client/src/app/components/home-overview/home-overview.component.ts
@@ -10,6 +10,7 @@ import {
PortfolioPerformance,
User
} from '@ghostfolio/common/interfaces';
+import { paths } from '@ghostfolio/common/paths';
import { hasPermission, permissions } from '@ghostfolio/common/permissions';
import { ChangeDetectorRef, Component, OnDestroy, OnInit } from '@angular/core';
@@ -36,6 +37,12 @@ export class HomeOverviewComponent implements OnDestroy, OnInit {
public isLoadingPerformance = true;
public performance: PortfolioPerformance;
public precision = 2;
+ public routerLinkAccounts = ['/' + paths.accounts];
+ public routerLinkPortfolio = ['/' + paths.portfolio];
+ public routerLinkPortfolioActivities = [
+ '/' + paths.portfolio,
+ paths.activities
+ ];
public showDetails = false;
public unit: string;
public user: User;
diff --git a/apps/client/src/app/components/home-overview/home-overview.html b/apps/client/src/app/components/home-overview/home-overview.html
index c13c8f043..04b47277f 100644
--- a/apps/client/src/app/components/home-overview/home-overview.html
+++ b/apps/client/src/app/components/home-overview/home-overview.html
@@ -11,7 +11,7 @@
class="mb-2"
[ngClass]="{ 'text-muted': user?.accounts?.length > 1 }"
>
-