diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2bdd32d8..5153ab47 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
+## Unreleased
+
+### Added
+
+- Added a link to manage the benchmarks to the benchmark comparator
+
## 1.272.0 - 2023-05-26
### Added
diff --git a/apps/client/src/app/components/admin-overview/admin-overview.html b/apps/client/src/app/components/admin-overview/admin-overview.html
index 80a285ff..0f4127e5 100644
--- a/apps/client/src/app/components/admin-overview/admin-overview.html
+++ b/apps/client/src/app/components/admin-overview/admin-overview.html
@@ -72,19 +72,6 @@
-
0"
- class="align-items-start d-flex my-3"
- >
-
Benchmarks
-
-
-
- {{ benchmark.symbol }}
-
-
-
-
0"
class="align-items-start d-flex my-3"
diff --git a/apps/client/src/app/components/benchmark-comparator/benchmark-comparator.component.html b/apps/client/src/app/components/benchmark-comparator/benchmark-comparator.component.html
index df2b6f89..89580994 100644
--- a/apps/client/src/app/components/benchmark-comparator/benchmark-comparator.component.html
+++ b/apps/client/src/app/components/benchmark-comparator/benchmark-comparator.component.html
@@ -13,7 +13,6 @@
appearance="outline"
class="w-100 without-hint"
color="accent"
- [hidden]="benchmarks?.length === 0"
>
Compare with...
{{ symbolProfile.name }}
+ 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 9e6cc9be..9a6bd1d3 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
@@ -23,6 +23,7 @@ import {
parseDate
} from '@ghostfolio/common/helper';
import { LineChartItem, User } from '@ghostfolio/common/interfaces';
+import { hasPermission, permissions } from '@ghostfolio/common/permissions';
import { ColorScheme } from '@ghostfolio/common/types';
import { SymbolProfile } from '@prisma/client';
import {
@@ -59,6 +60,7 @@ export class BenchmarkComparatorComponent implements OnChanges, OnDestroy {
@ViewChild('chartCanvas') chartCanvas;
public chart: Chart<'line'>;
+ public hasPermissionToAccessAdminControl: boolean;
public constructor() {
Chart.register(
@@ -76,6 +78,11 @@ export class BenchmarkComparatorComponent implements OnChanges, OnDestroy {
}
public ngOnChanges() {
+ this.hasPermissionToAccessAdminControl = hasPermission(
+ this.user?.permissions,
+ permissions.accessAdminControl
+ );
+
if (this.performanceDataItems) {
this.initialize();
}
diff --git a/apps/client/src/app/components/benchmark-comparator/benchmark-comparator.module.ts b/apps/client/src/app/components/benchmark-comparator/benchmark-comparator.module.ts
index 23b0a48a..5280404d 100644
--- a/apps/client/src/app/components/benchmark-comparator/benchmark-comparator.module.ts
+++ b/apps/client/src/app/components/benchmark-comparator/benchmark-comparator.module.ts
@@ -2,6 +2,7 @@ import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { MatSelectModule } from '@angular/material/select';
+import { RouterModule } from '@angular/router';
import { GfPremiumIndicatorModule } from '@ghostfolio/ui/premium-indicator';
import { NgxSkeletonLoaderModule } from 'ngx-skeleton-loader';
@@ -16,7 +17,8 @@ import { BenchmarkComparatorComponent } from './benchmark-comparator.component';
GfPremiumIndicatorModule,
MatSelectModule,
NgxSkeletonLoaderModule,
- ReactiveFormsModule
+ ReactiveFormsModule,
+ RouterModule
]
})
export class GfBenchmarkComparatorModule {}
diff --git a/apps/client/src/locales/messages.de.xlf b/apps/client/src/locales/messages.de.xlf
index 836bca3a..bb12bf74 100644
--- a/apps/client/src/locales/messages.de.xlf
+++ b/apps/client/src/locales/messages.de.xlf
@@ -94,7 +94,7 @@
apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.html
- 81
+ 88
apps/client/src/app/components/admin-users/admin-users.html
@@ -210,7 +210,7 @@
apps/client/src/app/components/admin-market-data/admin-market-data.html
- 163
+ 151
apps/client/src/app/components/admin-platform/admin-platform.component.html
@@ -250,7 +250,7 @@
apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.html
- 57
+ 64
@@ -386,7 +386,7 @@
apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.html
- 173
+ 180
apps/client/src/app/components/admin-platform/create-or-update-platform-dialog/create-or-update-platform-dialog.html
@@ -422,7 +422,7 @@
apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.html
- 180
+ 187
apps/client/src/app/components/admin-platform/create-or-update-platform-dialog/create-or-update-platform-dialog.html
@@ -450,7 +450,7 @@
apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.html
- 72
+ 79
libs/ui/src/lib/holdings-table/holdings-table.component.html
@@ -552,10 +552,6 @@
apps/client/src/app/components/admin-market-data/admin-market-data.html
132
-
- apps/client/src/app/components/admin-market-data/admin-market-data.html
- 156
-
apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.html
38
@@ -582,7 +578,7 @@
Systemmeldung
apps/client/src/app/components/admin-overview/admin-overview.html
- 122
+ 109
@@ -590,7 +586,7 @@
Systemmeldung setzen
apps/client/src/app/components/admin-overview/admin-overview.html
- 144
+ 131
@@ -598,7 +594,7 @@
Lese-Modus
apps/client/src/app/components/admin-overview/admin-overview.html
- 112
+ 99
@@ -606,7 +602,7 @@
Gutscheincodes
apps/client/src/app/components/admin-overview/admin-overview.html
- 152
+ 139
@@ -614,7 +610,7 @@
Hinzufügen
apps/client/src/app/components/admin-overview/admin-overview.html
- 194
+ 181
@@ -622,7 +618,7 @@
Verwaltung
apps/client/src/app/components/admin-overview/admin-overview.html
- 201
+ 188
@@ -630,7 +626,7 @@
Cache leeren
apps/client/src/app/components/admin-overview/admin-overview.html
- 205
+ 192
@@ -1134,7 +1130,7 @@
Sektoren
apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.html
- 125
+ 132
apps/client/src/app/components/position/position-detail-dialog/position-detail-dialog.html
@@ -1150,7 +1146,7 @@
Länder
apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.html
- 135
+ 142
apps/client/src/app/components/position/position-detail-dialog/position-detail-dialog.html
@@ -1162,7 +1158,7 @@
Tags
apps/client/src/app/components/admin-overview/admin-overview.html
- 92
+ 79
apps/client/src/app/components/position/position-detail-dialog/position-detail-dialog.html
@@ -1356,6 +1352,10 @@
apps/client/src/app/pages/blog/2023/03/1000-stars-on-github/1000-stars-on-github-page.html
245
+
+ apps/client/src/app/pages/blog/2023/05/unlock-your-financial-potential-with-ghostfolio/unlock-your-financial-potential-with-ghostfolio-page.html
+ 231
+
apps/client/src/app/pages/blog/blog-page.html
4
@@ -1626,7 +1626,7 @@
apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.html
- 62
+ 69
apps/client/src/app/pages/accounts/create-or-update-account-dialog/create-or-update-account-dialog.html
@@ -2042,7 +2042,7 @@
Kommentar
apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.html
- 160
+ 167
apps/client/src/app/pages/portfolio/activities/create-or-update-activity-dialog/create-or-update-activity-dialog.html
@@ -2058,7 +2058,7 @@
apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.html
- 86
+ 93
apps/client/src/app/components/position/position-detail-dialog/position-detail-dialog.html
@@ -2110,7 +2110,7 @@
Portfolio
apps/client/src/app/components/benchmark-comparator/benchmark-comparator.component.ts
- 102
+ 109
apps/client/src/app/pages/portfolio/portfolio-page-routing.module.ts
@@ -2430,7 +2430,7 @@
apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.html
- 95
+ 102
apps/client/src/app/components/position/position-detail-dialog/position-detail-dialog.html
@@ -2446,7 +2446,7 @@
Sektor
apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.html
- 110
+ 117
apps/client/src/app/components/position/position-detail-dialog/position-detail-dialog.html
@@ -2458,7 +2458,7 @@
Land
apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.html
- 119
+ 126
apps/client/src/app/components/admin-users/admin-users.html
@@ -2653,20 +2653,12 @@
253
-
- Benchmarks
- Benchmarks
-
- apps/client/src/app/components/admin-overview/admin-overview.html
- 79
-
-
Compare with...
Vergleichen mit...
apps/client/src/app/components/benchmark-comparator/benchmark-comparator.component.html
- 18
+ 17
@@ -2674,7 +2666,7 @@
Benchmark
apps/client/src/app/components/benchmark-comparator/benchmark-comparator.component.ts
- 111
+ 118
@@ -2918,7 +2910,7 @@
libs/ui/src/lib/portfolio-proportion-chart/portfolio-proportion-chart.component.ts
- 369
+ 373
@@ -2926,11 +2918,11 @@
Keine Daten verfügbar
libs/ui/src/lib/portfolio-proportion-chart/portfolio-proportion-chart.component.ts
- 371
+ 375
libs/ui/src/lib/portfolio-proportion-chart/portfolio-proportion-chart.component.ts
- 384
+ 388
@@ -3046,7 +3038,7 @@
Symbol Zuordnung
apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.html
- 149
+ 156
@@ -3078,7 +3070,7 @@
Benutzer Registrierung
apps/client/src/app/components/admin-overview/admin-overview.html
- 102
+ 89
@@ -3608,10 +3600,6 @@
Gather Historical Data
Historische Daten herunterladen
-
- apps/client/src/app/components/admin-market-data/admin-market-data.html
- 150
-
apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.html
30
@@ -3813,6 +3801,22 @@
14
+
+ Set as Benchmark
+ Als Benchmark setzen
+
+ apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.html
+ 45
+
+
+
+ Manage Benchmarks
+ Benchmarks verwalten
+
+ apps/client/src/app/components/benchmark-comparator/benchmark-comparator.component.html
+ 34
+
+