Open Source Wealth Management Software. Angular + NestJS + Prisma + Nx + TypeScript 🤍
TypeScript angularetffinancefintechghostfoliohacktoberfestinvestingnestjsosspersonal-financeportfolioprismasoftwarestocktrackertradingtypescriptwealth-managementweb
Task/add performance calculation type hint to analysis page (#7896)
Thomas Kaul8ecefeca3b0d
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex aa036359ad..8041b8001d 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0## Unreleased+### Added++- Added a hint for the performance calculation type to the analysis page+### Changed- Upgraded `@internationalized/number` from version `3.6.7` to `3.6.8`diff --git a/apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts b/apps/client/src/app/pages/portfolio/analysis/analysis-page.component.tsindex 26fb711bb7..aa57e3d9c8 100644--- a/apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts+++ b/apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts@@ -21,6 +21,7 @@ import type {GroupBy,ToggleOption} from '@ghostfolio/common/types';+import { PerformanceCalculationType } from '@ghostfolio/common/types/performance-calculation-type.type';import { translate } from '@ghostfolio/ui/i18n';import { GfPremiumIndicatorComponent } from '@ghostfolio/ui/premium-indicator';import { DataService } from '@ghostfolio/ui/services';@@ -99,6 +100,7 @@ export class GfAnalysisPageComponent implements OnInit {{ label: $localize`Yearly`, value: 'year' }];protected performance: PortfolioPerformance;+ protected readonly PerformanceCalculationType = PerformanceCalculationType;protected performanceDataItems: HistoricalDataItem[];protected performanceDataItemsInPercentage: HistoricalDataItem[];protected readonly portfolioEvolutionDataLabel = $localize`Investment`;diff --git a/apps/client/src/app/pages/portfolio/analysis/analysis-page.html b/apps/client/src/app/pages/portfolio/analysis/analysis-page.htmlindex 82751b8829..abf2de00ee 100644--- a/apps/client/src/app/pages/portfolio/analysis/analysis-page.html+++ b/apps/client/src/app/pages/portfolio/analysis/analysis-page.html@@ -254,6 +254,16 @@<div class="d-flex ml-3 py-1"><div class="flex-grow-1 mr-2 text-truncate"><ng-container i18n>Net Performance</ng-container>+ @if (+ user?.settings?.performanceCalculationType ===+ PerformanceCalculationType.ROAI+ ) {+ <abbr+ class="d-none d-sm-inline-block initialism ml-2 text-muted"+ title="Return on Average Investment"+ >(ROAI)</abbr+ >+ }</div><div class="d-flex justify-content-end"><gf-value