From 5f2f484c0091e07893882a3b9c5751d59dad992b Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Tue, 12 Aug 2025 20:41:52 +0200 Subject: [PATCH 1/2] Feature/add interest and dividend to account detail dialog (#5347) * Add interest and dividend to account detail dialog * Update changelog --- CHANGELOG.md | 4 +++ .../account-detail-dialog.component.ts | 25 +++++++++++++++++++ .../account-detail-dialog.html | 24 ++++++++++++++++++ 3 files changed, 53 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index cf3f2883b..208d22bab 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 the interest and dividend values to the account detail dialog + ### Changed - Improved the dynamic numerical precision for various values in the account detail dialog diff --git a/apps/client/src/app/components/account-detail-dialog/account-detail-dialog.component.ts b/apps/client/src/app/components/account-detail-dialog/account-detail-dialog.component.ts index c718df686..2886910c4 100644 --- a/apps/client/src/app/components/account-detail-dialog/account-detail-dialog.component.ts +++ b/apps/client/src/app/components/account-detail-dialog/account-detail-dialog.component.ts @@ -55,11 +55,15 @@ export class AccountDetailDialog implements OnDestroy, OnInit { public balancePrecision = 2; public currency: string; public dataSource: MatTableDataSource; + public dividendInBaseCurrency: number; + public dividendInBaseCurrencyPrecision = 2; public equity: number; public equityPrecision = 2; public hasPermissionToDeleteAccountBalance: boolean; public historicalDataItems: HistoricalDataItem[]; public holdings: PortfolioPosition[]; + public interestInBaseCurrency: number; + public interestInBaseCurrencyPrecision = 2; public isLoadingActivities: boolean; public isLoadingChart: boolean; public name: string; @@ -184,6 +188,8 @@ export class AccountDetailDialog implements OnDestroy, OnInit { ({ balance, currency, + dividendInBaseCurrency, + interestInBaseCurrency, name, platform, transactionCount, @@ -200,6 +206,15 @@ export class AccountDetailDialog implements OnDestroy, OnInit { } this.currency = currency; + this.dividendInBaseCurrency = dividendInBaseCurrency; + + if ( + this.data.deviceType === 'mobile' && + this.dividendInBaseCurrency >= + NUMERICAL_PRECISION_THRESHOLD_6_FIGURES + ) { + this.dividendInBaseCurrencyPrecision = 0; + } if (isNumber(balance) && isNumber(value)) { this.equity = new Big(value).minus(balance).toNumber(); @@ -214,6 +229,16 @@ export class AccountDetailDialog implements OnDestroy, OnInit { this.equity = null; } + this.interestInBaseCurrency = interestInBaseCurrency; + + if ( + this.data.deviceType === 'mobile' && + this.interestInBaseCurrency >= + NUMERICAL_PRECISION_THRESHOLD_6_FIGURES + ) { + this.interestInBaseCurrencyPrecision = 0; + } + this.name = name; this.platformName = platform?.name ?? '-'; this.transactionCount = transactionCount; diff --git a/apps/client/src/app/components/account-detail-dialog/account-detail-dialog.html b/apps/client/src/app/components/account-detail-dialog/account-detail-dialog.html index 4e86ef5ea..acec70e7b 100644 --- a/apps/client/src/app/components/account-detail-dialog/account-detail-dialog.html +++ b/apps/client/src/app/components/account-detail-dialog/account-detail-dialog.html @@ -60,6 +60,30 @@ >Equity +
+ Interest +
+
+ Dividend +
Activities Date: Wed, 13 Aug 2025 13:45:20 +0200 Subject: [PATCH 2/2] Feature/move chart of account detail dialog from experimental to general availability (#5351) * Move chart from experimental to general availability * Update changelog --- CHANGELOG.md | 1 + .../account-detail-dialog.html | 26 +++++++++---------- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 208d22bab..0637e235d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed +- Moved the chart of the account detail dialog from experimental to general availability - Improved the dynamic numerical precision for various values in the account detail dialog - Extended the accounts endpoint by dividend and interest - Improved the language localization for Portuguese (`pt`) diff --git a/apps/client/src/app/components/account-detail-dialog/account-detail-dialog.html b/apps/client/src/app/components/account-detail-dialog/account-detail-dialog.html index acec70e7b..c43c5cb68 100644 --- a/apps/client/src/app/components/account-detail-dialog/account-detail-dialog.html +++ b/apps/client/src/app/components/account-detail-dialog/account-detail-dialog.html @@ -20,20 +20,18 @@
- @if (user?.settings?.isExperimentalFeatures) { -
- -
- } +
+ +