From e88dbb018189c9bc01836162ea3e339fdfd3776f Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Thu, 12 Jan 2023 20:14:00 +0100 Subject: [PATCH 01/26] Fix wording (#1593) --- apps/client/src/app/pages/features/features-page.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/client/src/app/pages/features/features-page.html b/apps/client/src/app/pages/features/features-page.html index 05cdd8454..aaac67a0c 100644 --- a/apps/client/src/app/pages/features/features-page.html +++ b/apps/client/src/app/pages/features/features-page.html @@ -197,7 +197,7 @@

Multi-Language

- Use Ghostfolio in multiple languages: English, Dutch, Français, + Use Ghostfolio in multiple languages: English, Dutch, French, German, Italian, Portuguese From 7ad58b1a62d5142ad368c0a7eb7096321d1a76ba Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Fri, 13 Jan 2023 08:58:13 +0100 Subject: [PATCH 02/26] Add i18n (#1594) --- apps/client/src/app/pages/account/account-page.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/client/src/app/pages/account/account-page.html b/apps/client/src/app/pages/account/account-page.html index c9ed454e4..a3f69f2c5 100644 --- a/apps/client/src/app/pages/account/account-page.html +++ b/apps/client/src/app/pages/account/account-page.html @@ -24,8 +24,8 @@ >

- Valid until {{ user?.subscription?.expiresAt | date: - defaultDateFormat }} + Valid until {{ + user?.subscription?.expiresAt | date: defaultDateFormat }}
From 104cca069f57a7f551fd073630c11eb1e3ce5e2c Mon Sep 17 00:00:00 2001 From: Martin Vandenbussche Date: Fri, 13 Jan 2023 16:19:48 +0100 Subject: [PATCH 03/26] New Translations (#1597) --- apps/client/src/locales/messages.fr.xlf | 8 ++++---- apps/client/src/locales/messages.nl.xlf | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/client/src/locales/messages.fr.xlf b/apps/client/src/locales/messages.fr.xlf index dd0a3556a..31e3a7ef4 100644 --- a/apps/client/src/locales/messages.fr.xlf +++ b/apps/client/src/locales/messages.fr.xlf @@ -3058,7 +3058,7 @@ Holding - Holding + Position apps/client/src/app/pages/portfolio/activities/import-activities-dialog/import-activities-dialog.html 13,15 @@ -3066,7 +3066,7 @@ Load Dividends - Load Dividends + Charger Dividendes apps/client/src/app/pages/portfolio/activities/import-activities-dialog/import-activities-dialog.html 29,33 @@ -3074,7 +3074,7 @@ Yearly - Yearly + Annuel apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts 55 @@ -3082,7 +3082,7 @@ Import Dividends - Import Dividends + Importer Dividendes libs/ui/src/lib/activities-table/activities-table.component.html 397 diff --git a/apps/client/src/locales/messages.nl.xlf b/apps/client/src/locales/messages.nl.xlf index 7e31054bf..2a6be39df 100644 --- a/apps/client/src/locales/messages.nl.xlf +++ b/apps/client/src/locales/messages.nl.xlf @@ -3059,7 +3059,7 @@ Holding - Holding + Participatie apps/client/src/app/pages/portfolio/activities/import-activities-dialog/import-activities-dialog.html 13,15 @@ -3075,7 +3075,7 @@ Yearly - Yearly + Jaarlijks apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts 55 From 69a9e7782021ddb99fffbb9e9718eae176dfcd36 Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Sat, 14 Jan 2023 12:22:52 +0100 Subject: [PATCH 04/26] Feature/improve logo alignment (#1599) * Improve logo alignment * Update changelog --- CHANGELOG.md | 6 ++++++ libs/ui/src/lib/logo/logo.component.scss | 1 + 2 files changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2810057f0..950048731 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 logo alignment + ## 1.226.0 - 2023-01-11 ### Added diff --git a/libs/ui/src/lib/logo/logo.component.scss b/libs/ui/src/lib/logo/logo.component.scss index 176f46126..27fb1b311 100644 --- a/libs/ui/src/lib/logo/logo.component.scss +++ b/libs/ui/src/lib/logo/logo.component.scss @@ -5,6 +5,7 @@ .logo { background-color: rgba(var(--dark-primary-text)); + margin-top: -2px; mask: url('/assets/ghost.svg') no-repeat center; } } From 0878941c4fdd59eae059e1de58e38bcc421e0e8d Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Sat, 14 Jan 2023 12:36:30 +0100 Subject: [PATCH 05/26] Feature/support translated tags (#1600) * Support translated tags * Update changelog --- CHANGELOG.md | 4 ++++ .../position-detail-dialog.component.ts | 7 ++++++- ...create-or-update-activity-dialog.component.ts | 16 ++++++++++++++-- .../allocations/allocations-page.component.ts | 2 +- .../analysis/analysis-page.component.ts | 2 +- .../holdings/holdings-page.component.ts | 2 +- libs/ui/src/lib/i18n.ts | 6 ++++++ 7 files changed, 33 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 950048731..0ba82f65b 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 support for translated tags + ### Changed - Improved the logo alignment 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 8d19b846e..870971cbc 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 @@ -125,7 +125,12 @@ export class PositionDetailDialog implements OnDestroy, OnInit { this.quantity = quantity; this.sectors = {}; this.SymbolProfile = SymbolProfile; - this.tags = tags; + this.tags = tags.map(({ id, name }) => { + return { + id, + name: translate(name) + }; + }); this.transactionCount = transactionCount; this.value = value; diff --git a/apps/client/src/app/pages/portfolio/activities/create-or-update-activity-dialog/create-or-update-activity-dialog.component.ts b/apps/client/src/app/pages/portfolio/activities/create-or-update-activity-dialog/create-or-update-activity-dialog.component.ts index d4a876bc7..f9f5a595f 100644 --- a/apps/client/src/app/pages/portfolio/activities/create-or-update-activity-dialog/create-or-update-activity-dialog.component.ts +++ b/apps/client/src/app/pages/portfolio/activities/create-or-update-activity-dialog/create-or-update-activity-dialog.component.ts @@ -83,7 +83,12 @@ export class CreateOrUpdateActivityDialog implements OnDestroy { this.currencies = currencies; this.platforms = platforms; - this.tags = tags; + this.tags = tags.map(({ id, name }) => { + return { + id, + name: translate(name) + }; + }); this.activityForm = this.formBuilder.group({ accountId: [this.data.activity?.accountId, Validators.required], @@ -114,7 +119,14 @@ export class CreateOrUpdateActivityDialog implements OnDestroy { }, Validators.required ], - tags: [this.data.activity?.tags], + tags: [ + this.data.activity?.tags.map(({ id, name }) => { + return { + id, + name: translate(name) + }; + }) + ], type: [undefined, Validators.required], // Set after value changes subscription unitPrice: [this.data.activity?.unitPrice, Validators.required] }); diff --git a/apps/client/src/app/pages/portfolio/allocations/allocations-page.component.ts b/apps/client/src/app/pages/portfolio/allocations/allocations-page.component.ts index 16cad4a90..6a5a57c82 100644 --- a/apps/client/src/app/pages/portfolio/allocations/allocations-page.component.ts +++ b/apps/client/src/app/pages/portfolio/allocations/allocations-page.component.ts @@ -183,7 +183,7 @@ export class AllocationsPageComponent implements OnDestroy, OnInit { const tagFilters: Filter[] = this.user.tags.map(({ id, name }) => { return { id, - label: name, + label: translate(name), type: 'TAG' }; }); 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.ts index 84a0be896..e91c13a11 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 @@ -159,7 +159,7 @@ export class AnalysisPageComponent implements OnDestroy, OnInit { const tagFilters: Filter[] = this.user.tags.map(({ id, name }) => { return { id, - label: name, + label: translate(name), type: 'TAG' }; }); diff --git a/apps/client/src/app/pages/portfolio/holdings/holdings-page.component.ts b/apps/client/src/app/pages/portfolio/holdings/holdings-page.component.ts index 16f96a700..64fe3d7c5 100644 --- a/apps/client/src/app/pages/portfolio/holdings/holdings-page.component.ts +++ b/apps/client/src/app/pages/portfolio/holdings/holdings-page.component.ts @@ -138,7 +138,7 @@ export class HoldingsPageComponent implements OnDestroy, OnInit { const tagFilters: Filter[] = this.user.tags.map(({ id, name }) => { return { id, - label: name, + label: translate(name), type: 'TAG' }; }); diff --git a/libs/ui/src/lib/i18n.ts b/libs/ui/src/lib/i18n.ts index 58021d194..d0f913abc 100644 --- a/libs/ui/src/lib/i18n.ts +++ b/libs/ui/src/lib/i18n.ts @@ -4,8 +4,14 @@ const locales = { ACCOUNT: $localize`Account`, ASSET_CLASS: $localize`Asset Class`, ASSET_SUB_CLASS: $localize`Asset Sub Class`, + CORE: $localize`Core`, EMERGENCY_FUND: $localize`Emergency Fund`, + GRANT: $localize`Grant`, + HIGHER_RISK: $localize`Higher Risk`, + LOWER_RISK: $localize`Lower Risk`, OTHER: $localize`Other`, + RETIREMENT_PROVISION: $localize`Retirement Provision`, + SATELLITE: $localize`Satellite`, SECURITIES: $localize`Securities`, SYMBOL: $localize`Symbol`, TAG: $localize`Tag`, From d147c2313f4af7c4a431c86d51aa79863d719c1d Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Sat, 14 Jan 2023 13:13:26 +0100 Subject: [PATCH 06/26] Feature/support assets in emergency fund (#1601) * Support assets in emergency fund * Update changelog --- CHANGELOG.md | 1 + .../src/app/portfolio/portfolio.service.ts | 117 ++++++++++++------ prisma/seed.js | 10 ++ 3 files changed, 92 insertions(+), 36 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0ba82f65b..870ffd245 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added +- Added support for assets other than cash in emergency fund (affecting buying power) - Added support for translated tags ### Changed diff --git a/apps/api/src/app/portfolio/portfolio.service.ts b/apps/api/src/app/portfolio/portfolio.service.ts index f752010b3..a50ffbad3 100644 --- a/apps/api/src/app/portfolio/portfolio.service.ts +++ b/apps/api/src/app/portfolio/portfolio.service.ts @@ -1,5 +1,6 @@ import { AccountService } from '@ghostfolio/api/app/account/account.service'; import { CashDetails } from '@ghostfolio/api/app/account/interfaces/cash-details.interface'; +import { Activity } from '@ghostfolio/api/app/order/interfaces/activities.interface'; import { OrderService } from '@ghostfolio/api/app/order/order.service'; import { CurrentRateService } from '@ghostfolio/api/app/portfolio/current-rate.service'; import { PortfolioOrder } from '@ghostfolio/api/app/portfolio/interfaces/portfolio-order.interface'; @@ -597,7 +598,12 @@ export class PortfolioService { const summary = await this.getSummary({ impersonationId, userCurrency, - userId + userId, + balanceInBaseCurrency: cashDetails.balanceInBaseCurrency, + emergencyFundPositionsValueInBaseCurrency: + this.getEmergencyFundPositionsValueInBaseCurrency({ + activities: orders + }) }); return { @@ -1167,7 +1173,7 @@ export class PortfolioService { new FeeRatioInitialInvestment( this.exchangeRateDataService, currentPositions.totalInvestment.toNumber(), - this.getFees({ orders, userCurrency }).toNumber() + this.getFees({ userCurrency, activities: orders }).toNumber() ) ], this.request.user.Settings.settings @@ -1254,26 +1260,27 @@ export class PortfolioService { } private getDividend({ + activities, date = new Date(0), - orders, userCurrency }: { + activities: OrderWithAccount[]; date?: Date; - orders: OrderWithAccount[]; + userCurrency: string; }) { - return orders - .filter((order) => { - // Filter out all orders before given date and type dividend + return activities + .filter((activity) => { + // Filter out all activities before given date and type dividend return ( - isBefore(date, new Date(order.date)) && - order.type === TypeOfOrder.DIVIDEND + isBefore(date, new Date(activity.date)) && + activity.type === TypeOfOrder.DIVIDEND ); }) - .map((order) => { + .map(({ quantity, SymbolProfile, unitPrice }) => { return this.exchangeRateDataService.toCurrency( - new Big(order.quantity).mul(order.unitPrice).toNumber(), - order.SymbolProfile.currency, + new Big(quantity).mul(unitPrice).toNumber(), + SymbolProfile.currency, userCurrency ); }) @@ -1345,24 +1352,56 @@ export class PortfolioService { return dividendsByGroup; } + private getEmergencyFundPositionsValueInBaseCurrency({ + activities + }: { + activities: Activity[]; + }) { + const emergencyFundOrders = activities.filter((activity) => { + return ( + activity.tags?.some(({ name }) => { + return name === 'EMERGENCY_FUND'; + }) ?? false + ); + }); + + let valueInBaseCurrencyOfEmergencyFundPositions = new Big(0); + + for (const order of emergencyFundOrders) { + if (order.type === 'BUY') { + valueInBaseCurrencyOfEmergencyFundPositions = + valueInBaseCurrencyOfEmergencyFundPositions.plus( + order.valueInBaseCurrency + ); + } else if (order.type === 'SELL') { + valueInBaseCurrencyOfEmergencyFundPositions = + valueInBaseCurrencyOfEmergencyFundPositions.minus( + order.valueInBaseCurrency + ); + } + } + + return valueInBaseCurrencyOfEmergencyFundPositions.toNumber(); + } + private getFees({ + activities, date = new Date(0), - orders, userCurrency }: { + activities: OrderWithAccount[]; date?: Date; - orders: OrderWithAccount[]; userCurrency: string; }) { - return orders - .filter((order) => { - // Filter out all orders before given date - return isBefore(date, new Date(order.date)); + return activities + .filter((activity) => { + // Filter out all activities before given date + return isBefore(date, new Date(activity.date)); }) - .map((order) => { + .map(({ fee, SymbolProfile }) => { return this.exchangeRateDataService.toCurrency( - order.fee, - order.SymbolProfile.currency, + fee, + SymbolProfile.currency, userCurrency ); }) @@ -1445,10 +1484,14 @@ export class PortfolioService { } private async getSummary({ + balanceInBaseCurrency, + emergencyFundPositionsValueInBaseCurrency, impersonationId, userCurrency, userId }: { + balanceInBaseCurrency: number; + emergencyFundPositionsValueInBaseCurrency: number; impersonationId: string; userCurrency: string; userId: string; @@ -1461,11 +1504,7 @@ export class PortfolioService { userId }); - const { balanceInBaseCurrency } = await this.accountService.getCashDetails({ - userId, - currency: userCurrency - }); - const orders = await this.orderService.getOrders({ + const activities = await this.orderService.getOrders({ userCurrency, userId }); @@ -1480,18 +1519,24 @@ export class PortfolioService { return account?.isExcluded ?? false; }); - const dividend = this.getDividend({ orders, userCurrency }).toNumber(); + const dividend = this.getDividend({ + activities, + userCurrency + }).toNumber(); const emergencyFund = new Big( (user.Settings?.settings as UserSettings)?.emergencyFund ?? 0 ); - const fees = this.getFees({ orders, userCurrency }).toNumber(); - const firstOrderDate = orders[0]?.date; - const items = this.getItems(orders).toNumber(); + const fees = this.getFees({ activities, userCurrency }).toNumber(); + const firstOrderDate = activities[0]?.date; + const items = this.getItems(activities).toNumber(); - const totalBuy = this.getTotalByType(orders, userCurrency, 'BUY'); - const totalSell = this.getTotalByType(orders, userCurrency, 'SELL'); + const totalBuy = this.getTotalByType(activities, userCurrency, 'BUY'); + const totalSell = this.getTotalByType(activities, userCurrency, 'SELL'); - const cash = new Big(balanceInBaseCurrency).minus(emergencyFund).toNumber(); + const cash = new Big(balanceInBaseCurrency) + .minus(emergencyFund) + .plus(emergencyFundPositionsValueInBaseCurrency) + .toNumber(); const committedFunds = new Big(totalBuy).minus(totalSell); const totalOfExcludedActivities = new Big( this.getTotalByType(excludedActivities, userCurrency, 'BUY') @@ -1547,8 +1592,8 @@ export class PortfolioService { totalSell, committedFunds: committedFunds.toNumber(), emergencyFund: emergencyFund.toNumber(), - ordersCount: orders.filter((order) => { - return order.type === 'BUY' || order.type === 'SELL'; + ordersCount: activities.filter(({ type }) => { + return type === 'BUY' || type === 'SELL'; }).length }; } @@ -1565,7 +1610,7 @@ export class PortfolioService { withExcludedAccounts?: boolean; }): Promise<{ transactionPoints: TransactionPoint[]; - orders: OrderWithAccount[]; + orders: Activity[]; portfolioOrders: PortfolioOrder[]; }> { const userCurrency = diff --git a/prisma/seed.js b/prisma/seed.js index 72a87259f..b94c11316 100644 --- a/prisma/seed.js +++ b/prisma/seed.js @@ -288,6 +288,16 @@ async function main() { skipDuplicates: true }); + await prisma.tag.createMany({ + data: [ + { + id: '4452656d-9fa4-4bd0-ba38-70492e31d180', + name: 'EMERGENCY_FUND' + } + ], + skipDuplicates: true + }); + console.log({ platformBitcoinSuisse, platformBitpanda, From bb99141e9c57e8dade618d8a7b693286bd33e89c Mon Sep 17 00:00:00 2001 From: Yash Solanki Date: Sat, 14 Jan 2023 18:00:51 +0530 Subject: [PATCH 07/26] Fix group by month/year not working for YTD (#1598) * Set time to 00:00:00 when getting current timestamp * Update changelog --- CHANGELOG.md | 4 ++++ .../src/app/portfolio/portfolio.service.ts | 20 +++++++++++++++---- .../investment-chart.component.ts | 5 ++++- 3 files changed, 24 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 870ffd245..29bd4c1d3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Improved the logo alignment +### Fixed + +- Fixed the grouping by month / year of the dividend and investment timeline + ## 1.226.0 - 2023-01-11 ### Added diff --git a/apps/api/src/app/portfolio/portfolio.service.ts b/apps/api/src/app/portfolio/portfolio.service.ts index a50ffbad3..67941f12b 100644 --- a/apps/api/src/app/portfolio/portfolio.service.ts +++ b/apps/api/src/app/portfolio/portfolio.service.ts @@ -1468,16 +1468,28 @@ export class PortfolioService { private getStartDate(aDateRange: DateRange, portfolioStart: Date) { switch (aDateRange) { case '1d': - portfolioStart = max([portfolioStart, subDays(new Date(), 1)]); + portfolioStart = max([ + portfolioStart, + subDays(new Date().setHours(0, 0, 0, 0), 1) + ]); break; case 'ytd': - portfolioStart = max([portfolioStart, setDayOfYear(new Date(), 1)]); + portfolioStart = max([ + portfolioStart, + setDayOfYear(new Date().setHours(0, 0, 0, 0), 1) + ]); break; case '1y': - portfolioStart = max([portfolioStart, subYears(new Date(), 1)]); + portfolioStart = max([ + portfolioStart, + subYears(new Date().setHours(0, 0, 0, 0), 1) + ]); break; case '5y': - portfolioStart = max([portfolioStart, subYears(new Date(), 5)]); + portfolioStart = max([ + portfolioStart, + subYears(new Date().setHours(0, 0, 0, 0), 5) + ]); break; } return portfolioStart; diff --git a/apps/client/src/app/components/investment-chart/investment-chart.component.ts b/apps/client/src/app/components/investment-chart/investment-chart.component.ts index bfce434e8..734fe704f 100644 --- a/apps/client/src/app/components/investment-chart/investment-chart.component.ts +++ b/apps/client/src/app/components/investment-chart/investment-chart.component.ts @@ -196,7 +196,10 @@ export class InvestmentChartComponent implements OnChanges, OnDestroy { this.getTooltipPluginConfiguration() ); this.chart.options.scales.x.min = this.daysInMarket - ? subDays(new Date(), this.daysInMarket).toISOString() + ? subDays( + new Date().setHours(0, 0, 0, 0), + this.daysInMarket + ).toISOString() : undefined; if ( From 9e8a9e4670779e29cddcea1d42afa2fd547cb6b2 Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Sat, 14 Jan 2023 13:37:06 +0100 Subject: [PATCH 08/26] Release 1.227.0 (#1603) --- CHANGELOG.md | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 29bd4c1d3..923a69319 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ 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 +## 1.227.0 - 2023-01-14 ### Added diff --git a/package.json b/package.json index a41b54f92..1364f7f66 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ghostfolio", - "version": "1.226.0", + "version": "1.227.0", "homepage": "https://ghostfol.io", "license": "AGPL-3.0", "scripts": { From 4da8a547ca36040191bb4774096b6873a76ecfec Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Sat, 14 Jan 2023 19:10:28 +0100 Subject: [PATCH 09/26] Bugfix/fix create activity dialog caused by missing tags (#1606) * Add guard * Update changelog --- CHANGELOG.md | 6 ++++++ .../create-or-update-activity-dialog.component.ts | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 923a69319..38e9cc1bd 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 + +### Fixed + +- Fixed the create or edit activity dialog + ## 1.227.0 - 2023-01-14 ### Added diff --git a/apps/client/src/app/pages/portfolio/activities/create-or-update-activity-dialog/create-or-update-activity-dialog.component.ts b/apps/client/src/app/pages/portfolio/activities/create-or-update-activity-dialog/create-or-update-activity-dialog.component.ts index f9f5a595f..8b967ab0e 100644 --- a/apps/client/src/app/pages/portfolio/activities/create-or-update-activity-dialog/create-or-update-activity-dialog.component.ts +++ b/apps/client/src/app/pages/portfolio/activities/create-or-update-activity-dialog/create-or-update-activity-dialog.component.ts @@ -120,7 +120,7 @@ export class CreateOrUpdateActivityDialog implements OnDestroy { Validators.required ], tags: [ - this.data.activity?.tags.map(({ id, name }) => { + this.data.activity?.tags?.map(({ id, name }) => { return { id, name: translate(name) From efac39eb51508261b1a03266157deb6585dd8a8e Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Sat, 14 Jan 2023 19:11:14 +0100 Subject: [PATCH 10/26] Feature/extract locales 20230114 (#1607) * Extract locales * Update changelog --- CHANGELOG.md | 4 + apps/client/src/locales/messages.de.xlf | 104 ++++++++++++++++++------ apps/client/src/locales/messages.es.xlf | 104 ++++++++++++++++++------ apps/client/src/locales/messages.fr.xlf | 104 ++++++++++++++++++------ apps/client/src/locales/messages.it.xlf | 104 ++++++++++++++++++------ apps/client/src/locales/messages.nl.xlf | 104 ++++++++++++++++++------ apps/client/src/locales/messages.pt.xlf | 104 ++++++++++++++++++------ apps/client/src/locales/messages.xlf | 97 ++++++++++++++++------ 8 files changed, 557 insertions(+), 168 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 38e9cc1bd..1badd9dab 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 +### Changed + +- Improved the language localization for German (`de`) + ### Fixed - Fixed the create or edit activity dialog diff --git a/apps/client/src/locales/messages.de.xlf b/apps/client/src/locales/messages.de.xlf index 558f53694..2d4a87fb7 100644 --- a/apps/client/src/locales/messages.de.xlf +++ b/apps/client/src/locales/messages.de.xlf @@ -2690,7 +2690,7 @@ Sparrate apps/client/src/app/components/investment-chart/investment-chart.component.ts - 239 + 242 @@ -2714,7 +2714,7 @@ Symbol libs/ui/src/lib/i18n.ts - 10 + 16 @@ -2722,7 +2722,7 @@ Tag libs/ui/src/lib/i18n.ts - 11 + 17 @@ -2730,7 +2730,7 @@ Bargeld libs/ui/src/lib/i18n.ts - 14 + 20 @@ -2738,7 +2738,7 @@ Rohstoff libs/ui/src/lib/i18n.ts - 15 + 21 @@ -2746,7 +2746,7 @@ Anteilskapital libs/ui/src/lib/i18n.ts - 16 + 22 @@ -2754,7 +2754,7 @@ Feste Einkünfte libs/ui/src/lib/i18n.ts - 17 + 23 @@ -2762,7 +2762,7 @@ Immobilien libs/ui/src/lib/i18n.ts - 18 + 24 @@ -2770,7 +2770,7 @@ Anleihe libs/ui/src/lib/i18n.ts - 21 + 27 @@ -2778,7 +2778,7 @@ Kryptowährung libs/ui/src/lib/i18n.ts - 22 + 28 @@ -2786,7 +2786,7 @@ ETF libs/ui/src/lib/i18n.ts - 23 + 29 @@ -2794,7 +2794,7 @@ Investmentfonds libs/ui/src/lib/i18n.ts - 24 + 30 @@ -2802,7 +2802,7 @@ Edelmetall libs/ui/src/lib/i18n.ts - 25 + 31 @@ -2810,7 +2810,7 @@ Privates Beteiligungskapital libs/ui/src/lib/i18n.ts - 26 + 32 @@ -2818,7 +2818,7 @@ Aktie libs/ui/src/lib/i18n.ts - 27 + 33 @@ -2826,7 +2826,7 @@ Notfallfonds libs/ui/src/lib/i18n.ts - 7 + 8 @@ -2834,7 +2834,7 @@ Andere libs/ui/src/lib/i18n.ts - 8 + 12 libs/ui/src/lib/portfolio-proportion-chart/portfolio-proportion-chart.component.ts @@ -2858,7 +2858,7 @@ Nordamerika libs/ui/src/lib/i18n.ts - 33 + 39 @@ -2866,7 +2866,7 @@ Afrika libs/ui/src/lib/i18n.ts - 30 + 36 @@ -2874,7 +2874,7 @@ Asien libs/ui/src/lib/i18n.ts - 31 + 37 @@ -2882,7 +2882,7 @@ Europa libs/ui/src/lib/i18n.ts - 32 + 38 @@ -2890,7 +2890,7 @@ Ozeanien libs/ui/src/lib/i18n.ts - 34 + 40 @@ -2898,7 +2898,7 @@ Südamerika libs/ui/src/lib/i18n.ts - 35 + 41 @@ -3022,7 +3022,7 @@ Wertschriften libs/ui/src/lib/i18n.ts - 9 + 15 @@ -3089,6 +3089,62 @@ 397 + + Valid until + Gültig bis + + apps/client/src/app/pages/account/account-page.html + 27 + + + + Core + Kern + + libs/ui/src/lib/i18n.ts + 7 + + + + Grant + Zuwendung + + libs/ui/src/lib/i18n.ts + 9 + + + + Higher Risk + Höheres Risiko + + libs/ui/src/lib/i18n.ts + 10 + + + + Lower Risk + Geringeres Risiko + + libs/ui/src/lib/i18n.ts + 11 + + + + Retirement Provision + Altersvorsorge + + libs/ui/src/lib/i18n.ts + 13 + + + + Satellite + Satellit + + libs/ui/src/lib/i18n.ts + 14 + + diff --git a/apps/client/src/locales/messages.es.xlf b/apps/client/src/locales/messages.es.xlf index c95a85501..10c99138e 100644 --- a/apps/client/src/locales/messages.es.xlf +++ b/apps/client/src/locales/messages.es.xlf @@ -2691,7 +2691,7 @@ Tasa de ahorro apps/client/src/app/components/investment-chart/investment-chart.component.ts - 239 + 242 @@ -2715,7 +2715,7 @@ Símbolo libs/ui/src/lib/i18n.ts - 10 + 16 @@ -2723,7 +2723,7 @@ Etiqueta libs/ui/src/lib/i18n.ts - 11 + 17 @@ -2731,7 +2731,7 @@ Efectivo libs/ui/src/lib/i18n.ts - 14 + 20 @@ -2739,7 +2739,7 @@ Bien libs/ui/src/lib/i18n.ts - 15 + 21 @@ -2747,7 +2747,7 @@ Capital libs/ui/src/lib/i18n.ts - 16 + 22 @@ -2755,7 +2755,7 @@ Renta fija libs/ui/src/lib/i18n.ts - 17 + 23 @@ -2763,7 +2763,7 @@ Propiedad inmobiliaria libs/ui/src/lib/i18n.ts - 18 + 24 @@ -2771,7 +2771,7 @@ Bono libs/ui/src/lib/i18n.ts - 21 + 27 @@ -2779,7 +2779,7 @@ Criptomoneda libs/ui/src/lib/i18n.ts - 22 + 28 @@ -2787,7 +2787,7 @@ ETF libs/ui/src/lib/i18n.ts - 23 + 29 @@ -2795,7 +2795,7 @@ Fondo de inversión libs/ui/src/lib/i18n.ts - 24 + 30 @@ -2803,7 +2803,7 @@ Metal precioso libs/ui/src/lib/i18n.ts - 25 + 31 @@ -2811,7 +2811,7 @@ Capital riesgo libs/ui/src/lib/i18n.ts - 26 + 32 @@ -2819,7 +2819,7 @@ Acción libs/ui/src/lib/i18n.ts - 27 + 33 @@ -2827,7 +2827,7 @@ Fondo de emergencia libs/ui/src/lib/i18n.ts - 7 + 8 @@ -2835,7 +2835,7 @@ Otros libs/ui/src/lib/i18n.ts - 8 + 12 libs/ui/src/lib/portfolio-proportion-chart/portfolio-proportion-chart.component.ts @@ -2859,7 +2859,7 @@ América del Norte libs/ui/src/lib/i18n.ts - 33 + 39 @@ -2867,7 +2867,7 @@ África libs/ui/src/lib/i18n.ts - 30 + 36 @@ -2875,7 +2875,7 @@ Asia libs/ui/src/lib/i18n.ts - 31 + 37 @@ -2883,7 +2883,7 @@ Europa libs/ui/src/lib/i18n.ts - 32 + 38 @@ -2891,7 +2891,7 @@ Oceanía libs/ui/src/lib/i18n.ts - 34 + 40 @@ -2899,7 +2899,7 @@ América del Sur libs/ui/src/lib/i18n.ts - 35 + 41 @@ -3023,7 +3023,7 @@ Securities libs/ui/src/lib/i18n.ts - 9 + 15 @@ -3090,6 +3090,62 @@ 397 + + Valid until + Valid until + + apps/client/src/app/pages/account/account-page.html + 27 + + + + Core + Core + + libs/ui/src/lib/i18n.ts + 7 + + + + Grant + Grant + + libs/ui/src/lib/i18n.ts + 9 + + + + Higher Risk + Higher Risk + + libs/ui/src/lib/i18n.ts + 10 + + + + Lower Risk + Lower Risk + + libs/ui/src/lib/i18n.ts + 11 + + + + Retirement Provision + Retirement Provision + + libs/ui/src/lib/i18n.ts + 13 + + + + Satellite + Satellite + + libs/ui/src/lib/i18n.ts + 14 + + diff --git a/apps/client/src/locales/messages.fr.xlf b/apps/client/src/locales/messages.fr.xlf index 31e3a7ef4..400b0bddc 100644 --- a/apps/client/src/locales/messages.fr.xlf +++ b/apps/client/src/locales/messages.fr.xlf @@ -1226,7 +1226,7 @@ Taux d'Épargne apps/client/src/app/components/investment-chart/investment-chart.component.ts - 239 + 242 @@ -2853,7 +2853,7 @@ Emergency Fund libs/ui/src/lib/i18n.ts - 7 + 8 @@ -2861,7 +2861,7 @@ Autre libs/ui/src/lib/i18n.ts - 8 + 12 libs/ui/src/lib/portfolio-proportion-chart/portfolio-proportion-chart.component.ts @@ -2873,7 +2873,7 @@ Titres libs/ui/src/lib/i18n.ts - 9 + 15 @@ -2881,7 +2881,7 @@ Symbole libs/ui/src/lib/i18n.ts - 10 + 16 @@ -2889,7 +2889,7 @@ Étiquette libs/ui/src/lib/i18n.ts - 11 + 17 @@ -2897,7 +2897,7 @@ Cash libs/ui/src/lib/i18n.ts - 14 + 20 @@ -2905,7 +2905,7 @@ Marchandise libs/ui/src/lib/i18n.ts - 15 + 21 @@ -2913,7 +2913,7 @@ Capital libs/ui/src/lib/i18n.ts - 16 + 22 @@ -2921,7 +2921,7 @@ Revenu Fixe libs/ui/src/lib/i18n.ts - 17 + 23 @@ -2929,7 +2929,7 @@ Immobilier libs/ui/src/lib/i18n.ts - 18 + 24 @@ -2937,7 +2937,7 @@ Obligation libs/ui/src/lib/i18n.ts - 21 + 27 @@ -2945,7 +2945,7 @@ Cryptomonnaie libs/ui/src/lib/i18n.ts - 22 + 28 @@ -2953,7 +2953,7 @@ ETF libs/ui/src/lib/i18n.ts - 23 + 29 @@ -2961,7 +2961,7 @@ SICAV libs/ui/src/lib/i18n.ts - 24 + 30 @@ -2969,7 +2969,7 @@ Métal Précieux libs/ui/src/lib/i18n.ts - 25 + 31 @@ -2977,7 +2977,7 @@ Capital Propre libs/ui/src/lib/i18n.ts - 26 + 32 @@ -2985,7 +2985,7 @@ Action libs/ui/src/lib/i18n.ts - 27 + 33 @@ -2993,7 +2993,7 @@ Afrique libs/ui/src/lib/i18n.ts - 30 + 36 @@ -3001,7 +3001,7 @@ Asie libs/ui/src/lib/i18n.ts - 31 + 37 @@ -3009,7 +3009,7 @@ Europe libs/ui/src/lib/i18n.ts - 32 + 38 @@ -3017,7 +3017,7 @@ Amérique du Nord libs/ui/src/lib/i18n.ts - 33 + 39 @@ -3025,7 +3025,7 @@ Océanie libs/ui/src/lib/i18n.ts - 34 + 40 @@ -3033,7 +3033,7 @@ Amérique du Sud libs/ui/src/lib/i18n.ts - 35 + 41 @@ -3088,6 +3088,62 @@ 397 + + Valid until + Valid until + + apps/client/src/app/pages/account/account-page.html + 27 + + + + Core + Core + + libs/ui/src/lib/i18n.ts + 7 + + + + Grant + Grant + + libs/ui/src/lib/i18n.ts + 9 + + + + Higher Risk + Higher Risk + + libs/ui/src/lib/i18n.ts + 10 + + + + Lower Risk + Lower Risk + + libs/ui/src/lib/i18n.ts + 11 + + + + Retirement Provision + Retirement Provision + + libs/ui/src/lib/i18n.ts + 13 + + + + Satellite + Satellite + + libs/ui/src/lib/i18n.ts + 14 + + diff --git a/apps/client/src/locales/messages.it.xlf b/apps/client/src/locales/messages.it.xlf index eeafa467f..037d75672 100644 --- a/apps/client/src/locales/messages.it.xlf +++ b/apps/client/src/locales/messages.it.xlf @@ -2691,7 +2691,7 @@ Tasso di risparmio apps/client/src/app/components/investment-chart/investment-chart.component.ts - 239 + 242 @@ -2715,7 +2715,7 @@ Symbol libs/ui/src/lib/i18n.ts - 10 + 16 @@ -2723,7 +2723,7 @@ Tag libs/ui/src/lib/i18n.ts - 11 + 17 @@ -2731,7 +2731,7 @@ Cash libs/ui/src/lib/i18n.ts - 14 + 20 @@ -2739,7 +2739,7 @@ Commodity libs/ui/src/lib/i18n.ts - 15 + 21 @@ -2747,7 +2747,7 @@ Equity libs/ui/src/lib/i18n.ts - 16 + 22 @@ -2755,7 +2755,7 @@ Fixed Income libs/ui/src/lib/i18n.ts - 17 + 23 @@ -2763,7 +2763,7 @@ Real Estate libs/ui/src/lib/i18n.ts - 18 + 24 @@ -2771,7 +2771,7 @@ Bond libs/ui/src/lib/i18n.ts - 21 + 27 @@ -2779,7 +2779,7 @@ Cryptocurrency libs/ui/src/lib/i18n.ts - 22 + 28 @@ -2787,7 +2787,7 @@ ETF libs/ui/src/lib/i18n.ts - 23 + 29 @@ -2795,7 +2795,7 @@ Mutual Fund libs/ui/src/lib/i18n.ts - 24 + 30 @@ -2803,7 +2803,7 @@ Precious Metal libs/ui/src/lib/i18n.ts - 25 + 31 @@ -2811,7 +2811,7 @@ Private Equity libs/ui/src/lib/i18n.ts - 26 + 32 @@ -2819,7 +2819,7 @@ Stock libs/ui/src/lib/i18n.ts - 27 + 33 @@ -2827,7 +2827,7 @@ Emergency Fund libs/ui/src/lib/i18n.ts - 7 + 8 @@ -2835,7 +2835,7 @@ Other libs/ui/src/lib/i18n.ts - 8 + 12 libs/ui/src/lib/portfolio-proportion-chart/portfolio-proportion-chart.component.ts @@ -2859,7 +2859,7 @@ North America libs/ui/src/lib/i18n.ts - 33 + 39 @@ -2867,7 +2867,7 @@ Africa libs/ui/src/lib/i18n.ts - 30 + 36 @@ -2875,7 +2875,7 @@ Asia libs/ui/src/lib/i18n.ts - 31 + 37 @@ -2883,7 +2883,7 @@ Europe libs/ui/src/lib/i18n.ts - 32 + 38 @@ -2891,7 +2891,7 @@ Oceania libs/ui/src/lib/i18n.ts - 34 + 40 @@ -2899,7 +2899,7 @@ South America libs/ui/src/lib/i18n.ts - 35 + 41 @@ -3023,7 +3023,7 @@ Securities libs/ui/src/lib/i18n.ts - 9 + 15 @@ -3090,6 +3090,62 @@ 397 + + Valid until + Valid until + + apps/client/src/app/pages/account/account-page.html + 27 + + + + Core + Core + + libs/ui/src/lib/i18n.ts + 7 + + + + Grant + Grant + + libs/ui/src/lib/i18n.ts + 9 + + + + Higher Risk + Higher Risk + + libs/ui/src/lib/i18n.ts + 10 + + + + Lower Risk + Lower Risk + + libs/ui/src/lib/i18n.ts + 11 + + + + Retirement Provision + Retirement Provision + + libs/ui/src/lib/i18n.ts + 13 + + + + Satellite + Satellite + + libs/ui/src/lib/i18n.ts + 14 + + diff --git a/apps/client/src/locales/messages.nl.xlf b/apps/client/src/locales/messages.nl.xlf index 2a6be39df..6184da982 100644 --- a/apps/client/src/locales/messages.nl.xlf +++ b/apps/client/src/locales/messages.nl.xlf @@ -2690,7 +2690,7 @@ Spaarquote apps/client/src/app/components/investment-chart/investment-chart.component.ts - 239 + 242 @@ -2714,7 +2714,7 @@ Symbool libs/ui/src/lib/i18n.ts - 10 + 16 @@ -2722,7 +2722,7 @@ Label libs/ui/src/lib/i18n.ts - 11 + 17 @@ -2730,7 +2730,7 @@ Contant geld libs/ui/src/lib/i18n.ts - 14 + 20 @@ -2738,7 +2738,7 @@ Commodity libs/ui/src/lib/i18n.ts - 15 + 21 @@ -2746,7 +2746,7 @@ Equity libs/ui/src/lib/i18n.ts - 16 + 22 @@ -2754,7 +2754,7 @@ Vast inkomen libs/ui/src/lib/i18n.ts - 17 + 23 @@ -2762,7 +2762,7 @@ Vastgoed libs/ui/src/lib/i18n.ts - 18 + 24 @@ -2770,7 +2770,7 @@ Obligatie libs/ui/src/lib/i18n.ts - 21 + 27 @@ -2778,7 +2778,7 @@ Cryptovaluta libs/ui/src/lib/i18n.ts - 22 + 28 @@ -2786,7 +2786,7 @@ ETF libs/ui/src/lib/i18n.ts - 23 + 29 @@ -2794,7 +2794,7 @@ Beleggingsfonds libs/ui/src/lib/i18n.ts - 24 + 30 @@ -2802,7 +2802,7 @@ Edel metaal libs/ui/src/lib/i18n.ts - 25 + 31 @@ -2810,7 +2810,7 @@ Private equity libs/ui/src/lib/i18n.ts - 26 + 32 @@ -2818,7 +2818,7 @@ Aandeel libs/ui/src/lib/i18n.ts - 27 + 33 @@ -2826,7 +2826,7 @@ Noodfonds libs/ui/src/lib/i18n.ts - 7 + 8 @@ -2834,7 +2834,7 @@ Anders libs/ui/src/lib/i18n.ts - 8 + 12 libs/ui/src/lib/portfolio-proportion-chart/portfolio-proportion-chart.component.ts @@ -2858,7 +2858,7 @@ Noord Amerika libs/ui/src/lib/i18n.ts - 33 + 39 @@ -2866,7 +2866,7 @@ Afrika libs/ui/src/lib/i18n.ts - 30 + 36 @@ -2874,7 +2874,7 @@ Azië libs/ui/src/lib/i18n.ts - 31 + 37 @@ -2882,7 +2882,7 @@ Europa libs/ui/src/lib/i18n.ts - 32 + 38 @@ -2890,7 +2890,7 @@ Oceanië libs/ui/src/lib/i18n.ts - 34 + 40 @@ -2898,7 +2898,7 @@ Zuid Amerika libs/ui/src/lib/i18n.ts - 35 + 41 @@ -3022,7 +3022,7 @@ Effecten libs/ui/src/lib/i18n.ts - 9 + 15 @@ -3089,6 +3089,62 @@ 397 + + Valid until + Valid until + + apps/client/src/app/pages/account/account-page.html + 27 + + + + Core + Core + + libs/ui/src/lib/i18n.ts + 7 + + + + Grant + Grant + + libs/ui/src/lib/i18n.ts + 9 + + + + Higher Risk + Higher Risk + + libs/ui/src/lib/i18n.ts + 10 + + + + Lower Risk + Lower Risk + + libs/ui/src/lib/i18n.ts + 11 + + + + Retirement Provision + Retirement Provision + + libs/ui/src/lib/i18n.ts + 13 + + + + Satellite + Satellite + + libs/ui/src/lib/i18n.ts + 14 + + diff --git a/apps/client/src/locales/messages.pt.xlf b/apps/client/src/locales/messages.pt.xlf index e5b6f29aa..ea97026b2 100644 --- a/apps/client/src/locales/messages.pt.xlf +++ b/apps/client/src/locales/messages.pt.xlf @@ -1130,7 +1130,7 @@ Savings Rate apps/client/src/app/components/investment-chart/investment-chart.component.ts - 239 + 242 @@ -2746,7 +2746,7 @@ Emergency Fund libs/ui/src/lib/i18n.ts - 7 + 8 @@ -2754,7 +2754,7 @@ Other libs/ui/src/lib/i18n.ts - 8 + 12 libs/ui/src/lib/portfolio-proportion-chart/portfolio-proportion-chart.component.ts @@ -2766,7 +2766,7 @@ Symbol libs/ui/src/lib/i18n.ts - 10 + 16 @@ -2774,7 +2774,7 @@ Tag libs/ui/src/lib/i18n.ts - 11 + 17 @@ -2782,7 +2782,7 @@ Cash libs/ui/src/lib/i18n.ts - 14 + 20 @@ -2790,7 +2790,7 @@ Commodity libs/ui/src/lib/i18n.ts - 15 + 21 @@ -2798,7 +2798,7 @@ Equity libs/ui/src/lib/i18n.ts - 16 + 22 @@ -2806,7 +2806,7 @@ Fixed Income libs/ui/src/lib/i18n.ts - 17 + 23 @@ -2814,7 +2814,7 @@ Real Estate libs/ui/src/lib/i18n.ts - 18 + 24 @@ -2822,7 +2822,7 @@ Bond libs/ui/src/lib/i18n.ts - 21 + 27 @@ -2830,7 +2830,7 @@ Cryptocurrency libs/ui/src/lib/i18n.ts - 22 + 28 @@ -2838,7 +2838,7 @@ ETF libs/ui/src/lib/i18n.ts - 23 + 29 @@ -2846,7 +2846,7 @@ Mutual Fund libs/ui/src/lib/i18n.ts - 24 + 30 @@ -2854,7 +2854,7 @@ Precious Metal libs/ui/src/lib/i18n.ts - 25 + 31 @@ -2862,7 +2862,7 @@ Private Equity libs/ui/src/lib/i18n.ts - 26 + 32 @@ -2870,7 +2870,7 @@ Stock libs/ui/src/lib/i18n.ts - 27 + 33 @@ -2878,7 +2878,7 @@ Africa libs/ui/src/lib/i18n.ts - 30 + 36 @@ -2886,7 +2886,7 @@ Asia libs/ui/src/lib/i18n.ts - 31 + 37 @@ -2894,7 +2894,7 @@ Europe libs/ui/src/lib/i18n.ts - 32 + 38 @@ -2902,7 +2902,7 @@ North America libs/ui/src/lib/i18n.ts - 33 + 39 @@ -2910,7 +2910,7 @@ Oceania libs/ui/src/lib/i18n.ts - 34 + 40 @@ -2918,7 +2918,7 @@ South America libs/ui/src/lib/i18n.ts - 35 + 41 @@ -3054,7 +3054,7 @@ Securities libs/ui/src/lib/i18n.ts - 9 + 15 @@ -3089,6 +3089,62 @@ 397 + + Valid until + Valid until + + apps/client/src/app/pages/account/account-page.html + 27 + + + + Core + Core + + libs/ui/src/lib/i18n.ts + 7 + + + + Grant + Grant + + libs/ui/src/lib/i18n.ts + 9 + + + + Higher Risk + Higher Risk + + libs/ui/src/lib/i18n.ts + 10 + + + + Lower Risk + Lower Risk + + libs/ui/src/lib/i18n.ts + 11 + + + + Retirement Provision + Retirement Provision + + libs/ui/src/lib/i18n.ts + 13 + + + + Satellite + Satellite + + libs/ui/src/lib/i18n.ts + 14 + + diff --git a/apps/client/src/locales/messages.xlf b/apps/client/src/locales/messages.xlf index bbd75be15..0c0ed549a 100644 --- a/apps/client/src/locales/messages.xlf +++ b/apps/client/src/locales/messages.xlf @@ -2415,42 +2415,42 @@ Savings Rate apps/client/src/app/components/investment-chart/investment-chart.component.ts - 239 + 242 Precious Metal libs/ui/src/lib/i18n.ts - 25 + 31 Tag libs/ui/src/lib/i18n.ts - 11 + 17 Equity libs/ui/src/lib/i18n.ts - 16 + 22 Real Estate libs/ui/src/lib/i18n.ts - 18 + 24 Cryptocurrency libs/ui/src/lib/i18n.ts - 22 + 28 @@ -2464,14 +2464,14 @@ Stock libs/ui/src/lib/i18n.ts - 27 + 33 Private Equity libs/ui/src/lib/i18n.ts - 26 + 32 @@ -2485,49 +2485,49 @@ Mutual Fund libs/ui/src/lib/i18n.ts - 24 + 30 Cash libs/ui/src/lib/i18n.ts - 14 + 20 Symbol libs/ui/src/lib/i18n.ts - 10 + 16 Commodity libs/ui/src/lib/i18n.ts - 15 + 21 Bond libs/ui/src/lib/i18n.ts - 21 + 27 ETF libs/ui/src/lib/i18n.ts - 23 + 29 Fixed Income libs/ui/src/lib/i18n.ts - 17 + 23 @@ -2545,14 +2545,14 @@ Emergency Fund libs/ui/src/lib/i18n.ts - 7 + 8 Other libs/ui/src/lib/i18n.ts - 8 + 12 libs/ui/src/lib/portfolio-proportion-chart/portfolio-proportion-chart.component.ts @@ -2563,42 +2563,42 @@ North America libs/ui/src/lib/i18n.ts - 33 + 39 Africa libs/ui/src/lib/i18n.ts - 30 + 36 Oceania libs/ui/src/lib/i18n.ts - 34 + 40 Asia libs/ui/src/lib/i18n.ts - 31 + 37 South America libs/ui/src/lib/i18n.ts - 35 + 41 Europe libs/ui/src/lib/i18n.ts - 32 + 38 @@ -2694,7 +2694,7 @@ Securities libs/ui/src/lib/i18n.ts - 9 + 15 @@ -2767,6 +2767,55 @@ 397 + + Higher Risk + + libs/ui/src/lib/i18n.ts + 10 + + + + Lower Risk + + libs/ui/src/lib/i18n.ts + 11 + + + + Grant + + libs/ui/src/lib/i18n.ts + 9 + + + + Core + + libs/ui/src/lib/i18n.ts + 7 + + + + Satellite + + libs/ui/src/lib/i18n.ts + 14 + + + + Retirement Provision + + libs/ui/src/lib/i18n.ts + 13 + + + + Valid until + + apps/client/src/app/pages/account/account-page.html + 27 + + From cd64601482b067667fcdd7d3cee054f5fe134ed2 Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Sat, 14 Jan 2023 19:12:18 +0100 Subject: [PATCH 11/26] Release 1.227.1 (#1608) --- CHANGELOG.md | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1badd9dab..d7363ee80 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ 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 +## 1.227.1 - 2023-01-14 ### Changed diff --git a/package.json b/package.json index 1364f7f66..f20160abc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ghostfolio", - "version": "1.227.0", + "version": "1.227.1", "homepage": "https://ghostfol.io", "license": "AGPL-3.0", "scripts": { From 2beceb36cf710cc24f2a38b36d768eb8bf5c4ea4 Mon Sep 17 00:00:00 2001 From: Martin Vandenbussche <26136934+MaVdbussche@users.noreply.github.com> Date: Mon, 16 Jan 2023 10:46:48 +0100 Subject: [PATCH 12/26] Overriding tooltip title for graphs where grouping is defined (#1605) * Overriding tooltip title for graphs where grouping is defined * Update changelog Co-authored-by: Thomas <4159106+dtslvr@users.noreply.github.com> --- CHANGELOG.md | 7 ++++ .../investment-chart.component.ts | 18 +++++---- libs/common/src/lib/chart-helper.ts | 40 ++++++++++++++++++- libs/common/src/lib/helper.ts | 6 +-- .../fire-calculator.component.ts | 6 ++- 5 files changed, 62 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d7363ee80..6686fa7f8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,13 @@ 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 date formatting in the tooltip of the dividend timeline grouped by month / year +- Improved the date formatting in the tooltip of the investment timeline grouped by month / year + ## 1.227.1 - 2023-01-14 ### Changed diff --git a/apps/client/src/app/components/investment-chart/investment-chart.component.ts b/apps/client/src/app/components/investment-chart/investment-chart.component.ts index 734fe704f..65ecbabb8 100644 --- a/apps/client/src/app/components/investment-chart/investment-chart.component.ts +++ b/apps/client/src/app/components/investment-chart/investment-chart.component.ts @@ -11,7 +11,8 @@ import { import { getTooltipOptions, getTooltipPositionerMapTop, - getVerticalHoverLinePlugin + getVerticalHoverLinePlugin, + transformTickToAbbreviation } from '@ghostfolio/common/chart-helper'; import { primaryColorRgb, secondaryColorRgb } from '@ghostfolio/common/config'; import { @@ -19,8 +20,7 @@ import { getBackgroundColor, getDateFormatString, getTextColor, - parseDate, - transformTickToAbbreviation + parseDate } from '@ghostfolio/common/helper'; import { LineChartItem } from '@ghostfolio/common/interfaces'; import { InvestmentItem } from '@ghostfolio/common/interfaces/investment-item.interface'; @@ -136,10 +136,13 @@ export class InvestmentChartComponent implements OnChanges, OnDestroy { date, investment: last(this.investments).investment }); - this.values.push({ date, value: last(this.values).value }); + this.values.push({ + date, + value: last(this.values).value + }); } - const data = { + const chartData = { labels: this.historicalDataItems.map(({ date }) => { return parseDate(date); }), @@ -191,7 +194,7 @@ export class InvestmentChartComponent implements OnChanges, OnDestroy { if (this.chartCanvas) { if (this.chart) { - this.chart.data = data; + this.chart.data = chartData; this.chart.options.plugins.tooltip = ( this.getTooltipPluginConfiguration() ); @@ -213,7 +216,7 @@ export class InvestmentChartComponent implements OnChanges, OnDestroy { this.chart.update(); } else { this.chart = new Chart(this.chartCanvas.nativeElement, { - data, + data: chartData, options: { animation: false, elements: { @@ -328,6 +331,7 @@ export class InvestmentChartComponent implements OnChanges, OnDestroy { ...getTooltipOptions({ colorScheme: this.colorScheme, currency: this.isInPercent ? undefined : this.currency, + groupBy: this.groupBy, locale: this.isInPercent ? undefined : this.locale, unit: this.isInPercent ? '%' : undefined }), diff --git a/libs/common/src/lib/chart-helper.ts b/libs/common/src/lib/chart-helper.ts index be1fa8d60..1befb1585 100644 --- a/libs/common/src/lib/chart-helper.ts +++ b/libs/common/src/lib/chart-helper.ts @@ -1,16 +1,41 @@ import { Chart, TooltipPosition } from 'chart.js'; +import { format } from 'date-fns'; -import { getBackgroundColor, getTextColor } from './helper'; -import { ColorScheme } from './types'; +import { + DATE_FORMAT, + DATE_FORMAT_MONTHLY, + DATE_FORMAT_YEARLY, + getBackgroundColor, + getTextColor +} from './helper'; +import { ColorScheme, GroupBy } from './types'; + +export function formatGroupedDate({ + date, + groupBy +}: { + date: Date; + groupBy: GroupBy; +}) { + if (groupBy === 'month') { + return format(date, DATE_FORMAT_MONTHLY); + } else if (groupBy === 'year') { + return format(date, DATE_FORMAT_YEARLY); + } + + return format(date, DATE_FORMAT); +} export function getTooltipOptions({ colorScheme, currency = '', + groupBy, locale = '', unit = '' }: { colorScheme?: ColorScheme; currency?: string; + groupBy?: GroupBy; locale?: string; unit?: string; } = {}) { @@ -38,6 +63,13 @@ export function getTooltipOptions({ } } return label; + }, + title: (contexts) => { + if (groupBy) { + return formatGroupedDate({ groupBy, date: contexts[0].parsed.x }); + } + + return contexts[0].label; } }, caretSize: 0, @@ -97,3 +129,7 @@ export function getVerticalHoverLinePlugin( id: 'verticalHoverLine' }; } + +export function transformTickToAbbreviation(value: number) { + return value < 1000000 ? `${value / 1000}K` : `${value / 1000000}M`; +} diff --git a/libs/common/src/lib/helper.ts b/libs/common/src/lib/helper.ts index 29bb4d121..e538b6dbe 100644 --- a/libs/common/src/lib/helper.ts +++ b/libs/common/src/lib/helper.ts @@ -233,6 +233,8 @@ export function resolveMarketCondition( } export const DATE_FORMAT = 'yyyy-MM-dd'; +export const DATE_FORMAT_MONTHLY = 'MMMM yyyy'; +export const DATE_FORMAT_YEARLY = 'yyyy'; export function parseDate(date: string) { return parse(date, DATE_FORMAT, new Date()); @@ -241,7 +243,3 @@ export function parseDate(date: string) { export function prettifySymbol(aSymbol: string): string { return aSymbol?.replace(ghostfolioScraperApiSymbolPrefix, ''); } - -export function transformTickToAbbreviation(value: number) { - return value < 1000000 ? `${value / 1000}K` : `${value / 1000000}M`; -} diff --git a/libs/ui/src/lib/fire-calculator/fire-calculator.component.ts b/libs/ui/src/lib/fire-calculator/fire-calculator.component.ts index ed187672f..e4e77095d 100644 --- a/libs/ui/src/lib/fire-calculator/fire-calculator.component.ts +++ b/libs/ui/src/lib/fire-calculator/fire-calculator.component.ts @@ -13,9 +13,11 @@ import { ViewChild } from '@angular/core'; import { FormBuilder, FormControl } from '@angular/forms'; -import { getTooltipOptions } from '@ghostfolio/common/chart-helper'; +import { + getTooltipOptions, + transformTickToAbbreviation +} from '@ghostfolio/common/chart-helper'; import { primaryColorRgb } from '@ghostfolio/common/config'; -import { transformTickToAbbreviation } from '@ghostfolio/common/helper'; import { ColorScheme } from '@ghostfolio/common/types'; import { BarController, From 4865c45fd4a34ba10976b39a1e6da2a27dc5e9ce Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Tue, 17 Jan 2023 10:04:03 +0100 Subject: [PATCH 13/26] Feature/reduce data gathering interval to every four hours (#1611) * Reduce execution interval * Update changelog --- CHANGELOG.md | 1 + apps/api/src/services/cron.service.ts | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6686fa7f8..5b1dde13d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Improved the date formatting in the tooltip of the dividend timeline grouped by month / year - Improved the date formatting in the tooltip of the investment timeline grouped by month / year +- Reduced the execution interval of the data gathering to every 4 hours ## 1.227.1 - 2023-01-14 diff --git a/apps/api/src/services/cron.service.ts b/apps/api/src/services/cron.service.ts index e3141ebe7..8b036c35e 100644 --- a/apps/api/src/services/cron.service.ts +++ b/apps/api/src/services/cron.service.ts @@ -19,8 +19,8 @@ export class CronService { private readonly twitterBotService: TwitterBotService ) {} - @Cron(CronExpression.EVERY_HOUR) - public async runEveryHour() { + @Cron(CronExpression.EVERY_4_HOURS) + public async runEveryFourHours() { await this.dataGatheringService.gather7Days(); } From 0300c6f3b7ea6d55843582d89b3fede9b7cb4507 Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Tue, 17 Jan 2023 20:09:50 +0100 Subject: [PATCH 14/26] Feature/extend hints on account page (#1609) * Extend hints * Update changelog --- CHANGELOG.md | 4 ++ .../src/app/pages/account/account-page.html | 14 +++++-- apps/client/src/locales/messages.de.xlf | 40 +++++++++++++------ apps/client/src/locales/messages.es.xlf | 40 +++++++++++++------ apps/client/src/locales/messages.fr.xlf | 40 +++++++++++++------ apps/client/src/locales/messages.it.xlf | 40 +++++++++++++------ apps/client/src/locales/messages.nl.xlf | 40 +++++++++++++------ apps/client/src/locales/messages.pt.xlf | 40 +++++++++++++------ apps/client/src/locales/messages.xlf | 36 ++++++++++++----- 9 files changed, 207 insertions(+), 87 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5b1dde13d..fc3e2fdfe 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 + +- Extended the hints in user settings + ### Changed - Improved the date formatting in the tooltip of the dividend timeline grouped by month / year diff --git a/apps/client/src/app/pages/account/account-page.html b/apps/client/src/app/pages/account/account-page.html index a3f69f2c5..8779273ae 100644 --- a/apps/client/src/app/pages/account/account-page.html +++ b/apps/client/src/app/pages/account/account-page.html @@ -74,8 +74,8 @@
Presenter View
- Hides sensitive values such as absolute performances and - quantities. + Protection for sensitive information like absolute performances + and quantity values
@@ -210,8 +210,11 @@
-
- Zen Mode +
+
Zen Mode
+
+ Distraction-free experience for turbulent times +
Experimental Features
+
+ Sneak peek at upcoming functionality +
75 - - Hides sensitive values such as absolute performances and quantities. - - - apps/client/src/app/pages/account/account-page.html - 76,79 - - Base Currency Basiswährung @@ -1478,7 +1470,7 @@ Einloggen mit Fingerabdruck apps/client/src/app/pages/account/account-page.html - 226 + 229 @@ -1486,7 +1478,7 @@ Benutzer ID apps/client/src/app/pages/account/account-page.html - 253 + 259 @@ -1494,7 +1486,7 @@ Zugangsberechtigung apps/client/src/app/pages/account/account-page.html - 262 + 268 @@ -2570,7 +2562,7 @@ Experimentelle Funktionen apps/client/src/app/pages/account/account-page.html - 241 + 244 @@ -3145,6 +3137,30 @@ 14 + + Protection for sensitive information like absolute performances and quantity values + Ausblenden von sensiblen Informationen wie absoluter Performance und Stückzahl + + apps/client/src/app/pages/account/account-page.html + 76,79 + + + + Distraction-free experience for turbulent times + Unbeschwertes Erlebnis für turbulente Zeiten + + apps/client/src/app/pages/account/account-page.html + 215,217 + + + + Sneak peek at upcoming functionality + Vorschau auf kommende Funktionalität + + apps/client/src/app/pages/account/account-page.html + 245,247 + + diff --git a/apps/client/src/locales/messages.es.xlf b/apps/client/src/locales/messages.es.xlf index 10c99138e..453c70bc4 100644 --- a/apps/client/src/locales/messages.es.xlf +++ b/apps/client/src/locales/messages.es.xlf @@ -1434,14 +1434,6 @@ 75 - - Hides sensitive values such as absolute performances and quantities. - Esconde valores sensibles como los rendimientos absolutos y las cantidades. - - apps/client/src/app/pages/account/account-page.html - 76,79 - - Base Currency Divisa base @@ -1479,7 +1471,7 @@ Accede con huella digital apps/client/src/app/pages/account/account-page.html - 226 + 229 @@ -1487,7 +1479,7 @@ ID usuario apps/client/src/app/pages/account/account-page.html - 253 + 259 @@ -1495,7 +1487,7 @@ Acceso concedido apps/client/src/app/pages/account/account-page.html - 262 + 268 @@ -2571,7 +2563,7 @@ Funcionalidades experimentales apps/client/src/app/pages/account/account-page.html - 241 + 244 @@ -3146,6 +3138,30 @@ 14 + + Protection for sensitive information like absolute performances and quantity values + Protection for sensitive information like absolute performances and quantity values + + apps/client/src/app/pages/account/account-page.html + 76,79 + + + + Distraction-free experience for turbulent times + Distraction-free experience for turbulent times + + apps/client/src/app/pages/account/account-page.html + 215,217 + + + + Sneak peek at upcoming functionality + Sneak peek at upcoming functionality + + apps/client/src/app/pages/account/account-page.html + 245,247 + + diff --git a/apps/client/src/locales/messages.fr.xlf b/apps/client/src/locales/messages.fr.xlf index 400b0bddc..286de3061 100644 --- a/apps/client/src/locales/messages.fr.xlf +++ b/apps/client/src/locales/messages.fr.xlf @@ -1785,14 +1785,6 @@ 75 - - Hides sensitive values such as absolute performances and quantities. - Masque les données sensibles telles que la performance absolue et les quantités. - - apps/client/src/app/pages/account/account-page.html - 76,79 - - Base Currency Devise de Base @@ -1890,7 +1882,7 @@ Se connecter avec empreinte apps/client/src/app/pages/account/account-page.html - 226 + 229 @@ -1898,7 +1890,7 @@ Fonctionnalités expérimentales apps/client/src/app/pages/account/account-page.html - 241 + 244 @@ -1906,7 +1898,7 @@ ID d'utilisateur apps/client/src/app/pages/account/account-page.html - 253 + 259 @@ -1914,7 +1906,7 @@ Accès donné apps/client/src/app/pages/account/account-page.html - 262 + 268 @@ -3144,6 +3136,30 @@ 14 + + Protection for sensitive information like absolute performances and quantity values + Protection for sensitive information like absolute performances and quantity values + + apps/client/src/app/pages/account/account-page.html + 76,79 + + + + Distraction-free experience for turbulent times + Distraction-free experience for turbulent times + + apps/client/src/app/pages/account/account-page.html + 215,217 + + + + Sneak peek at upcoming functionality + Sneak peek at upcoming functionality + + apps/client/src/app/pages/account/account-page.html + 245,247 + + diff --git a/apps/client/src/locales/messages.it.xlf b/apps/client/src/locales/messages.it.xlf index 037d75672..4c5b0f1e2 100644 --- a/apps/client/src/locales/messages.it.xlf +++ b/apps/client/src/locales/messages.it.xlf @@ -1434,14 +1434,6 @@ 75 - - Hides sensitive values such as absolute performances and quantities. - Nasconde valori sensibili come le prestazioni e le quantità assolute. - - apps/client/src/app/pages/account/account-page.html - 76,79 - - Base Currency Valuta base @@ -1479,7 +1471,7 @@ Accesso con impronta digitale apps/client/src/app/pages/account/account-page.html - 226 + 229 @@ -1487,7 +1479,7 @@ ID utente apps/client/src/app/pages/account/account-page.html - 253 + 259 @@ -1495,7 +1487,7 @@ Accesso concesso apps/client/src/app/pages/account/account-page.html - 262 + 268 @@ -2571,7 +2563,7 @@ Funzionalità sperimentali apps/client/src/app/pages/account/account-page.html - 241 + 244 @@ -3146,6 +3138,30 @@ 14 + + Protection for sensitive information like absolute performances and quantity values + Protection for sensitive information like absolute performances and quantity values + + apps/client/src/app/pages/account/account-page.html + 76,79 + + + + Distraction-free experience for turbulent times + Distraction-free experience for turbulent times + + apps/client/src/app/pages/account/account-page.html + 215,217 + + + + Sneak peek at upcoming functionality + Sneak peek at upcoming functionality + + apps/client/src/app/pages/account/account-page.html + 245,247 + + diff --git a/apps/client/src/locales/messages.nl.xlf b/apps/client/src/locales/messages.nl.xlf index 6184da982..24df5019c 100644 --- a/apps/client/src/locales/messages.nl.xlf +++ b/apps/client/src/locales/messages.nl.xlf @@ -1433,14 +1433,6 @@ 75 - - Hides sensitive values such as absolute performances and quantities. - Verbergt gevoelige waarden zoals absolute prestaties en hoeveelheden. - - apps/client/src/app/pages/account/account-page.html - 76,79 - - Base Currency Basisvaluta @@ -1478,7 +1470,7 @@ Aanmelden met vingerafdruk apps/client/src/app/pages/account/account-page.html - 226 + 229 @@ -1486,7 +1478,7 @@ Gebruikers-ID apps/client/src/app/pages/account/account-page.html - 253 + 259 @@ -1494,7 +1486,7 @@ Verleende toegang apps/client/src/app/pages/account/account-page.html - 262 + 268 @@ -2570,7 +2562,7 @@ Experimentele functies apps/client/src/app/pages/account/account-page.html - 241 + 244 @@ -3145,6 +3137,30 @@ 14 + + Protection for sensitive information like absolute performances and quantity values + Protection for sensitive information like absolute performances and quantity values + + apps/client/src/app/pages/account/account-page.html + 76,79 + + + + Distraction-free experience for turbulent times + Distraction-free experience for turbulent times + + apps/client/src/app/pages/account/account-page.html + 215,217 + + + + Sneak peek at upcoming functionality + Sneak peek at upcoming functionality + + apps/client/src/app/pages/account/account-page.html + 245,247 + + diff --git a/apps/client/src/locales/messages.pt.xlf b/apps/client/src/locales/messages.pt.xlf index ea97026b2..7ac806d28 100644 --- a/apps/client/src/locales/messages.pt.xlf +++ b/apps/client/src/locales/messages.pt.xlf @@ -1773,14 +1773,6 @@ 75 - - Hides sensitive values such as absolute performances and quantities. - Hides sensitive values such as absolute performances and quantities. - - apps/client/src/app/pages/account/account-page.html - 76,79 - - Base Currency Base Currency @@ -1866,7 +1858,7 @@ Sign in with fingerprint apps/client/src/app/pages/account/account-page.html - 226 + 229 @@ -1874,7 +1866,7 @@ Experimental Features apps/client/src/app/pages/account/account-page.html - 241 + 244 @@ -1882,7 +1874,7 @@ User ID apps/client/src/app/pages/account/account-page.html - 253 + 259 @@ -1890,7 +1882,7 @@ Granted Access apps/client/src/app/pages/account/account-page.html - 262 + 268 @@ -3145,6 +3137,30 @@ 14 + + Protection for sensitive information like absolute performances and quantity values + Protection for sensitive information like absolute performances and quantity values + + apps/client/src/app/pages/account/account-page.html + 76,79 + + + + Distraction-free experience for turbulent times + Distraction-free experience for turbulent times + + apps/client/src/app/pages/account/account-page.html + 215,217 + + + + Sneak peek at upcoming functionality + Sneak peek at upcoming functionality + + apps/client/src/app/pages/account/account-page.html + 245,247 + + diff --git a/apps/client/src/locales/messages.xlf b/apps/client/src/locales/messages.xlf index 0c0ed549a..e7c9e1aca 100644 --- a/apps/client/src/locales/messages.xlf +++ b/apps/client/src/locales/messages.xlf @@ -1297,13 +1297,6 @@ 75 - - Hides sensitive values such as absolute performances and quantities. - - apps/client/src/app/pages/account/account-page.html - 76,79 - - Base Currency @@ -1336,21 +1329,21 @@ Sign in with fingerprint apps/client/src/app/pages/account/account-page.html - 226 + 229 User ID apps/client/src/app/pages/account/account-page.html - 253 + 259 Granted Access apps/client/src/app/pages/account/account-page.html - 262 + 268 @@ -2310,7 +2303,7 @@ Experimental Features apps/client/src/app/pages/account/account-page.html - 241 + 244 @@ -2816,6 +2809,27 @@ 27 + + Distraction-free experience for turbulent times + + apps/client/src/app/pages/account/account-page.html + 215,217 + + + + Protection for sensitive information like absolute performances and quantity values + + apps/client/src/app/pages/account/account-page.html + 76,79 + + + + Sneak peek at upcoming functionality + + apps/client/src/app/pages/account/account-page.html + 245,247 + + From f47e4d3b04a645d076b4fac5447b1dc468608739 Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Tue, 17 Jan 2023 20:10:08 +0100 Subject: [PATCH 15/26] Clean up imports (#1613) --- .../app/components/admin-overview/admin-overview.component.ts | 4 ++-- .../pages/portfolio/activities/activities-page.component.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/client/src/app/components/admin-overview/admin-overview.component.ts b/apps/client/src/app/components/admin-overview/admin-overview.component.ts index e528e748b..f25de8426 100644 --- a/apps/client/src/app/components/admin-overview/admin-overview.component.ts +++ b/apps/client/src/app/components/admin-overview/admin-overview.component.ts @@ -4,12 +4,12 @@ import { CacheService } from '@ghostfolio/client/services/cache.service'; import { DataService } from '@ghostfolio/client/services/data.service'; import { UserService } from '@ghostfolio/client/services/user/user.service'; import { - ghostfolioPrefix, PROPERTY_COUPONS, PROPERTY_CURRENCIES, PROPERTY_IS_READ_ONLY_MODE, PROPERTY_IS_USER_SIGNUP_ENABLED, - PROPERTY_SYSTEM_MESSAGE + PROPERTY_SYSTEM_MESSAGE, + ghostfolioPrefix } from '@ghostfolio/common/config'; import { Coupon, InfoItem, User } from '@ghostfolio/common/interfaces'; import { hasPermission, permissions } from '@ghostfolio/common/permissions'; diff --git a/apps/client/src/app/pages/portfolio/activities/activities-page.component.ts b/apps/client/src/app/pages/portfolio/activities/activities-page.component.ts index 41d8abae1..0da42fbb5 100644 --- a/apps/client/src/app/pages/portfolio/activities/activities-page.component.ts +++ b/apps/client/src/app/pages/portfolio/activities/activities-page.component.ts @@ -11,7 +11,7 @@ import { IcsService } from '@ghostfolio/client/services/ics/ics.service'; import { ImpersonationStorageService } from '@ghostfolio/client/services/impersonation-storage.service'; import { UserService } from '@ghostfolio/client/services/user/user.service'; import { downloadAsFile } from '@ghostfolio/common/helper'; -import { UniqueAsset, User } from '@ghostfolio/common/interfaces'; +import { User } from '@ghostfolio/common/interfaces'; import { hasPermission, permissions } from '@ghostfolio/common/permissions'; import { DataSource, Order as OrderModel } from '@prisma/client'; import { format, parseISO } from 'date-fns'; From 7fa6eda45d0ca3b02e4ad7fcec52629a25fabc0b Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Wed, 18 Jan 2023 21:37:22 +0100 Subject: [PATCH 16/26] Feature/remove emergency fund as asset class (#1615) * Remove emergency fund as asset class * Update changelog --- CHANGELOG.md | 1 + .../src/app/portfolio/portfolio.service.ts | 68 +++++++++++-------- libs/common/src/lib/config.ts | 4 +- .../portfolio-position.interface.ts | 2 +- .../holdings-table.component.ts | 6 +- 5 files changed, 44 insertions(+), 37 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fc3e2fdfe..7970a9229 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Improved the date formatting in the tooltip of the dividend timeline grouped by month / year - Improved the date formatting in the tooltip of the investment timeline grouped by month / year - Reduced the execution interval of the data gathering to every 4 hours +- Removed emergency fund as an asset class ## 1.227.1 - 2023-01-14 diff --git a/apps/api/src/app/portfolio/portfolio.service.ts b/apps/api/src/app/portfolio/portfolio.service.ts index 67941f12b..17747bae4 100644 --- a/apps/api/src/app/portfolio/portfolio.service.ts +++ b/apps/api/src/app/portfolio/portfolio.service.ts @@ -20,7 +20,7 @@ import { ExchangeRateDataService } from '@ghostfolio/api/services/exchange-rate- import { ImpersonationService } from '@ghostfolio/api/services/impersonation.service'; import { SymbolProfileService } from '@ghostfolio/api/services/symbol-profile.service'; import { - ASSET_SUB_CLASS_EMERGENCY_FUND, + EMERGENCY_FUND_TAG_ID, MAX_CHART_ITEMS, UNKNOWN_KEY } from '@ghostfolio/common/config'; @@ -575,7 +575,6 @@ export class PortfolioService { ) { const cashPositions = await this.getCashPositions({ cashDetails, - emergencyFund, userCurrency, investment: totalInvestmentInBaseCurrency, value: filteredValueInBaseCurrency @@ -595,6 +594,41 @@ export class PortfolioService { withExcludedAccounts }); + if ( + filters?.length === 1 && + filters[0].id === 'EMERGENCY_FUND_TAG_ID' && + filters[0].type === 'TAG' + ) { + const cashPositions = await this.getCashPositions({ + cashDetails, + userCurrency, + investment: totalInvestmentInBaseCurrency, + value: filteredValueInBaseCurrency + }); + + const emergencyFundInCash = emergencyFund + .minus( + this.getEmergencyFundPositionsValueInBaseCurrency({ + activities: orders + }) + ) + .toNumber(); + + accounts[UNKNOWN_KEY] = { + balance: 0, + currency: userCurrency, + current: emergencyFundInCash, + name: UNKNOWN_KEY, + original: emergencyFundInCash + }; + + holdings[userCurrency] = { + ...cashPositions[userCurrency], + investment: emergencyFundInCash, + value: emergencyFundInCash + }; + } + const summary = await this.getSummary({ impersonationId, userCurrency, @@ -1184,16 +1218,14 @@ export class PortfolioService { private async getCashPositions({ cashDetails, - emergencyFund, investment, userCurrency, value }: { cashDetails: CashDetails; - emergencyFund: Big; investment: Big; - value: Big; userCurrency: string; + value: Big; }) { const cashPositions: PortfolioDetails['holdings'] = { [userCurrency]: this.getInitialCashPosition({ @@ -1224,28 +1256,6 @@ export class PortfolioService { } } - if (emergencyFund.gt(0)) { - cashPositions[ASSET_SUB_CLASS_EMERGENCY_FUND] = { - ...cashPositions[userCurrency], - assetSubClass: ASSET_SUB_CLASS_EMERGENCY_FUND, - investment: emergencyFund.toNumber(), - name: ASSET_SUB_CLASS_EMERGENCY_FUND, - symbol: ASSET_SUB_CLASS_EMERGENCY_FUND, - value: emergencyFund.toNumber() - }; - - cashPositions[userCurrency].investment = new Big( - cashPositions[userCurrency].investment - ) - .minus(emergencyFund) - .toNumber(); - cashPositions[userCurrency].value = new Big( - cashPositions[userCurrency].value - ) - .minus(emergencyFund) - .toNumber(); - } - for (const symbol of Object.keys(cashPositions)) { // Calculate allocations for each currency cashPositions[symbol].allocationCurrent = value.gt(0) @@ -1359,8 +1369,8 @@ export class PortfolioService { }) { const emergencyFundOrders = activities.filter((activity) => { return ( - activity.tags?.some(({ name }) => { - return name === 'EMERGENCY_FUND'; + activity.tags?.some(({ id }) => { + return id === EMERGENCY_FUND_TAG_ID; }) ?? false ); }); diff --git a/libs/common/src/lib/config.ts b/libs/common/src/lib/config.ts index 91e83e2e0..577644116 100644 --- a/libs/common/src/lib/config.ts +++ b/libs/common/src/lib/config.ts @@ -33,8 +33,6 @@ export const warnColorRgb = { b: 69 }; -export const ASSET_SUB_CLASS_EMERGENCY_FUND = 'EMERGENCY_FUND'; - export const DATA_GATHERING_QUEUE = 'DATA_GATHERING_QUEUE'; export const DATA_GATHERING_QUEUE_PRIORITY_LOW = Number.MAX_SAFE_INTEGER; export const DATA_GATHERING_QUEUE_PRIORITY_HIGH = 1; @@ -43,6 +41,8 @@ export const DEFAULT_DATE_FORMAT_MONTH_YEAR = 'MMM yyyy'; export const DEFAULT_LANGUAGE_CODE = 'en'; export const DEFAULT_PAGE_SIZE = 50; +export const EMERGENCY_FUND_TAG_ID = '4452656d-9fa4-4bd0-ba38-70492e31d180'; + export const GATHER_ASSET_PROFILE_PROCESS = 'GATHER_ASSET_PROFILE'; export const GATHER_ASSET_PROFILE_PROCESS_OPTIONS: JobOptions = { attempts: 10, diff --git a/libs/common/src/lib/interfaces/portfolio-position.interface.ts b/libs/common/src/lib/interfaces/portfolio-position.interface.ts index c0a4288d5..c0c0dd6fb 100644 --- a/libs/common/src/lib/interfaces/portfolio-position.interface.ts +++ b/libs/common/src/lib/interfaces/portfolio-position.interface.ts @@ -8,7 +8,7 @@ export interface PortfolioPosition { allocationCurrent: number; allocationInvestment: number; assetClass?: AssetClass; - assetSubClass?: AssetSubClass | 'CASH' | 'EMERGENCY_FUND'; + assetSubClass?: AssetSubClass | 'CASH'; countries: Country[]; currency: string; dataSource: DataSource; diff --git a/libs/ui/src/lib/holdings-table/holdings-table.component.ts b/libs/ui/src/lib/holdings-table/holdings-table.component.ts index 6a56a9565..6ff3c1c7f 100644 --- a/libs/ui/src/lib/holdings-table/holdings-table.component.ts +++ b/libs/ui/src/lib/holdings-table/holdings-table.component.ts @@ -13,7 +13,6 @@ import { MatPaginator } from '@angular/material/paginator'; import { MatSort } from '@angular/material/sort'; import { MatTableDataSource } from '@angular/material/table'; import { Router } from '@angular/router'; -import { ASSET_SUB_CLASS_EMERGENCY_FUND } from '@ghostfolio/common/config'; import { PortfolioPosition, UniqueAsset } from '@ghostfolio/common/interfaces'; import { AssetClass, Order as OrderModel } from '@prisma/client'; import { Subject, Subscription } from 'rxjs'; @@ -42,10 +41,7 @@ export class HoldingsTableComponent implements OnChanges, OnDestroy, OnInit { public dataSource: MatTableDataSource = new MatTableDataSource(); public displayedColumns = []; - public ignoreAssetSubClasses = [ - AssetClass.CASH.toString(), - ASSET_SUB_CLASS_EMERGENCY_FUND - ]; + public ignoreAssetSubClasses = [AssetClass.CASH.toString()]; public isLoading = true; public routeQueryParams: Subscription; From e5bd0d1bfac3a3d554b5615743d8052653bd4f6c Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Wed, 18 Jan 2023 21:39:11 +0100 Subject: [PATCH 17/26] Release 1.228.0 (#1616) --- CHANGELOG.md | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7970a9229..e6f88b1b8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ 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 +## 1.228.0 - 2023-01-18 ### Added diff --git a/package.json b/package.json index f20160abc..fd4a155e5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ghostfolio", - "version": "1.227.1", + "version": "1.228.0", "homepage": "https://ghostfol.io", "license": "AGPL-3.0", "scripts": { From a834ef6b4cdd434c02aa893fba4c6cf6128a6202 Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Wed, 18 Jan 2023 22:01:59 +0100 Subject: [PATCH 18/26] Release 1.228.1 (#1617) --- CHANGELOG.md | 2 +- apps/api/src/app/portfolio/portfolio.service.ts | 2 +- package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e6f88b1b8..7afcf3965 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ 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). -## 1.228.0 - 2023-01-18 +## 1.228.1 - 2023-01-18 ### Added diff --git a/apps/api/src/app/portfolio/portfolio.service.ts b/apps/api/src/app/portfolio/portfolio.service.ts index 17747bae4..210b5b838 100644 --- a/apps/api/src/app/portfolio/portfolio.service.ts +++ b/apps/api/src/app/portfolio/portfolio.service.ts @@ -596,7 +596,7 @@ export class PortfolioService { if ( filters?.length === 1 && - filters[0].id === 'EMERGENCY_FUND_TAG_ID' && + filters[0].id === EMERGENCY_FUND_TAG_ID && filters[0].type === 'TAG' ) { const cashPositions = await this.getCashPositions({ diff --git a/package.json b/package.json index fd4a155e5..a319f0c3a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ghostfolio", - "version": "1.228.0", + "version": "1.228.1", "homepage": "https://ghostfol.io", "license": "AGPL-3.0", "scripts": { From b5f256be9582250277f0dab260f3997001024453 Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Fri, 20 Jan 2023 20:50:32 +0100 Subject: [PATCH 19/26] Remove mail address (#1621) --- README.md | 2 +- apps/client/src/app/pages/about/about-page.html | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index f09dd7541..fea70c4b7 100644 --- a/README.md +++ b/README.md @@ -269,7 +269,7 @@ You can get the _Bearer Token_ via `GET http://localhost:3333/api/v1/auth/anonym Ghostfolio is **100% free** and **open source**. We encourage and support an active and healthy community that accepts contributions from the public - including you. -Not sure what to work on? We have got some ideas. Please join the Ghostfolio [Slack channel](https://join.slack.com/t/ghostfolio/shared_invite/zt-vsaan64h-F_I0fEo5M0P88lP9ibCxFg), tweet to [@ghostfolio\_](https://twitter.com/ghostfolio_) or send an e-mail to hi@ghostfol.io. We would love to hear from you. +Not sure what to work on? We have got some ideas. Please join the Ghostfolio [Slack channel](https://join.slack.com/t/ghostfolio/shared_invite/zt-vsaan64h-F_I0fEo5M0P88lP9ibCxFg) or tweet to [@ghostfolio\_](https://twitter.com/ghostfolio_). We would love to hear from you. If you like to support this project, get [**Ghostfolio Premium**](https://ghostfol.io/en/pricing) or [**Buy me a coffee**](https://www.buymeacoffee.com/ghostfolio). diff --git a/apps/client/src/app/pages/about/about-page.html b/apps/client/src/app/pages/about/about-page.html index 20843c292..a6b688944 100644 --- a/apps/client/src/app/pages/about/about-page.html +++ b/apps/client/src/app/pages/about/about-page.html @@ -42,9 +42,11 @@ href="https://twitter.com/ghostfolio_" title="Tweet to Ghostfolio on Twitter" >@ghostfolio_, send an e-mail to - hi@ghostfol.io, send an e-mail to + hi@ghostfol.io or open an issue at Date: Fri, 20 Jan 2023 20:51:08 +0100 Subject: [PATCH 20/26] Bugfix/fix filtered value for emergency fund (#1619) * Fix filtered value * Update changelog --- CHANGELOG.md | 6 ++++++ apps/api/src/app/portfolio/portfolio.service.ts | 2 ++ 2 files changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7afcf3965..11653d69c 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 + +### Fixed + +- Fixed the value of the active (emergency fund) filter in percentage on the allocations page + ## 1.228.1 - 2023-01-18 ### Added diff --git a/apps/api/src/app/portfolio/portfolio.service.ts b/apps/api/src/app/portfolio/portfolio.service.ts index 210b5b838..5b7a8386f 100644 --- a/apps/api/src/app/portfolio/portfolio.service.ts +++ b/apps/api/src/app/portfolio/portfolio.service.ts @@ -614,6 +614,8 @@ export class PortfolioService { ) .toNumber(); + filteredValueInBaseCurrency = emergencyFund; + accounts[UNKNOWN_KEY] = { balance: 0, currency: userCurrency, From 271001f523ecdacacebae0b8801ee53e59d45b18 Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Sat, 21 Jan 2023 09:52:58 +0100 Subject: [PATCH 21/26] Feature/remove toggle on allocations page (#1620) * Rename allocationCurrent, remove allocationInvestment * Update changelog --- CHANGELOG.md | 4 + .../src/app/portfolio/portfolio.controller.ts | 2 +- .../src/app/portfolio/portfolio.service.ts | 13 +--- .../allocations/allocations-page.component.ts | 74 +++++-------------- .../allocations/allocations-page.html | 48 ------------ .../allocations/allocations-page.module.ts | 2 - .../app/pages/public/public-page.component.ts | 2 +- apps/client/src/locales/messages.de.xlf | 48 ++++-------- apps/client/src/locales/messages.es.xlf | 48 ++++-------- apps/client/src/locales/messages.fr.xlf | 48 ++++-------- apps/client/src/locales/messages.it.xlf | 48 ++++-------- apps/client/src/locales/messages.nl.xlf | 48 ++++-------- apps/client/src/locales/messages.pt.xlf | 48 ++++-------- apps/client/src/locales/messages.xlf | 46 ++++-------- .../portfolio-position.interface.ts | 3 +- .../portfolio-public-details.interface.ts | 2 +- .../holdings-table.component.html | 6 +- .../holdings-table.component.ts | 2 +- 18 files changed, 144 insertions(+), 348 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 11653d69c..1fb5bf697 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 +### Changed + +- Removed the toggle _Original Shares_ vs. _Current Shares_ on the allocations page + ### Fixed - Fixed the value of the active (emergency fund) filter in percentage on the allocations page diff --git a/apps/api/src/app/portfolio/portfolio.controller.ts b/apps/api/src/app/portfolio/portfolio.controller.ts index 3a1fa9898..7879fa4a5 100644 --- a/apps/api/src/app/portfolio/portfolio.controller.ts +++ b/apps/api/src/app/portfolio/portfolio.controller.ts @@ -441,7 +441,7 @@ export class PortfolioController { for (const [symbol, portfolioPosition] of Object.entries(holdings)) { portfolioPublicDetails.holdings[symbol] = { - allocationCurrent: portfolioPosition.value / totalValue, + allocationInPercentage: portfolioPosition.value / totalValue, countries: hasDetails ? portfolioPosition.countries : [], currency: hasDetails ? portfolioPosition.currency : undefined, dataSource: portfolioPosition.dataSource, diff --git a/apps/api/src/app/portfolio/portfolio.service.ts b/apps/api/src/app/portfolio/portfolio.service.ts index 5b7a8386f..558a988ec 100644 --- a/apps/api/src/app/portfolio/portfolio.service.ts +++ b/apps/api/src/app/portfolio/portfolio.service.ts @@ -537,12 +537,9 @@ export class PortfolioService { holdings[item.symbol] = { markets, - allocationCurrent: filteredValueInBaseCurrency.eq(0) + allocationInPercentage: filteredValueInBaseCurrency.eq(0) ? 0 : value.div(filteredValueInBaseCurrency).toNumber(), - allocationInvestment: item.investment - .div(totalInvestmentInBaseCurrency) - .toNumber(), assetClass: symbolProfile.assetClass, assetSubClass: symbolProfile.assetSubClass, countries: symbolProfile.countries, @@ -1260,12 +1257,9 @@ export class PortfolioService { for (const symbol of Object.keys(cashPositions)) { // Calculate allocations for each currency - cashPositions[symbol].allocationCurrent = value.gt(0) + cashPositions[symbol].allocationInPercentage = value.gt(0) ? new Big(cashPositions[symbol].value).div(value).toNumber() : 0; - cashPositions[symbol].allocationInvestment = investment.gt(0) - ? new Big(cashPositions[symbol].investment).div(investment).toNumber() - : 0; } return cashPositions; @@ -1432,8 +1426,7 @@ export class PortfolioService { }): PortfolioPosition { return { currency, - allocationCurrent: 0, - allocationInvestment: 0, + allocationInPercentage: 0, assetClass: AssetClass.CASH, assetSubClass: AssetClass.CASH, countries: [], diff --git a/apps/client/src/app/pages/portfolio/allocations/allocations-page.component.ts b/apps/client/src/app/pages/portfolio/allocations/allocations-page.component.ts index 6a5a57c82..910629a3e 100644 --- a/apps/client/src/app/pages/portfolio/allocations/allocations-page.component.ts +++ b/apps/client/src/app/pages/portfolio/allocations/allocations-page.component.ts @@ -18,7 +18,7 @@ import { User } from '@ghostfolio/common/interfaces'; import { hasPermission, permissions } from '@ghostfolio/common/permissions'; -import { Market, ToggleOption } from '@ghostfolio/common/types'; +import { Market } from '@ghostfolio/common/types'; import { translate } from '@ghostfolio/ui/i18n'; import { Account, AssetClass, DataSource } from '@prisma/client'; import { DeviceDetectorService } from 'ngx-device-detector'; @@ -53,11 +53,6 @@ export class AllocationsPageComponent implements OnDestroy, OnInit { public markets: { [key in Market]: { name: string; value: number }; }; - public period = 'current'; - public periodOptions: ToggleOption[] = [ - { label: $localize`Initial`, value: 'original' }, - { label: $localize`Current`, value: 'current' } - ]; public placeholder = ''; public portfolioDetails: PortfolioDetails; public positions: { @@ -146,7 +141,7 @@ export class AllocationsPageComponent implements OnDestroy, OnInit { .subscribe((portfolioDetails) => { this.portfolioDetails = portfolioDetails; - this.initializeAnalysisData(this.period); + this.initializeAnalysisData(); this.isLoading = false; @@ -248,7 +243,7 @@ export class AllocationsPageComponent implements OnDestroy, OnInit { }; } - public initializeAnalysisData(aPeriod: string) { + public initializeAnalysisData() { this.initialize(); for (const [id, { current, name, original }] of Object.entries( @@ -257,7 +252,7 @@ export class AllocationsPageComponent implements OnDestroy, OnInit { this.accounts[id] = { id, name, - value: aPeriod === 'original' ? original : current + value: current }; } @@ -266,18 +261,10 @@ export class AllocationsPageComponent implements OnDestroy, OnInit { )) { let value = 0; - if (aPeriod === 'original') { - if (this.hasImpersonationId) { - value = position.allocationInvestment; - } else { - value = position.investment; - } + if (this.hasImpersonationId) { + value = position.allocationInPercentage; } else { - if (this.hasImpersonationId) { - value = position.allocationCurrent; - } else { - value = position.value; - } + value = position.value; } this.positions[symbol] = { @@ -294,14 +281,11 @@ export class AllocationsPageComponent implements OnDestroy, OnInit { if (position.countries.length > 0) { this.markets.developedMarkets.value += - position.markets.developedMarkets * - (aPeriod === 'original' ? position.investment : position.value); + position.markets.developedMarkets * position.value; this.markets.emergingMarkets.value += - position.markets.emergingMarkets * - (aPeriod === 'original' ? position.investment : position.value); + position.markets.emergingMarkets * position.value; this.markets.otherMarkets.value += - position.markets.otherMarkets * - (aPeriod === 'original' ? position.investment : position.value); + position.markets.otherMarkets * position.value; for (const country of position.countries) { const { code, continent, name, weight } = country; @@ -311,11 +295,7 @@ export class AllocationsPageComponent implements OnDestroy, OnInit { } else { this.continents[continent] = { name: continent, - value: - weight * - (aPeriod === 'original' - ? this.portfolioDetails.holdings[symbol].investment - : this.portfolioDetails.holdings[symbol].value) + value: weight * this.portfolioDetails.holdings[symbol].value }; } @@ -324,24 +304,16 @@ export class AllocationsPageComponent implements OnDestroy, OnInit { } else { this.countries[code] = { name, - value: - weight * - (aPeriod === 'original' - ? this.portfolioDetails.holdings[symbol].investment - : this.portfolioDetails.holdings[symbol].value) + value: weight * this.portfolioDetails.holdings[symbol].value }; } } } else { this.continents[UNKNOWN_KEY].value += - aPeriod === 'original' - ? this.portfolioDetails.holdings[symbol].investment - : this.portfolioDetails.holdings[symbol].value; + this.portfolioDetails.holdings[symbol].value; this.countries[UNKNOWN_KEY].value += - aPeriod === 'original' - ? this.portfolioDetails.holdings[symbol].investment - : this.portfolioDetails.holdings[symbol].value; + this.portfolioDetails.holdings[symbol].value; } if (position.sectors.length > 0) { @@ -353,19 +325,13 @@ export class AllocationsPageComponent implements OnDestroy, OnInit { } else { this.sectors[name] = { name, - value: - weight * - (aPeriod === 'original' - ? this.portfolioDetails.holdings[symbol].investment - : this.portfolioDetails.holdings[symbol].value) + value: weight * this.portfolioDetails.holdings[symbol].value }; } } } else { this.sectors[UNKNOWN_KEY].value += - aPeriod === 'original' - ? this.portfolioDetails.holdings[symbol].investment - : this.portfolioDetails.holdings[symbol].value; + this.portfolioDetails.holdings[symbol].value; } } @@ -373,7 +339,7 @@ export class AllocationsPageComponent implements OnDestroy, OnInit { dataSource: position.dataSource, name: position.name, symbol: prettifySymbol(symbol), - value: aPeriod === 'original' ? position.investment : position.value + value: position.value }; } @@ -398,12 +364,6 @@ export class AllocationsPageComponent implements OnDestroy, OnInit { } } - public onChangePeriod(aValue: string) { - this.period = aValue; - - this.initializeAnalysisData(this.period); - } - public onSymbolChartClicked({ dataSource, symbol }: UniqueAsset) { if (dataSource && symbol) { this.router.navigate([], { 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 78d86d182..5ee7deb33 100644 --- a/apps/client/src/app/pages/portfolio/allocations/allocations-page.html +++ b/apps/client/src/app/pages/portfolio/allocations/allocations-page.html @@ -39,12 +39,6 @@ By Account - - - By Holding - - - - - Nach Währung apps/client/src/app/pages/portfolio/allocations/allocations-page.html - 67 + 61 @@ -1702,7 +1702,7 @@ Nach Anlageklasse apps/client/src/app/pages/portfolio/allocations/allocations-page.html - 96 + 84 @@ -1710,7 +1710,7 @@ Nach Position apps/client/src/app/pages/portfolio/allocations/allocations-page.html - 125 + 107 @@ -1718,7 +1718,7 @@ Nach Sektor apps/client/src/app/pages/portfolio/allocations/allocations-page.html - 154 + 130 @@ -1726,7 +1726,7 @@ Nach Kontinent apps/client/src/app/pages/portfolio/allocations/allocations-page.html - 184 + 154 @@ -1734,7 +1734,7 @@ Nach Land apps/client/src/app/pages/portfolio/allocations/allocations-page.html - 213 + 177 @@ -1742,7 +1742,7 @@ Regionen apps/client/src/app/pages/portfolio/allocations/allocations-page.html - 245 + 203 apps/client/src/app/pages/public/public-page.html @@ -2370,7 +2370,7 @@ Entwickelte Länder apps/client/src/app/pages/portfolio/allocations/allocations-page.html - 272 + 224 apps/client/src/app/pages/public/public-page.html @@ -2382,7 +2382,7 @@ Schwellenländer apps/client/src/app/pages/portfolio/allocations/allocations-page.html - 281 + 233 apps/client/src/app/pages/public/public-page.html @@ -2394,7 +2394,7 @@ Andere Länder apps/client/src/app/pages/portfolio/allocations/allocations-page.html - 290 + 242 apps/client/src/app/pages/public/public-page.html @@ -2417,22 +2417,6 @@ 44 - - Initial - Beginn - - apps/client/src/app/pages/portfolio/allocations/allocations-page.component.ts - 58 - - - - Current - Aktuell - - apps/client/src/app/pages/portfolio/allocations/allocations-page.component.ts - 59 - - Monthly Monatlich @@ -2454,7 +2438,7 @@ libs/ui/src/lib/fire-calculator/fire-calculator.component.ts - 281 + 283 @@ -2462,7 +2446,7 @@ Verzinsung libs/ui/src/lib/fire-calculator/fire-calculator.component.ts - 291 + 293 @@ -2470,7 +2454,7 @@ Ersparnisse libs/ui/src/lib/fire-calculator/fire-calculator.component.ts - 301 + 303 @@ -2518,7 +2502,7 @@ Filtern nach Konto oder Tag... apps/client/src/app/pages/portfolio/allocations/allocations-page.component.ts - 137 + 132 apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts @@ -2666,7 +2650,7 @@ Gesamtbetrag apps/client/src/app/components/investment-chart/investment-chart.component.ts - 178 + 181 @@ -2682,7 +2666,7 @@ Sparrate apps/client/src/app/components/investment-chart/investment-chart.component.ts - 242 + 245 diff --git a/apps/client/src/locales/messages.es.xlf b/apps/client/src/locales/messages.es.xlf index 453c70bc4..b590c22d1 100644 --- a/apps/client/src/locales/messages.es.xlf +++ b/apps/client/src/locales/messages.es.xlf @@ -1695,7 +1695,7 @@ Por divisa apps/client/src/app/pages/portfolio/allocations/allocations-page.html - 67 + 61 @@ -1703,7 +1703,7 @@ Por tipo de activo apps/client/src/app/pages/portfolio/allocations/allocations-page.html - 96 + 84 @@ -1711,7 +1711,7 @@ Por participación apps/client/src/app/pages/portfolio/allocations/allocations-page.html - 125 + 107 @@ -1719,7 +1719,7 @@ Por sector apps/client/src/app/pages/portfolio/allocations/allocations-page.html - 154 + 130 @@ -1727,7 +1727,7 @@ Por continente apps/client/src/app/pages/portfolio/allocations/allocations-page.html - 184 + 154 @@ -1735,7 +1735,7 @@ Por país apps/client/src/app/pages/portfolio/allocations/allocations-page.html - 213 + 177 @@ -1743,7 +1743,7 @@ Regiones apps/client/src/app/pages/portfolio/allocations/allocations-page.html - 245 + 203 apps/client/src/app/pages/public/public-page.html @@ -2295,7 +2295,7 @@ Mercados desarrollados apps/client/src/app/pages/portfolio/allocations/allocations-page.html - 272 + 224 apps/client/src/app/pages/public/public-page.html @@ -2343,7 +2343,7 @@ Otros mercados apps/client/src/app/pages/portfolio/allocations/allocations-page.html - 290 + 242 apps/client/src/app/pages/public/public-page.html @@ -2355,7 +2355,7 @@ Mercados emergentes apps/client/src/app/pages/portfolio/allocations/allocations-page.html - 281 + 233 apps/client/src/app/pages/public/public-page.html @@ -2423,15 +2423,7 @@ Ahorros libs/ui/src/lib/fire-calculator/fire-calculator.component.ts - 301 - - - - Initial - Inicial - - apps/client/src/app/pages/portfolio/allocations/allocations-page.component.ts - 58 + 303 @@ -2439,7 +2431,7 @@ Interés libs/ui/src/lib/fire-calculator/fire-calculator.component.ts - 291 + 293 @@ -2455,15 +2447,7 @@ libs/ui/src/lib/fire-calculator/fire-calculator.component.ts - 281 - - - - Current - Actual - - apps/client/src/app/pages/portfolio/allocations/allocations-page.component.ts - 59 + 283 @@ -2511,7 +2495,7 @@ Filtrar por cuenta o etiqueta... apps/client/src/app/pages/portfolio/allocations/allocations-page.component.ts - 137 + 132 apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts @@ -2667,7 +2651,7 @@ Importe total apps/client/src/app/components/investment-chart/investment-chart.component.ts - 178 + 181 @@ -2683,7 +2667,7 @@ Tasa de ahorro apps/client/src/app/components/investment-chart/investment-chart.component.ts - 242 + 245 diff --git a/apps/client/src/locales/messages.fr.xlf b/apps/client/src/locales/messages.fr.xlf index 286de3061..a37146092 100644 --- a/apps/client/src/locales/messages.fr.xlf +++ b/apps/client/src/locales/messages.fr.xlf @@ -1218,7 +1218,7 @@ Montant Total apps/client/src/app/components/investment-chart/investment-chart.component.ts - 178 + 181 @@ -1226,7 +1226,7 @@ Taux d'Épargne apps/client/src/app/components/investment-chart/investment-chart.component.ts - 242 + 245 @@ -2209,28 +2209,12 @@ 12 - - Initial - Initial - - apps/client/src/app/pages/portfolio/allocations/allocations-page.component.ts - 58 - - - - Current - Actuel - - apps/client/src/app/pages/portfolio/allocations/allocations-page.component.ts - 59 - - Filter by account or tag... Filtrer par compte ou étiquette... apps/client/src/app/pages/portfolio/allocations/allocations-page.component.ts - 137 + 132 apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts @@ -2270,7 +2254,7 @@ Par Devise apps/client/src/app/pages/portfolio/allocations/allocations-page.html - 67 + 61 @@ -2278,7 +2262,7 @@ Par Classe d'Actifs apps/client/src/app/pages/portfolio/allocations/allocations-page.html - 96 + 84 @@ -2286,7 +2270,7 @@ Par Position apps/client/src/app/pages/portfolio/allocations/allocations-page.html - 125 + 107 @@ -2294,7 +2278,7 @@ Par Secteur apps/client/src/app/pages/portfolio/allocations/allocations-page.html - 154 + 130 @@ -2302,7 +2286,7 @@ Par Continent apps/client/src/app/pages/portfolio/allocations/allocations-page.html - 184 + 154 @@ -2310,7 +2294,7 @@ Par Pays apps/client/src/app/pages/portfolio/allocations/allocations-page.html - 213 + 177 @@ -2318,7 +2302,7 @@ Régions apps/client/src/app/pages/portfolio/allocations/allocations-page.html - 245 + 203 apps/client/src/app/pages/public/public-page.html @@ -2330,7 +2314,7 @@ Marchés Développés apps/client/src/app/pages/portfolio/allocations/allocations-page.html - 272 + 224 apps/client/src/app/pages/public/public-page.html @@ -2342,7 +2326,7 @@ Marchés Émergents apps/client/src/app/pages/portfolio/allocations/allocations-page.html - 281 + 233 apps/client/src/app/pages/public/public-page.html @@ -2354,7 +2338,7 @@ Autres marchés apps/client/src/app/pages/portfolio/allocations/allocations-page.html - 290 + 242 apps/client/src/app/pages/public/public-page.html @@ -2390,7 +2374,7 @@ libs/ui/src/lib/fire-calculator/fire-calculator.component.ts - 281 + 283 @@ -2790,7 +2774,7 @@ Intérêt libs/ui/src/lib/fire-calculator/fire-calculator.component.ts - 291 + 293 @@ -2798,7 +2782,7 @@ Épargne libs/ui/src/lib/fire-calculator/fire-calculator.component.ts - 301 + 303 diff --git a/apps/client/src/locales/messages.it.xlf b/apps/client/src/locales/messages.it.xlf index 4c5b0f1e2..3556e46d8 100644 --- a/apps/client/src/locales/messages.it.xlf +++ b/apps/client/src/locales/messages.it.xlf @@ -1695,7 +1695,7 @@ Per valuta apps/client/src/app/pages/portfolio/allocations/allocations-page.html - 67 + 61 @@ -1703,7 +1703,7 @@ Per asset class apps/client/src/app/pages/portfolio/allocations/allocations-page.html - 96 + 84 @@ -1711,7 +1711,7 @@ Per partecipazione apps/client/src/app/pages/portfolio/allocations/allocations-page.html - 125 + 107 @@ -1719,7 +1719,7 @@ Per settore apps/client/src/app/pages/portfolio/allocations/allocations-page.html - 154 + 130 @@ -1727,7 +1727,7 @@ Per continente apps/client/src/app/pages/portfolio/allocations/allocations-page.html - 184 + 154 @@ -1735,7 +1735,7 @@ Per paese apps/client/src/app/pages/portfolio/allocations/allocations-page.html - 213 + 177 @@ -1743,7 +1743,7 @@ Regioni apps/client/src/app/pages/portfolio/allocations/allocations-page.html - 245 + 203 apps/client/src/app/pages/public/public-page.html @@ -2295,7 +2295,7 @@ Mercati sviluppati apps/client/src/app/pages/portfolio/allocations/allocations-page.html - 272 + 224 apps/client/src/app/pages/public/public-page.html @@ -2343,7 +2343,7 @@ Altri mercati apps/client/src/app/pages/portfolio/allocations/allocations-page.html - 290 + 242 apps/client/src/app/pages/public/public-page.html @@ -2355,7 +2355,7 @@ Mercati emergenti apps/client/src/app/pages/portfolio/allocations/allocations-page.html - 281 + 233 apps/client/src/app/pages/public/public-page.html @@ -2423,15 +2423,7 @@ Risparmio libs/ui/src/lib/fire-calculator/fire-calculator.component.ts - 301 - - - - Initial - Iniziale - - apps/client/src/app/pages/portfolio/allocations/allocations-page.component.ts - 58 + 303 @@ -2439,7 +2431,7 @@ Interesse libs/ui/src/lib/fire-calculator/fire-calculator.component.ts - 291 + 293 @@ -2455,15 +2447,7 @@ libs/ui/src/lib/fire-calculator/fire-calculator.component.ts - 281 - - - - Current - Attuale - - apps/client/src/app/pages/portfolio/allocations/allocations-page.component.ts - 59 + 283 @@ -2511,7 +2495,7 @@ Filtra per account o tag... apps/client/src/app/pages/portfolio/allocations/allocations-page.component.ts - 137 + 132 apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts @@ -2667,7 +2651,7 @@ Total Amount apps/client/src/app/components/investment-chart/investment-chart.component.ts - 178 + 181 @@ -2683,7 +2667,7 @@ Tasso di risparmio apps/client/src/app/components/investment-chart/investment-chart.component.ts - 242 + 245 diff --git a/apps/client/src/locales/messages.nl.xlf b/apps/client/src/locales/messages.nl.xlf index 24df5019c..2b14a8b8b 100644 --- a/apps/client/src/locales/messages.nl.xlf +++ b/apps/client/src/locales/messages.nl.xlf @@ -1694,7 +1694,7 @@ Per valuta apps/client/src/app/pages/portfolio/allocations/allocations-page.html - 67 + 61 @@ -1702,7 +1702,7 @@ Per activaklasse apps/client/src/app/pages/portfolio/allocations/allocations-page.html - 96 + 84 @@ -1710,7 +1710,7 @@ Per participatie apps/client/src/app/pages/portfolio/allocations/allocations-page.html - 125 + 107 @@ -1718,7 +1718,7 @@ Per Sector apps/client/src/app/pages/portfolio/allocations/allocations-page.html - 154 + 130 @@ -1726,7 +1726,7 @@ Per continent apps/client/src/app/pages/portfolio/allocations/allocations-page.html - 184 + 154 @@ -1734,7 +1734,7 @@ Per land apps/client/src/app/pages/portfolio/allocations/allocations-page.html - 213 + 177 @@ -1742,7 +1742,7 @@ Regio's apps/client/src/app/pages/portfolio/allocations/allocations-page.html - 245 + 203 apps/client/src/app/pages/public/public-page.html @@ -2294,7 +2294,7 @@ Ontwikkelde markten apps/client/src/app/pages/portfolio/allocations/allocations-page.html - 272 + 224 apps/client/src/app/pages/public/public-page.html @@ -2342,7 +2342,7 @@ Andere markten apps/client/src/app/pages/portfolio/allocations/allocations-page.html - 290 + 242 apps/client/src/app/pages/public/public-page.html @@ -2354,7 +2354,7 @@ Opkomende markten apps/client/src/app/pages/portfolio/allocations/allocations-page.html - 281 + 233 apps/client/src/app/pages/public/public-page.html @@ -2422,15 +2422,7 @@ Besparingen libs/ui/src/lib/fire-calculator/fire-calculator.component.ts - 301 - - - - Initial - Aanvankelijk - - apps/client/src/app/pages/portfolio/allocations/allocations-page.component.ts - 58 + 303 @@ -2438,7 +2430,7 @@ Rente libs/ui/src/lib/fire-calculator/fire-calculator.component.ts - 291 + 293 @@ -2454,15 +2446,7 @@ libs/ui/src/lib/fire-calculator/fire-calculator.component.ts - 281 - - - - Current - Huidige - - apps/client/src/app/pages/portfolio/allocations/allocations-page.component.ts - 59 + 283 @@ -2510,7 +2494,7 @@ Filter op account of tag... apps/client/src/app/pages/portfolio/allocations/allocations-page.component.ts - 137 + 132 apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts @@ -2666,7 +2650,7 @@ Totaalbedrag apps/client/src/app/components/investment-chart/investment-chart.component.ts - 178 + 181 @@ -2682,7 +2666,7 @@ Spaarquote apps/client/src/app/components/investment-chart/investment-chart.component.ts - 242 + 245 diff --git a/apps/client/src/locales/messages.pt.xlf b/apps/client/src/locales/messages.pt.xlf index 7ac806d28..aa0037b3d 100644 --- a/apps/client/src/locales/messages.pt.xlf +++ b/apps/client/src/locales/messages.pt.xlf @@ -1114,7 +1114,7 @@ libs/ui/src/lib/fire-calculator/fire-calculator.component.ts - 281 + 283 @@ -1122,7 +1122,7 @@ Total Amount apps/client/src/app/components/investment-chart/investment-chart.component.ts - 178 + 181 @@ -1130,7 +1130,7 @@ Savings Rate apps/client/src/app/components/investment-chart/investment-chart.component.ts - 242 + 245 @@ -2153,28 +2153,12 @@ 12 - - Initial - Initial - - apps/client/src/app/pages/portfolio/allocations/allocations-page.component.ts - 58 - - - - Current - Current - - apps/client/src/app/pages/portfolio/allocations/allocations-page.component.ts - 59 - - Filter by account or tag... Filter by account or tag... apps/client/src/app/pages/portfolio/allocations/allocations-page.component.ts - 137 + 132 apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts @@ -2214,7 +2198,7 @@ By Currency apps/client/src/app/pages/portfolio/allocations/allocations-page.html - 67 + 61 @@ -2222,7 +2206,7 @@ By Asset Class apps/client/src/app/pages/portfolio/allocations/allocations-page.html - 96 + 84 @@ -2230,7 +2214,7 @@ By Holding apps/client/src/app/pages/portfolio/allocations/allocations-page.html - 125 + 107 @@ -2238,7 +2222,7 @@ By Sector apps/client/src/app/pages/portfolio/allocations/allocations-page.html - 154 + 130 @@ -2246,7 +2230,7 @@ By Continent apps/client/src/app/pages/portfolio/allocations/allocations-page.html - 184 + 154 @@ -2254,7 +2238,7 @@ By Country apps/client/src/app/pages/portfolio/allocations/allocations-page.html - 213 + 177 @@ -2262,7 +2246,7 @@ Regions apps/client/src/app/pages/portfolio/allocations/allocations-page.html - 245 + 203 apps/client/src/app/pages/public/public-page.html @@ -2274,7 +2258,7 @@ Developed Markets apps/client/src/app/pages/portfolio/allocations/allocations-page.html - 272 + 224 apps/client/src/app/pages/public/public-page.html @@ -2286,7 +2270,7 @@ Emerging Markets apps/client/src/app/pages/portfolio/allocations/allocations-page.html - 281 + 233 apps/client/src/app/pages/public/public-page.html @@ -2298,7 +2282,7 @@ Other Markets apps/client/src/app/pages/portfolio/allocations/allocations-page.html - 290 + 242 apps/client/src/app/pages/public/public-page.html @@ -2706,7 +2690,7 @@ Interest libs/ui/src/lib/fire-calculator/fire-calculator.component.ts - 291 + 293 @@ -2714,7 +2698,7 @@ Savings libs/ui/src/lib/fire-calculator/fire-calculator.component.ts - 301 + 303 diff --git a/apps/client/src/locales/messages.xlf b/apps/client/src/locales/messages.xlf index e7c9e1aca..8270e5505 100644 --- a/apps/client/src/locales/messages.xlf +++ b/apps/client/src/locales/messages.xlf @@ -1529,49 +1529,49 @@ By Currency apps/client/src/app/pages/portfolio/allocations/allocations-page.html - 67 + 61 By Asset Class apps/client/src/app/pages/portfolio/allocations/allocations-page.html - 96 + 84 By Holding apps/client/src/app/pages/portfolio/allocations/allocations-page.html - 125 + 107 By Sector apps/client/src/app/pages/portfolio/allocations/allocations-page.html - 154 + 130 By Continent apps/client/src/app/pages/portfolio/allocations/allocations-page.html - 184 + 154 By Country apps/client/src/app/pages/portfolio/allocations/allocations-page.html - 213 + 177 Regions apps/client/src/app/pages/portfolio/allocations/allocations-page.html - 245 + 203 apps/client/src/app/pages/public/public-page.html @@ -2062,7 +2062,7 @@ Developed Markets apps/client/src/app/pages/portfolio/allocations/allocations-page.html - 272 + 224 apps/client/src/app/pages/public/public-page.html @@ -2106,7 +2106,7 @@ Other Markets apps/client/src/app/pages/portfolio/allocations/allocations-page.html - 290 + 242 apps/client/src/app/pages/public/public-page.html @@ -2117,7 +2117,7 @@ Emerging Markets apps/client/src/app/pages/portfolio/allocations/allocations-page.html - 281 + 233 apps/client/src/app/pages/public/public-page.html @@ -2178,21 +2178,14 @@ Savings libs/ui/src/lib/fire-calculator/fire-calculator.component.ts - 301 - - - - Initial - - apps/client/src/app/pages/portfolio/allocations/allocations-page.component.ts - 58 + 303 Interest libs/ui/src/lib/fire-calculator/fire-calculator.component.ts - 291 + 293 @@ -2207,14 +2200,7 @@ libs/ui/src/lib/fire-calculator/fire-calculator.component.ts - 281 - - - - Current - - apps/client/src/app/pages/portfolio/allocations/allocations-page.component.ts - 59 + 283 @@ -2256,7 +2242,7 @@ Filter by account or tag... apps/client/src/app/pages/portfolio/allocations/allocations-page.component.ts - 137 + 132 apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts @@ -2394,7 +2380,7 @@ Total Amount apps/client/src/app/components/investment-chart/investment-chart.component.ts - 178 + 181 @@ -2408,7 +2394,7 @@ Savings Rate apps/client/src/app/components/investment-chart/investment-chart.component.ts - 242 + 245 diff --git a/libs/common/src/lib/interfaces/portfolio-position.interface.ts b/libs/common/src/lib/interfaces/portfolio-position.interface.ts index c0c0dd6fb..126ffdab7 100644 --- a/libs/common/src/lib/interfaces/portfolio-position.interface.ts +++ b/libs/common/src/lib/interfaces/portfolio-position.interface.ts @@ -5,8 +5,7 @@ import { Country } from './country.interface'; import { Sector } from './sector.interface'; export interface PortfolioPosition { - allocationCurrent: number; - allocationInvestment: number; + allocationInPercentage: number; assetClass?: AssetClass; assetSubClass?: AssetSubClass | 'CASH'; countries: Country[]; diff --git a/libs/common/src/lib/interfaces/portfolio-public-details.interface.ts b/libs/common/src/lib/interfaces/portfolio-public-details.interface.ts index 52dddae3c..2ba22a3d2 100644 --- a/libs/common/src/lib/interfaces/portfolio-public-details.interface.ts +++ b/libs/common/src/lib/interfaces/portfolio-public-details.interface.ts @@ -6,7 +6,7 @@ export interface PortfolioPublicDetails { holdings: { [symbol: string]: Pick< PortfolioPosition, - | 'allocationCurrent' + | 'allocationInPercentage' | 'countries' | 'currency' | 'dataSource' diff --git a/libs/ui/src/lib/holdings-table/holdings-table.component.html b/libs/ui/src/lib/holdings-table/holdings-table.component.html index cc76cd687..b994ba129 100644 --- a/libs/ui/src/lib/holdings-table/holdings-table.component.html +++ b/libs/ui/src/lib/holdings-table/holdings-table.component.html @@ -3,7 +3,7 @@ class="gf-table w-100" mat-table matSort - matSortActive="allocationCurrent" + matSortActive="allocationInPercentage" matSortDirection="desc" [dataSource]="dataSource" > @@ -85,7 +85,7 @@ - +
diff --git a/libs/ui/src/lib/holdings-table/holdings-table.component.ts b/libs/ui/src/lib/holdings-table/holdings-table.component.ts index 6ff3c1c7f..a4aee7710 100644 --- a/libs/ui/src/lib/holdings-table/holdings-table.component.ts +++ b/libs/ui/src/lib/holdings-table/holdings-table.component.ts @@ -58,7 +58,7 @@ export class HoldingsTableComponent implements OnChanges, OnDestroy, OnInit { this.displayedColumns.push('value'); } - this.displayedColumns.push('allocationCurrent'); + this.displayedColumns.push('allocationInPercentage'); this.displayedColumns.push('performance'); this.isLoading = true; From 6cd51fb044271da3baca74013e5a19c1af8d6b3d Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Sat, 21 Jan 2023 11:30:53 +0100 Subject: [PATCH 22/26] Feature/hide irrelevant errors in client (#1623) * Hide irrelevant errors in client * Update changelog --- CHANGELOG.md | 1 + .../src/app/portfolio/portfolio-calculator.ts | 2 +- .../src/app/portfolio/portfolio.service.ts | 54 ++++++++----------- .../home-overview/home-overview.component.ts | 9 ++-- .../home-overview/home-overview.html | 1 - .../portfolio-performance.component.html | 4 +- .../portfolio-performance.component.ts | 1 - 7 files changed, 31 insertions(+), 41 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1fb5bf697..231873fd2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed - Removed the toggle _Original Shares_ vs. _Current Shares_ on the allocations page +- Hid error messages related to no current investment in the client ### Fixed diff --git a/apps/api/src/app/portfolio/portfolio-calculator.ts b/apps/api/src/app/portfolio/portfolio-calculator.ts index 48f1e7507..9c659c167 100644 --- a/apps/api/src/app/portfolio/portfolio-calculator.ts +++ b/apps/api/src/app/portfolio/portfolio-calculator.ts @@ -447,7 +447,7 @@ export class PortfolioCalculator { transactionCount: item.transactionCount }); - if (hasErrors) { + if (hasErrors && item.investment.gt(0)) { errors.push({ dataSource: item.dataSource, symbol: item.symbol }); } } diff --git a/apps/api/src/app/portfolio/portfolio.service.ts b/apps/api/src/app/portfolio/portfolio.service.ts index 558a988ec..3410be220 100644 --- a/apps/api/src/app/portfolio/portfolio.service.ts +++ b/apps/api/src/app/portfolio/portfolio.service.ts @@ -1039,29 +1039,21 @@ export class PortfolioService { const portfolioStart = parseDate(transactionPoints[0].date); const startDate = this.getStartDate(dateRange, portfolioStart); - const currentPositions = await portfolioCalculator.getCurrentPositions( - startDate - ); - - const hasErrors = currentPositions.hasErrors; - const currentValue = currentPositions.currentValue.toNumber(); - const currentGrossPerformance = currentPositions.grossPerformance; - const currentGrossPerformancePercent = - currentPositions.grossPerformancePercentage; - let currentNetPerformance = currentPositions.netPerformance; - let currentNetPerformancePercent = - currentPositions.netPerformancePercentage; - const totalInvestment = currentPositions.totalInvestment; - - // if (currentGrossPerformance.mul(currentGrossPerformancePercent).lt(0)) { - // // If algebraic sign is different, harmonize it - // currentGrossPerformancePercent = currentGrossPerformancePercent.mul(-1); - // } - - // if (currentNetPerformance.mul(currentNetPerformancePercent).lt(0)) { - // // If algebraic sign is different, harmonize it - // currentNetPerformancePercent = currentNetPerformancePercent.mul(-1); - // } + const { + currentValue, + errors, + grossPerformance, + grossPerformancePercentage, + hasErrors, + netPerformance, + netPerformancePercentage, + totalInvestment + } = await portfolioCalculator.getCurrentPositions(startDate); + + const currentGrossPerformance = grossPerformance; + const currentGrossPerformancePercent = grossPerformancePercentage; + let currentNetPerformance = netPerformance; + let currentNetPerformancePercent = netPerformancePercentage; const historicalDataContainer = await this.getChart({ dateRange, @@ -1083,28 +1075,28 @@ export class PortfolioService { } return { + errors, + hasErrors, chart: historicalDataContainer.items.map( ({ date, - netPerformance, + netPerformance: netPerformanceOfItem, netPerformanceInPercentage, - totalInvestment, + totalInvestment: totalInvestmentOfItem, value }) => { return { date, - netPerformance, netPerformanceInPercentage, - totalInvestment, - value + value, + netPerformance: netPerformanceOfItem, + totalInvestment: totalInvestmentOfItem }; } ), - errors: currentPositions.errors, firstOrderDate: parseDate(historicalDataContainer.items[0]?.date), - hasErrors: currentPositions.hasErrors || hasErrors, performance: { - currentValue, + currentValue: currentValue.toNumber(), currentGrossPerformance: currentGrossPerformance.toNumber(), currentGrossPerformancePercent: currentGrossPerformancePercent.toNumber(), diff --git a/apps/client/src/app/components/home-overview/home-overview.component.ts b/apps/client/src/app/components/home-overview/home-overview.component.ts index eb8f0c81c..be1191b17 100644 --- a/apps/client/src/app/components/home-overview/home-overview.component.ts +++ b/apps/client/src/app/components/home-overview/home-overview.component.ts @@ -110,13 +110,12 @@ export class HomeOverviewComponent implements OnDestroy, OnInit { range: this.user?.settings?.dateRange }) .pipe(takeUntil(this.unsubscribeSubject)) - .subscribe((response) => { - this.errors = response.errors; - this.hasError = response.hasErrors; - this.performance = response.performance; + .subscribe(({ chart, errors, performance }) => { + this.errors = errors; + this.performance = performance; this.isLoadingPerformance = false; - this.historicalDataItems = response.chart.map( + this.historicalDataItems = chart.map( ({ date, netPerformanceInPercentage }) => { return { date, diff --git a/apps/client/src/app/components/home-overview/home-overview.html b/apps/client/src/app/components/home-overview/home-overview.html index 9a0cbb54c..6c0644021 100644 --- a/apps/client/src/app/components/home-overview/home-overview.html +++ b/apps/client/src/app/components/home-overview/home-overview.html @@ -37,7 +37,6 @@ [baseCurrency]="user?.settings?.baseCurrency" [deviceType]="deviceType" [errors]="errors" - [hasError]="hasError" [isAllTimeHigh]="isAllTimeHigh" [isAllTimeLow]="isAllTimeLow" [isLoading]="isLoadingPerformance" diff --git a/apps/client/src/app/components/portfolio-performance/portfolio-performance.component.html b/apps/client/src/app/components/portfolio-performance/portfolio-performance.component.html index 5601e42cc..025259c23 100644 --- a/apps/client/src/app/components/portfolio-performance/portfolio-performance.component.html +++ b/apps/client/src/app/components/portfolio-performance/portfolio-performance.component.html @@ -3,14 +3,14 @@
diff --git a/apps/client/src/app/components/portfolio-performance/portfolio-performance.component.ts b/apps/client/src/app/components/portfolio-performance/portfolio-performance.component.ts index 1d2323676..586d16ebf 100644 --- a/apps/client/src/app/components/portfolio-performance/portfolio-performance.component.ts +++ b/apps/client/src/app/components/portfolio-performance/portfolio-performance.component.ts @@ -28,7 +28,6 @@ export class PortfolioPerformanceComponent implements OnChanges, OnInit { @Input() baseCurrency: string; @Input() deviceType: string; @Input() errors: ResponseError['errors']; - @Input() hasError: boolean; @Input() isAllTimeHigh: boolean; @Input() isAllTimeLow: boolean; @Input() isLoading: boolean; From bf9b60aa744c81df7d78bcf69f0475e8a890d92a Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Sat, 21 Jan 2023 11:31:52 +0100 Subject: [PATCH 23/26] Feature/add sackgeld.com to as seen in section (#1622) * Add Sackgeld.com * Update changelog --- CHANGELOG.md | 4 ++++ .../src/app/pages/landing/landing-page.html | 20 ++++++++++++------ .../src/app/pages/landing/landing-page.scss | 5 +++++ .../src/assets/images/logo-sackgeld.png | Bin 0 -> 40513 bytes 4 files changed, 23 insertions(+), 6 deletions(-) create mode 100644 apps/client/src/assets/images/logo-sackgeld.png diff --git a/CHANGELOG.md b/CHANGELOG.md index 231873fd2..05bba5142 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 _Sackgeld.com_ to the _As seen in_ section on the landing page + ### Changed - Removed the toggle _Original Shares_ vs. _Current Shares_ on the allocations page diff --git a/apps/client/src/app/pages/landing/landing-page.html b/apps/client/src/app/pages/landing/landing-page.html index 64f943f3c..2b3024a45 100644 --- a/apps/client/src/app/pages/landing/landing-page.html +++ b/apps/client/src/app/pages/landing/landing-page.html @@ -106,7 +106,7 @@
As seen in
-
+ -
+
-
+
-
+
-
+
-
+
+ +
+

Ghostfolio auf dem + Fintech News Portal Sackgeld.com vorgestellt wurde. +

+
+
+

+ Ghostfolio – Open Source Wealth Management Software +

+

+ Ghostfolio ermöglicht es dir, deine Portfolio-Performance einfach zu + verfolgen und zu analysieren. Es bietet dir detaillierte + Informationen über deine Positionen, historische Entwicklung und die + Zusammenstellung deines Portfolios. Durch die Open Source-Lizenz (GNU Affero General Public License v3.0) wird die Software ständig weiterentwickelt und verbessert und du + hast sogar die Möglichkeit, dich selbst daran zu beteiligen. Wir + sind davon überzeugt, mit dem Open-Source-Ansatz von Ghostfolio das + Finanzwissen und Investieren für alle zugänglicher zu machen. +

+
+
+

Sackgeld.com – App für ein höheres Sackgeld

+

+ Das Schweizer Fintech News Portal + Sackgeld.com + informiert über die neuesten Entwicklungen und Innovationen im + Bereich FinTech. Dazu gehören News, Artikel und persönliche + Erfahrungen aus der Welt der digitalen Finanz Apps, Säule 3a, P2P + und Immobilien. +

+
+
+

+ Wenn du mehr über Ghostfolio erfahren möchtest, kannst du hier den + ganzen Artikel "Was taugt Ghostfolio als Portfolio Performance Tracking-Tool?" nachlesen. +

+

+ Wir freuen uns auf dein Feedback.
+ Thomas von Ghostfolio +

+
+
+
    +
  • + AGPL-3.0 +
  • +
  • + Aktie +
  • +
  • + Altersvorsorge +
  • +
  • + Anlage +
  • +
  • + App +
  • +
  • + Feedback +
  • +
  • + Finanzwissen +
  • +
  • + Fintech +
  • +
  • + Ghostfolio +
  • +
  • + Immobilien +
  • +
  • + Innovation +
  • +
  • + Investieren +
  • +
  • + Lizenz +
  • +
  • + Open Source +
  • +
  • + OSS +
  • +
  • + P2P +
  • +
  • + Performance +
  • +
  • + Portfolio +
  • +
  • + Sackgeld +
  • +
  • + Säule 3a +
  • +
  • + Schweiz +
  • +
  • + Software +
  • +
  • + Taschengeld +
  • +
  • + Tool +
  • +
  • + Vermögen +
  • +
  • + Wealth Management +
  • +
+
+
+
+
+