From eb8c80547066b85d2e85a0bed21eb920c65a5d02 Mon Sep 17 00:00:00 2001 From: Thomas <4159106+dtslvr@users.noreply.github.com> Date: Sat, 17 Sep 2022 21:16:38 +0200 Subject: [PATCH] Various improvements --- .../src/app/portfolio/portfolio.service.ts | 13 +++++--- .../allocations/allocations-page.html | 21 +++++++----- .../allocations/allocations-page.scss | 24 ++++++++++++++ apps/client/src/locales/messages.de.xlf | 32 ++++++++++++------- apps/client/src/locales/messages.it.xlf | 29 ++++++++++------- apps/client/src/locales/messages.xlf | 29 ++++++++++------- 6 files changed, 101 insertions(+), 47 deletions(-) diff --git a/apps/api/src/app/portfolio/portfolio.service.ts b/apps/api/src/app/portfolio/portfolio.service.ts index 397a52256..8868245c4 100644 --- a/apps/api/src/app/portfolio/portfolio.service.ts +++ b/apps/api/src/app/portfolio/portfolio.service.ts @@ -605,7 +605,7 @@ export class PortfolioService { filters: aFilters }); - const summary = await this.getSummary(userId); + const summary = await this.getSummary(aImpersonationId); return { accounts, @@ -942,9 +942,11 @@ export class PortfolioService { } public async getPerformance( - userId: string, + aImpersonationId: string, aDateRange: DateRange = 'max' ): Promise { + const userId = await this.getUserId(aImpersonationId, this.request.user.id); + const { portfolioOrders, transactionPoints } = await this.getTransactionPoints({ userId @@ -1102,11 +1104,12 @@ export class PortfolioService { }; } - public async getSummary(userId: string): Promise { - const user = await this.userService.user({ id: userId }); + public async getSummary(aImpersonationId: string): Promise { const userCurrency = this.request.user.Settings.settings.baseCurrency; + const userId = await this.getUserId(aImpersonationId, this.request.user.id); + const user = await this.userService.user({ id: userId }); - const performanceInformation = await this.getPerformance(userId); + const performanceInformation = await this.getPerformance(aImpersonationId); const { balanceInBaseCurrency } = await this.accountService.getCashDetails({ userId, diff --git a/apps/client/src/app/pages/portfolio/allocations/allocations-page.html b/apps/client/src/app/pages/portfolio/allocations/allocations-page.html index d6033ae6e..4a030c8a0 100644 --- a/apps/client/src/app/pages/portfolio/allocations/allocations-page.html +++ b/apps/client/src/app/pages/portfolio/allocations/allocations-page.html @@ -10,15 +10,20 @@ > -
+
-
- -
+ + + Proportion of Net Worth + + + + +
diff --git a/apps/client/src/app/pages/portfolio/allocations/allocations-page.scss b/apps/client/src/app/pages/portfolio/allocations/allocations-page.scss index 253660774..ca8b56096 100644 --- a/apps/client/src/app/pages/portfolio/allocations/allocations-page.scss +++ b/apps/client/src/app/pages/portfolio/allocations/allocations-page.scss @@ -32,5 +32,29 @@ .mat-progress-bar { border-radius: 0.25rem; height: 0.5rem; + + ::ng-deep { + .mat-progress-bar-background { + fill: rgb(var(--palette-background-unselected-chip)); + } + + .mat-progress-bar-buffer { + background-color: rgb(var(--palette-background-unselected-chip)); + } + } + } +} + +:host-context(.is-dark-theme) { + .mat-progress-bar { + ::ng-deep { + .mat-progress-bar-background { + fill: rgb(var(--palette-background-unselected-chip-dark)); + } + + .mat-progress-bar-buffer { + background-color: rgb(var(--palette-background-unselected-chip-dark)); + } + } } } diff --git a/apps/client/src/locales/messages.de.xlf b/apps/client/src/locales/messages.de.xlf index 8f17dc3e5..9289a3a75 100644 --- a/apps/client/src/locales/messages.de.xlf +++ b/apps/client/src/locales/messages.de.xlf @@ -1031,7 +1031,7 @@ Net Worth - Reinvermögen + Gesamtvermögen apps/client/src/app/components/portfolio-summary/portfolio-summary.component.html 179 @@ -1618,7 +1618,7 @@ Nach Konto apps/client/src/app/pages/portfolio/allocations/allocations-page.html - 17 + 33 @@ -1626,7 +1626,7 @@ Nach Währung apps/client/src/app/pages/portfolio/allocations/allocations-page.html - 42 + 58 @@ -1634,7 +1634,7 @@ Nach Asset Class apps/client/src/app/pages/portfolio/allocations/allocations-page.html - 70 + 86 @@ -1642,7 +1642,7 @@ Nach Position apps/client/src/app/pages/portfolio/allocations/allocations-page.html - 98 + 114 @@ -1650,7 +1650,7 @@ Nach Sektor apps/client/src/app/pages/portfolio/allocations/allocations-page.html - 126 + 142 @@ -1658,7 +1658,7 @@ Nach Kontinent apps/client/src/app/pages/portfolio/allocations/allocations-page.html - 155 + 171 @@ -1666,7 +1666,7 @@ Nach Land apps/client/src/app/pages/portfolio/allocations/allocations-page.html - 183 + 199 @@ -1674,7 +1674,7 @@ Regionen apps/client/src/app/pages/portfolio/allocations/allocations-page.html - 214 + 230 apps/client/src/app/pages/public/public-page.html @@ -2418,7 +2418,7 @@ Entwickelte Länder apps/client/src/app/pages/portfolio/allocations/allocations-page.html - 240 + 256 apps/client/src/app/pages/public/public-page.html @@ -2430,7 +2430,7 @@ Schwellenländer apps/client/src/app/pages/portfolio/allocations/allocations-page.html - 249 + 265 apps/client/src/app/pages/public/public-page.html @@ -2442,7 +2442,7 @@ Andere Länder apps/client/src/app/pages/portfolio/allocations/allocations-page.html - 258 + 274 apps/client/src/app/pages/public/public-page.html @@ -2637,6 +2637,14 @@ 120 + + Proportion of Net Worth + Anteil am Gesamtvermögen + + apps/client/src/app/pages/portfolio/allocations/allocations-page.html + 17 + + diff --git a/apps/client/src/locales/messages.it.xlf b/apps/client/src/locales/messages.it.xlf index e868bb4c0..01697c2ad 100644 --- a/apps/client/src/locales/messages.it.xlf +++ b/apps/client/src/locales/messages.it.xlf @@ -1453,56 +1453,56 @@ By Account apps/client/src/app/pages/portfolio/allocations/allocations-page.html - 17 + 33 By Currency apps/client/src/app/pages/portfolio/allocations/allocations-page.html - 42 + 58 By Asset Class apps/client/src/app/pages/portfolio/allocations/allocations-page.html - 70 + 86 By Holding apps/client/src/app/pages/portfolio/allocations/allocations-page.html - 98 + 114 By Sector apps/client/src/app/pages/portfolio/allocations/allocations-page.html - 126 + 142 By Continent apps/client/src/app/pages/portfolio/allocations/allocations-page.html - 155 + 171 By Country apps/client/src/app/pages/portfolio/allocations/allocations-page.html - 183 + 199 Regions apps/client/src/app/pages/portfolio/allocations/allocations-page.html - 214 + 230 apps/client/src/app/pages/public/public-page.html @@ -2104,7 +2104,7 @@ Developed Markets apps/client/src/app/pages/portfolio/allocations/allocations-page.html - 240 + 256 apps/client/src/app/pages/public/public-page.html @@ -2144,7 +2144,7 @@ Other Markets apps/client/src/app/pages/portfolio/allocations/allocations-page.html - 258 + 274 apps/client/src/app/pages/public/public-page.html @@ -2155,7 +2155,7 @@ Emerging Markets apps/client/src/app/pages/portfolio/allocations/allocations-page.html - 249 + 265 apps/client/src/app/pages/public/public-page.html @@ -2356,6 +2356,13 @@ 14 + + Proportion of Net Worth + + apps/client/src/app/pages/portfolio/allocations/allocations-page.html + 17 + + diff --git a/apps/client/src/locales/messages.xlf b/apps/client/src/locales/messages.xlf index 548e017d3..670583b59 100644 --- a/apps/client/src/locales/messages.xlf +++ b/apps/client/src/locales/messages.xlf @@ -1453,56 +1453,56 @@ By Account apps/client/src/app/pages/portfolio/allocations/allocations-page.html - 17 + 33 By Currency apps/client/src/app/pages/portfolio/allocations/allocations-page.html - 42 + 58 By Asset Class apps/client/src/app/pages/portfolio/allocations/allocations-page.html - 70 + 86 By Holding apps/client/src/app/pages/portfolio/allocations/allocations-page.html - 98 + 114 By Sector apps/client/src/app/pages/portfolio/allocations/allocations-page.html - 126 + 142 By Continent apps/client/src/app/pages/portfolio/allocations/allocations-page.html - 155 + 171 By Country apps/client/src/app/pages/portfolio/allocations/allocations-page.html - 183 + 199 Regions apps/client/src/app/pages/portfolio/allocations/allocations-page.html - 214 + 230 apps/client/src/app/pages/public/public-page.html @@ -2104,7 +2104,7 @@ Developed Markets apps/client/src/app/pages/portfolio/allocations/allocations-page.html - 240 + 256 apps/client/src/app/pages/public/public-page.html @@ -2144,7 +2144,7 @@ Other Markets apps/client/src/app/pages/portfolio/allocations/allocations-page.html - 258 + 274 apps/client/src/app/pages/public/public-page.html @@ -2155,7 +2155,7 @@ Emerging Markets apps/client/src/app/pages/portfolio/allocations/allocations-page.html - 249 + 265 apps/client/src/app/pages/public/public-page.html @@ -2356,6 +2356,13 @@ 14 + + Proportion of Net Worth + + apps/client/src/app/pages/portfolio/allocations/allocations-page.html + 17 + + \ No newline at end of file