From 42b70ef56890e640a2d49d03c9ef0039b8050589 Mon Sep 17 00:00:00 2001
From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com>
Date: Sat, 4 May 2024 07:49:37 +0200
Subject: [PATCH] Feature/improve performance labels in position detail dialog
(#3363)
* Improve performance labels (with and without currency effects)
* Update changelog
---
CHANGELOG.md | 6 +
.../position-detail-dialog.component.ts | 16 +-
.../position-detail-dialog.html | 69 +++++---
apps/client/src/locales/messages.de.xlf | 156 ++++++++++--------
apps/client/src/locales/messages.es.xlf | 156 ++++++++++--------
apps/client/src/locales/messages.fr.xlf | 156 ++++++++++--------
apps/client/src/locales/messages.it.xlf | 156 ++++++++++--------
apps/client/src/locales/messages.nl.xlf | 156 ++++++++++--------
apps/client/src/locales/messages.pl.xlf | 156 ++++++++++--------
apps/client/src/locales/messages.pt.xlf | 156 ++++++++++--------
apps/client/src/locales/messages.tr.xlf | 156 ++++++++++--------
apps/client/src/locales/messages.xlf | 154 +++++++++--------
apps/client/src/locales/messages.zh.xlf | 156 ++++++++++--------
libs/ui/src/lib/value/value.component.html | 4 +-
14 files changed, 927 insertions(+), 726 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index bc79a2ddf..8ba54382c 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
+
+### Changed
+
+- Improved the performance labels (with and without currency effects) in the position detail dialog
+
## 2.78.0 - 2024-05-02
### Added
diff --git a/apps/client/src/app/components/position/position-detail-dialog/position-detail-dialog.component.ts b/apps/client/src/app/components/position/position-detail-dialog/position-detail-dialog.component.ts
index bb37b9ed5..2a0303686 100644
--- a/apps/client/src/app/components/position/position-detail-dialog/position-detail-dialog.component.ts
+++ b/apps/client/src/app/components/position/position-detail-dialog/position-detail-dialog.component.ts
@@ -56,6 +56,8 @@ export class PositionDetailDialog implements OnDestroy, OnInit {
public marketPrice: number;
public maxPrice: number;
public minPrice: number;
+ public netPerformance: number;
+ public netPerformancePercent: number;
public netPerformancePercentWithCurrencyEffect: number;
public netPerformanceWithCurrencyEffect: number;
public quantity: number;
@@ -104,6 +106,8 @@ export class PositionDetailDialog implements OnDestroy, OnInit {
marketPrice,
maxPrice,
minPrice,
+ netPerformance,
+ netPerformancePercent,
netPerformancePercentWithCurrencyEffect,
netPerformanceWithCurrencyEffect,
orders,
@@ -126,15 +130,15 @@ export class PositionDetailDialog implements OnDestroy, OnInit {
this.feeInBaseCurrency = feeInBaseCurrency;
this.firstBuyDate = firstBuyDate;
this.historicalDataItems = historicalData.map(
- (historicalDataItem) => {
+ ({ averagePrice, date, marketPrice }) => {
this.benchmarkDataItems.push({
- date: historicalDataItem.date,
- value: historicalDataItem.averagePrice
+ date,
+ value: averagePrice
});
return {
- date: historicalDataItem.date,
- value: historicalDataItem.marketPrice
+ date,
+ value: marketPrice
};
}
);
@@ -142,6 +146,8 @@ export class PositionDetailDialog implements OnDestroy, OnInit {
this.marketPrice = marketPrice;
this.maxPrice = maxPrice;
this.minPrice = minPrice;
+ this.netPerformance = netPerformance;
+ this.netPerformancePercent = netPerformancePercent;
this.netPerformancePercentWithCurrencyEffect =
netPerformancePercentWithCurrencyEffect;
this.netPerformanceWithCurrencyEffect =
diff --git a/apps/client/src/app/components/position/position-detail-dialog/position-detail-dialog.html b/apps/client/src/app/components/position/position-detail-dialog/position-detail-dialog.html
index 537fe104d..9ae432a35 100644
--- a/apps/client/src/app/components/position/position-detail-dialog/position-detail-dialog.html
+++ b/apps/client/src/app/components/position/position-detail-dialog/position-detail-dialog.html
@@ -37,27 +37,58 @@
- Change
+ @if (
+ SymbolProfile?.currency &&
+ data.baseCurrency !== SymbolProfile?.currency
+ ) {
+ Change with currency effect
+ } @else {
+ Change
+ }
- Performance
+ @if (
+ SymbolProfile?.currency &&
+ data.baseCurrency !== SymbolProfile?.currency
+ ) {
+ Performance with currency effect
+ } @else {
+ Performance
+ }
apps/client/src/app/components/position/position-detail-dialog/position-detail-dialog.html
- 190
+ 221
apps/client/src/app/components/position/position-detail-dialog/position-detail-dialog.html
- 300
+ 331
apps/client/src/app/pages/portfolio/activities/activities-page.html
@@ -138,7 +138,7 @@
apps/client/src/app/components/admin-platform/create-or-update-platform-dialog/create-or-update-platform-dialog.html
- 7
+ 12
apps/client/src/app/components/admin-tag/admin-tag.component.html
@@ -146,7 +146,7 @@
apps/client/src/app/components/admin-tag/create-or-update-tag-dialog/create-or-update-tag-dialog.html
- 7
+ 12
apps/client/src/app/pages/accounts/create-or-update-account-dialog/create-or-update-account-dialog.html
@@ -154,7 +154,7 @@
apps/client/src/app/pages/portfolio/activities/create-or-update-activity-dialog/create-or-update-activity-dialog.html
- 138
+ 134
libs/ui/src/lib/activities-table/activities-table.component.html
@@ -190,31 +190,31 @@
apps/client/src/app/pages/portfolio/activities/create-or-update-activity-dialog/create-or-update-activity-dialog.html
- 198
+ 194
apps/client/src/app/pages/portfolio/activities/create-or-update-activity-dialog/create-or-update-activity-dialog.html
- 199
+ 195
apps/client/src/app/pages/portfolio/activities/create-or-update-activity-dialog/create-or-update-activity-dialog.html
- 201
+ 197
apps/client/src/app/pages/portfolio/activities/create-or-update-activity-dialog/create-or-update-activity-dialog.html
- 263
+ 257
apps/client/src/app/pages/portfolio/activities/create-or-update-activity-dialog/create-or-update-activity-dialog.html
- 264
+ 258
apps/client/src/app/pages/portfolio/activities/create-or-update-activity-dialog/create-or-update-activity-dialog.html
- 265
+ 259
apps/client/src/app/pages/portfolio/activities/create-or-update-activity-dialog/create-or-update-activity-dialog.html
- 266
+ 260
libs/ui/src/lib/account-balances/account-balances.component.html
@@ -338,7 +338,7 @@
apps/client/src/app/components/position/position-detail-dialog/position-detail-dialog.html
- 270
+ 301
@@ -354,7 +354,7 @@
apps/client/src/app/pages/portfolio/activities/create-or-update-activity-dialog/create-or-update-activity-dialog.html
- 154
+ 150
@@ -446,7 +446,7 @@
apps/client/src/app/pages/portfolio/activities/create-or-update-activity-dialog/create-or-update-activity-dialog.html
- 160
+ 156
libs/ui/src/lib/account-balances/account-balances.component.html
@@ -466,7 +466,7 @@
apps/client/src/app/components/position/position-detail-dialog/position-detail-dialog.html
- 81
+ 112
@@ -486,11 +486,11 @@
apps/client/src/app/components/admin-platform/create-or-update-platform-dialog/create-or-update-platform-dialog.html
- 26
+ 39
apps/client/src/app/components/admin-tag/create-or-update-tag-dialog/create-or-update-tag-dialog.html
- 13
+ 22
apps/client/src/app/components/user-account-access/create-or-update-access-dialog/create-or-update-access-dialog.html
@@ -506,7 +506,7 @@
apps/client/src/app/pages/portfolio/activities/create-or-update-activity-dialog/create-or-update-activity-dialog.html
- 408
+ 399
apps/client/src/app/pages/register/show-access-token-dialog/show-access-token-dialog.html
@@ -530,11 +530,11 @@
apps/client/src/app/components/admin-platform/create-or-update-platform-dialog/create-or-update-platform-dialog.html
- 33
+ 46
apps/client/src/app/components/admin-tag/create-or-update-tag-dialog/create-or-update-tag-dialog.html
- 20
+ 29
apps/client/src/app/components/user-account-access/create-or-update-access-dialog/create-or-update-access-dialog.html
@@ -546,7 +546,7 @@
apps/client/src/app/pages/portfolio/activities/create-or-update-activity-dialog/create-or-update-activity-dialog.html
- 415
+ 406
@@ -562,7 +562,7 @@
apps/client/src/app/components/position/position-detail-dialog/position-detail-dialog.html
- 178
+ 209
libs/ui/src/lib/holdings-table/holdings-table.component.html
@@ -842,7 +842,7 @@
apps/client/src/app/components/position/position-detail-dialog/position-detail-dialog.html
- 325
+ 356
apps/client/src/app/pages/accounts/accounts-page.html
@@ -1350,7 +1350,7 @@
apps/client/src/app/components/position/position-detail-dialog/position-detail-dialog.html
- 134
+ 165
@@ -1472,7 +1472,7 @@
apps/client/src/app/components/position/position-detail-dialog/position-detail-dialog.html
- 146
+ 177
apps/client/src/app/pages/features/features-page.html
@@ -1480,11 +1480,11 @@
apps/client/src/app/pages/portfolio/activities/create-or-update-activity-dialog/create-or-update-activity-dialog.html
- 196
+ 192
apps/client/src/app/pages/portfolio/activities/create-or-update-activity-dialog/create-or-update-activity-dialog.html
- 261
+ 255
@@ -1508,7 +1508,7 @@
apps/client/src/app/components/position/position-detail-dialog/position-detail-dialog.html
- 239
+ 270
apps/client/src/app/pages/public/public-page.html
@@ -1528,7 +1528,7 @@
apps/client/src/app/components/position/position-detail-dialog/position-detail-dialog.html
- 251
+ 282
@@ -1540,11 +1540,11 @@
apps/client/src/app/components/position/position-detail-dialog/position-detail-dialog.html
- 345
+ 376
apps/client/src/app/pages/portfolio/activities/create-or-update-activity-dialog/create-or-update-activity-dialog.html
- 363
+ 355
libs/ui/src/lib/assistant/assistant.html
@@ -1556,7 +1556,7 @@
Datenfehler melden
apps/client/src/app/components/position/position-detail-dialog/position-detail-dialog.html
- 363
+ 394
@@ -1576,7 +1576,7 @@
apps/client/src/app/components/position/position-detail-dialog/position-detail-dialog.html
- 59
+ 89
libs/ui/src/lib/holdings-table/holdings-table.component.html
@@ -2076,7 +2076,7 @@
apps/client/src/app/pages/portfolio/activities/create-or-update-activity-dialog/create-or-update-activity-dialog.html
- 144
+ 140
libs/ui/src/lib/activities-table/activities-table.component.html
@@ -2448,7 +2448,7 @@
apps/client/src/app/pages/portfolio/activities/create-or-update-activity-dialog/create-or-update-activity-dialog.html
- 122
+ 120
@@ -2456,11 +2456,11 @@
Anzahl
apps/client/src/app/components/position/position-detail-dialog/position-detail-dialog.html
- 123
+ 154
apps/client/src/app/pages/portfolio/activities/create-or-update-activity-dialog/create-or-update-activity-dialog.html
- 183
+ 179
libs/ui/src/lib/activities-table/activities-table.component.html
@@ -2472,11 +2472,11 @@
Stückpreis
apps/client/src/app/pages/portfolio/activities/create-or-update-activity-dialog/create-or-update-activity-dialog.html
- 203
+ 199
apps/client/src/app/pages/portfolio/activities/create-or-update-activity-dialog/create-or-update-activity-dialog.html
- 267
+ 261
libs/ui/src/lib/activities-table/activities-table.component.html
@@ -2488,11 +2488,11 @@
Gebühr
apps/client/src/app/pages/portfolio/activities/create-or-update-activity-dialog/create-or-update-activity-dialog.html
- 286
+ 280
apps/client/src/app/pages/portfolio/activities/create-or-update-activity-dialog/create-or-update-activity-dialog.html
- 310
+ 302
libs/ui/src/lib/activities-table/activities-table.component.html
@@ -2512,7 +2512,7 @@
apps/client/src/app/pages/portfolio/activities/create-or-update-activity-dialog/create-or-update-activity-dialog.html
- 319
+ 311
@@ -2532,11 +2532,11 @@
apps/client/src/app/components/position/position-detail-dialog/position-detail-dialog.html
- 197
+ 228
apps/client/src/app/pages/portfolio/activities/create-or-update-activity-dialog/create-or-update-activity-dialog.html
- 334
+ 326
@@ -2852,7 +2852,7 @@
Änderung
apps/client/src/app/components/position/position-detail-dialog/position-detail-dialog.html
- 48
+ 63
@@ -2860,7 +2860,7 @@
Ø Preis pro Einheit
apps/client/src/app/components/position/position-detail-dialog/position-detail-dialog.html
- 70
+ 101
@@ -2868,7 +2868,7 @@
Minimum Preis
apps/client/src/app/components/position/position-detail-dialog/position-detail-dialog.html
- 97
+ 128
@@ -2876,7 +2876,7 @@
Maximum Preis
apps/client/src/app/components/position/position-detail-dialog/position-detail-dialog.html
- 113
+ 144
@@ -2896,11 +2896,11 @@
apps/client/src/app/components/position/position-detail-dialog/position-detail-dialog.html
- 206
+ 237
apps/client/src/app/pages/portfolio/activities/create-or-update-activity-dialog/create-or-update-activity-dialog.html
- 350
+ 342
@@ -2912,7 +2912,7 @@
apps/client/src/app/components/position/position-detail-dialog/position-detail-dialog.html
- 223
+ 254
@@ -2928,7 +2928,7 @@
apps/client/src/app/components/position/position-detail-dialog/position-detail-dialog.html
- 233
+ 264
@@ -2972,7 +2972,7 @@
Projizierter Gesamtbetrag
libs/ui/src/lib/fire-calculator/fire-calculator.component.html
- 60
+ 57
@@ -3924,7 +3924,7 @@
apps/client/src/app/components/position/position-detail-dialog/position-detail-dialog.html
- 168
+ 199
apps/client/src/app/pages/portfolio/fire/fire-page.html
@@ -4028,7 +4028,7 @@
Ups! Der historische Wechselkurs konnte nicht abgerufen werden vom
apps/client/src/app/pages/portfolio/activities/create-or-update-activity-dialog/create-or-update-activity-dialog.html
- 300
+ 292
@@ -4136,7 +4136,7 @@
Plattform bearbeiten
apps/client/src/app/components/admin-platform/create-or-update-platform-dialog/create-or-update-platform-dialog.html
- 2
+ 7
@@ -4144,7 +4144,7 @@
Plattform hinzufügen
apps/client/src/app/components/admin-platform/create-or-update-platform-dialog/create-or-update-platform-dialog.html
- 3
+ 8
@@ -4160,7 +4160,7 @@
apps/client/src/app/components/admin-platform/create-or-update-platform-dialog/create-or-update-platform-dialog.html
- 13
+ 22
@@ -4184,7 +4184,7 @@
Cash-Bestand aktualisieren
apps/client/src/app/pages/portfolio/activities/create-or-update-activity-dialog/create-or-update-activity-dialog.html
- 110
+ 108
@@ -13236,7 +13236,7 @@
Ups! Der historische Wechselkurs konnte nicht abgerufen werden vom
apps/client/src/app/pages/portfolio/activities/create-or-update-activity-dialog/create-or-update-activity-dialog.html
- 232
+ 226
@@ -13284,7 +13284,7 @@
Tag bearbeiten
apps/client/src/app/components/admin-tag/create-or-update-tag-dialog/create-or-update-tag-dialog.html
- 2
+ 7
@@ -13292,7 +13292,7 @@
Tag hinzufügen
apps/client/src/app/components/admin-tag/create-or-update-tag-dialog/create-or-update-tag-dialog.html
- 3
+ 8
@@ -13736,7 +13736,7 @@
Ups, der Cash-Bestand Transfer ist fehlgeschlagen.
apps/client/src/app/pages/accounts/accounts-page.component.ts
- 308
+ 304
@@ -13784,7 +13784,7 @@
Ups! Die historischen Daten konnten nicht geparsed werden.
apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.component.ts
- 235
+ 236
@@ -14632,7 +14632,7 @@
Möchtest du diesen Cash-Bestand wirklich löschen?
libs/ui/src/lib/account-balances/account-balances.component.ts
- 104
+ 102
@@ -14656,7 +14656,7 @@
Der aktuelle Marktpreis ist
apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.component.ts
- 330
+ 342
@@ -14704,7 +14704,7 @@
Ups! Der Zugang konnte nicht gewährt werden.
apps/client/src/app/components/user-account-access/create-or-update-access-dialog/create-or-update-access-dialog.component.ts
- 80
+ 88
@@ -15000,7 +15000,7 @@
Aktivität
apps/client/src/app/components/position/position-detail-dialog/position-detail-dialog.html
- 188
+ 219
@@ -15008,7 +15008,7 @@
Dividendenrendite
apps/client/src/app/components/position/position-detail-dialog/position-detail-dialog.html
- 156
+ 187
@@ -15043,6 +15043,22 @@
43
+
+
+ Änderung mit Währungseffekt
+
+ apps/client/src/app/components/position/position-detail-dialog/position-detail-dialog.html
+ 52
+
+
+
+
+ Performance mit Währungseffekt
+
+ apps/client/src/app/components/position/position-detail-dialog/position-detail-dialog.html
+ 79
+
+