From 1aa1960d45ec5d731a8351663d70154e6e50c2b7 Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Thu, 20 Mar 2025 08:03:32 +0100 Subject: [PATCH 1/5] Feature/rename TWR to ROAI (#4464) * Rename TWR to ROAI --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 14477ea9..ed82ac72 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ Ghostfolio is for you if you are... - ✅ Create, update and delete transactions - ✅ Multi account management -- ✅ Portfolio performance: Time-weighted rate of return (TWR) for `Today`, `WTD`, `MTD`, `YTD`, `1Y`, `5Y`, `Max` +- ✅ Portfolio performance: Return on Average Investment (ROAI) for `Today`, `WTD`, `MTD`, `YTD`, `1Y`, `5Y`, `Max` - ✅ Various charts - ✅ Static analysis to identify potential risks in your portfolio - ✅ Import and export transactions From d8b305a343720cd07f618e64722ecf1119ea429e Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Thu, 20 Mar 2025 08:04:02 +0100 Subject: [PATCH 2/5] Feature/add Storybook to sitemap.xml (#4452) * Add Storybook * Update changelog --- CHANGELOG.md | 1 + apps/api/src/assets/sitemap.xml | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8f58b23f..4d24ce5d 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 ### Added - Added support for filtering in the _Copy AI prompt to clipboard_ actions on the analysis page (experimental) +- Added the _Storybook_ path to the `sitemap.xml` file ### Changed diff --git a/apps/api/src/assets/sitemap.xml b/apps/api/src/assets/sitemap.xml index a422ff31..fc1e89db 100644 --- a/apps/api/src/assets/sitemap.xml +++ b/apps/api/src/assets/sitemap.xml @@ -92,6 +92,10 @@ https://ghostfol.io/de/ueber-uns/oss-friends ${currentDate}T00:00:00+00:00 + + https://ghostfol.io/development/storybook + ${currentDate}T00:00:00+00:00 + https://ghostfol.io/en ${currentDate}T00:00:00+00:00 From 150d97bd420c1a480b7658df34eed05be8aaa28c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 21 Mar 2025 20:40:59 +0100 Subject: [PATCH 3/5] Feature/update locales (#4463) Co-authored-by: github-actions[bot] --- apps/client/src/locales/messages.ca.xlf | 10 +++++----- apps/client/src/locales/messages.de.xlf | 10 +++++----- apps/client/src/locales/messages.es.xlf | 10 +++++----- apps/client/src/locales/messages.fr.xlf | 10 +++++----- apps/client/src/locales/messages.it.xlf | 10 +++++----- apps/client/src/locales/messages.nl.xlf | 10 +++++----- apps/client/src/locales/messages.pl.xlf | 10 +++++----- apps/client/src/locales/messages.pt.xlf | 10 +++++----- apps/client/src/locales/messages.tr.xlf | 10 +++++----- apps/client/src/locales/messages.uk.xlf | 10 +++++----- apps/client/src/locales/messages.xlf | 10 +++++----- apps/client/src/locales/messages.zh.xlf | 10 +++++----- 12 files changed, 60 insertions(+), 60 deletions(-) diff --git a/apps/client/src/locales/messages.ca.xlf b/apps/client/src/locales/messages.ca.xlf index f83df877..52a1a1da 100644 --- a/apps/client/src/locales/messages.ca.xlf +++ b/apps/client/src/locales/messages.ca.xlf @@ -2475,7 +2475,7 @@ apps/client/src/app/components/user-account-settings/user-account-settings.component.ts - 160 + 159 @@ -3343,7 +3343,7 @@ Auto apps/client/src/app/components/user-account-settings/user-account-settings.component.ts - 40 + 39 @@ -3351,7 +3351,7 @@ Do you really want to close your Ghostfolio account? apps/client/src/app/components/user-account-settings/user-account-settings.component.ts - 175 + 174 @@ -3359,7 +3359,7 @@ Do you really want to remove this sign in method? apps/client/src/app/components/user-account-settings/user-account-settings.component.ts - 249 + 248 @@ -3367,7 +3367,7 @@ Oops! There was an error setting up biometric authentication. apps/client/src/app/components/user-account-settings/user-account-settings.component.ts - 303 + 302 diff --git a/apps/client/src/locales/messages.de.xlf b/apps/client/src/locales/messages.de.xlf index d8ee071f..49495d26 100644 --- a/apps/client/src/locales/messages.de.xlf +++ b/apps/client/src/locales/messages.de.xlf @@ -1022,7 +1022,7 @@ apps/client/src/app/components/user-account-settings/user-account-settings.component.ts - 160 + 159 @@ -1662,7 +1662,7 @@ Möchtest du diese Anmeldemethode wirklich löschen? apps/client/src/app/components/user-account-settings/user-account-settings.component.ts - 249 + 248 @@ -2906,7 +2906,7 @@ Automatisch apps/client/src/app/components/user-account-settings/user-account-settings.component.ts - 40 + 39 @@ -6603,7 +6603,7 @@ Möchtest du dieses Ghostfolio Konto wirklich schliessen? apps/client/src/app/components/user-account-settings/user-account-settings.component.ts - 175 + 174 @@ -6651,7 +6651,7 @@ Ups! Beim Einrichten der biometrischen Authentifizierung ist ein Fehler aufgetreten. apps/client/src/app/components/user-account-settings/user-account-settings.component.ts - 303 + 302 diff --git a/apps/client/src/locales/messages.es.xlf b/apps/client/src/locales/messages.es.xlf index 5b9c5dbe..2997331e 100644 --- a/apps/client/src/locales/messages.es.xlf +++ b/apps/client/src/locales/messages.es.xlf @@ -1023,7 +1023,7 @@ apps/client/src/app/components/user-account-settings/user-account-settings.component.ts - 160 + 159 @@ -1663,7 +1663,7 @@ ¿Estás seguro de eliminar este método de acceso? apps/client/src/app/components/user-account-settings/user-account-settings.component.ts - 249 + 248 @@ -2907,7 +2907,7 @@ Automático apps/client/src/app/components/user-account-settings/user-account-settings.component.ts - 40 + 39 @@ -6604,7 +6604,7 @@ ¿Estás seguro de querer borrar tu cuenta de Ghostfolio? apps/client/src/app/components/user-account-settings/user-account-settings.component.ts - 175 + 174 @@ -6652,7 +6652,7 @@ Oops! There was an error setting up biometric authentication. apps/client/src/app/components/user-account-settings/user-account-settings.component.ts - 303 + 302 diff --git a/apps/client/src/locales/messages.fr.xlf b/apps/client/src/locales/messages.fr.xlf index 2b61e3ed..3819bc98 100644 --- a/apps/client/src/locales/messages.fr.xlf +++ b/apps/client/src/locales/messages.fr.xlf @@ -1334,7 +1334,7 @@ apps/client/src/app/components/user-account-settings/user-account-settings.component.ts - 160 + 159 @@ -1878,7 +1878,7 @@ Auto apps/client/src/app/components/user-account-settings/user-account-settings.component.ts - 40 + 39 @@ -1918,7 +1918,7 @@ Voulez-vous vraiment supprimer cette méthode de connexion ? apps/client/src/app/components/user-account-settings/user-account-settings.component.ts - 249 + 248 @@ -6603,7 +6603,7 @@ Confirmer la suppresion de votre compte Ghostfolio ? apps/client/src/app/components/user-account-settings/user-account-settings.component.ts - 175 + 174 @@ -6651,7 +6651,7 @@ Oops! Une erreur s'est produite lors de la configuration de l'authentification biométrique. apps/client/src/app/components/user-account-settings/user-account-settings.component.ts - 303 + 302 diff --git a/apps/client/src/locales/messages.it.xlf b/apps/client/src/locales/messages.it.xlf index 3d12719e..257f8f68 100644 --- a/apps/client/src/locales/messages.it.xlf +++ b/apps/client/src/locales/messages.it.xlf @@ -1023,7 +1023,7 @@ apps/client/src/app/components/user-account-settings/user-account-settings.component.ts - 160 + 159 @@ -1663,7 +1663,7 @@ Vuoi davvero rimuovere questo metodo di accesso? apps/client/src/app/components/user-account-settings/user-account-settings.component.ts - 249 + 248 @@ -2907,7 +2907,7 @@ Auto apps/client/src/app/components/user-account-settings/user-account-settings.component.ts - 40 + 39 @@ -6604,7 +6604,7 @@ Confermi di voler chiudere il tuo account Ghostfolio? apps/client/src/app/components/user-account-settings/user-account-settings.component.ts - 175 + 174 @@ -6652,7 +6652,7 @@ Ops! C'è stato un errore impostando l'autenticazione biometrica. apps/client/src/app/components/user-account-settings/user-account-settings.component.ts - 303 + 302 diff --git a/apps/client/src/locales/messages.nl.xlf b/apps/client/src/locales/messages.nl.xlf index fa29621a..00341b16 100644 --- a/apps/client/src/locales/messages.nl.xlf +++ b/apps/client/src/locales/messages.nl.xlf @@ -1022,7 +1022,7 @@ apps/client/src/app/components/user-account-settings/user-account-settings.component.ts - 160 + 159 @@ -1662,7 +1662,7 @@ Wil je deze aanmeldingsmethode echt verwijderen? apps/client/src/app/components/user-account-settings/user-account-settings.component.ts - 249 + 248 @@ -2906,7 +2906,7 @@ Automatisch apps/client/src/app/components/user-account-settings/user-account-settings.component.ts - 40 + 39 @@ -6603,7 +6603,7 @@ Do you really want to close your Ghostfolio account? apps/client/src/app/components/user-account-settings/user-account-settings.component.ts - 175 + 174 @@ -6651,7 +6651,7 @@ Oops! There was an error setting up biometric authentication. apps/client/src/app/components/user-account-settings/user-account-settings.component.ts - 303 + 302 diff --git a/apps/client/src/locales/messages.pl.xlf b/apps/client/src/locales/messages.pl.xlf index e6e89741..aaed78ea 100644 --- a/apps/client/src/locales/messages.pl.xlf +++ b/apps/client/src/locales/messages.pl.xlf @@ -2287,7 +2287,7 @@ apps/client/src/app/components/user-account-settings/user-account-settings.component.ts - 160 + 159 @@ -3075,7 +3075,7 @@ Auto apps/client/src/app/components/user-account-settings/user-account-settings.component.ts - 40 + 39 @@ -3083,7 +3083,7 @@ Czy na pewno chcesz usunąć tą metode logowania? apps/client/src/app/components/user-account-settings/user-account-settings.component.ts - 249 + 248 @@ -6603,7 +6603,7 @@ Czy na pewno chcesz zamknąć swoje konto Ghostfolio? apps/client/src/app/components/user-account-settings/user-account-settings.component.ts - 175 + 174 @@ -6651,7 +6651,7 @@ Ups! Wystąpił błąd podczas konfigurowania uwierzytelniania biometrycznego. apps/client/src/app/components/user-account-settings/user-account-settings.component.ts - 303 + 302 diff --git a/apps/client/src/locales/messages.pt.xlf b/apps/client/src/locales/messages.pt.xlf index 5676461e..5fe949db 100644 --- a/apps/client/src/locales/messages.pt.xlf +++ b/apps/client/src/locales/messages.pt.xlf @@ -1206,7 +1206,7 @@ apps/client/src/app/components/user-account-settings/user-account-settings.component.ts - 160 + 159 @@ -1862,7 +1862,7 @@ Auto apps/client/src/app/components/user-account-settings/user-account-settings.component.ts - 40 + 39 @@ -1902,7 +1902,7 @@ Deseja realmente remover este método de início de sessão? apps/client/src/app/components/user-account-settings/user-account-settings.component.ts - 249 + 248 @@ -6603,7 +6603,7 @@ Do you really want to close your Ghostfolio account? apps/client/src/app/components/user-account-settings/user-account-settings.component.ts - 175 + 174 @@ -6651,7 +6651,7 @@ Oops! There was an error setting up biometric authentication. apps/client/src/app/components/user-account-settings/user-account-settings.component.ts - 303 + 302 diff --git a/apps/client/src/locales/messages.tr.xlf b/apps/client/src/locales/messages.tr.xlf index f9e2bfd9..2e385d88 100644 --- a/apps/client/src/locales/messages.tr.xlf +++ b/apps/client/src/locales/messages.tr.xlf @@ -2135,7 +2135,7 @@ apps/client/src/app/components/user-account-settings/user-account-settings.component.ts - 160 + 159 @@ -4895,7 +4895,7 @@ Otomatik apps/client/src/app/components/user-account-settings/user-account-settings.component.ts - 40 + 39 @@ -4935,7 +4935,7 @@ Bu giriş yöntemini kaldırmayı gerçekten istiyor musunuz? apps/client/src/app/components/user-account-settings/user-account-settings.component.ts - 249 + 248 @@ -6603,7 +6603,7 @@ Do you really want to close your Ghostfolio account? apps/client/src/app/components/user-account-settings/user-account-settings.component.ts - 175 + 174 @@ -6651,7 +6651,7 @@ Oops! There was an error setting up biometric authentication. apps/client/src/app/components/user-account-settings/user-account-settings.component.ts - 303 + 302 diff --git a/apps/client/src/locales/messages.uk.xlf b/apps/client/src/locales/messages.uk.xlf index 2c13d1ef..b2dc82d7 100644 --- a/apps/client/src/locales/messages.uk.xlf +++ b/apps/client/src/locales/messages.uk.xlf @@ -2595,7 +2595,7 @@ apps/client/src/app/components/user-account-settings/user-account-settings.component.ts - 160 + 159 @@ -3591,7 +3591,7 @@ Автоматичний apps/client/src/app/components/user-account-settings/user-account-settings.component.ts - 40 + 39 @@ -3599,7 +3599,7 @@ Ви дійсно хочете закрити ваш обліковий запис Ghostfolio? apps/client/src/app/components/user-account-settings/user-account-settings.component.ts - 175 + 174 @@ -3607,7 +3607,7 @@ Ви дійсно хочете вилучити цей спосіб входу? apps/client/src/app/components/user-account-settings/user-account-settings.component.ts - 249 + 248 @@ -3615,7 +3615,7 @@ Упс! Виникла помилка під час налаштування біометричної автентифікації. apps/client/src/app/components/user-account-settings/user-account-settings.component.ts - 303 + 302 diff --git a/apps/client/src/locales/messages.xlf b/apps/client/src/locales/messages.xlf index 778195c2..417df8c8 100644 --- a/apps/client/src/locales/messages.xlf +++ b/apps/client/src/locales/messages.xlf @@ -2152,7 +2152,7 @@ apps/client/src/app/components/user-account-settings/user-account-settings.component.ts - 160 + 159 @@ -2864,14 +2864,14 @@ Auto apps/client/src/app/components/user-account-settings/user-account-settings.component.ts - 40 + 39 Do you really want to remove this sign in method? apps/client/src/app/components/user-account-settings/user-account-settings.component.ts - 249 + 248 @@ -6009,7 +6009,7 @@ Do you really want to close your Ghostfolio account? apps/client/src/app/components/user-account-settings/user-account-settings.component.ts - 175 + 174 @@ -6044,7 +6044,7 @@ Oops! There was an error setting up biometric authentication. apps/client/src/app/components/user-account-settings/user-account-settings.component.ts - 303 + 302 diff --git a/apps/client/src/locales/messages.zh.xlf b/apps/client/src/locales/messages.zh.xlf index 5c1b6bc5..ca4b21fe 100644 --- a/apps/client/src/locales/messages.zh.xlf +++ b/apps/client/src/locales/messages.zh.xlf @@ -2296,7 +2296,7 @@ apps/client/src/app/components/user-account-settings/user-account-settings.component.ts - 160 + 159 @@ -3084,7 +3084,7 @@ 自动 apps/client/src/app/components/user-account-settings/user-account-settings.component.ts - 40 + 39 @@ -3092,7 +3092,7 @@ 您确实要删除此登录方法吗? apps/client/src/app/components/user-account-settings/user-account-settings.component.ts - 249 + 248 @@ -6604,7 +6604,7 @@ Do you really want to close your Ghostfolio account? apps/client/src/app/components/user-account-settings/user-account-settings.component.ts - 175 + 174 @@ -6652,7 +6652,7 @@ Oops! There was an error setting up biometric authentication. apps/client/src/app/components/user-account-settings/user-account-settings.component.ts - 303 + 302 From 536b000ff926f57d36a9d1d7b0f938af7854a060 Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Fri, 21 Mar 2025 20:41:37 +0100 Subject: [PATCH 4/5] Feature/improve Storybook story of fire calculator (#4451) * Add default value for fire wealth --- .../lib/fire-calculator/fire-calculator.component.stories.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/ui/src/lib/fire-calculator/fire-calculator.component.stories.ts b/libs/ui/src/lib/fire-calculator/fire-calculator.component.stories.ts index 0ad868ff..e4cfa18e 100644 --- a/libs/ui/src/lib/fire-calculator/fire-calculator.component.stories.ts +++ b/libs/ui/src/lib/fire-calculator/fire-calculator.component.stories.ts @@ -45,7 +45,7 @@ type Story = StoryObj; export const Simple: Story = { args: { currency: 'USD', - fireWealth: 0, + fireWealth: 50000, locale: locale } }; From 198f73db004fc45cf1aca77a6d59acb632da0030 Mon Sep 17 00:00:00 2001 From: csehatt741 <77381875+csehatt741@users.noreply.github.com> Date: Fri, 21 Mar 2025 20:58:47 +0100 Subject: [PATCH 5/5] Feature/improve export by applying filters on accounts and tags (#4425) * Improve export by applying filters on accounts and tags * Update changelog --------- Co-authored-by: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> --- CHANGELOG.md | 1 + apps/api/src/app/export/export.controller.ts | 3 +- apps/api/src/app/export/export.service.ts | 96 +++++++++++--------- 3 files changed, 58 insertions(+), 42 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4d24ce5d..80f83111 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed +- Improved the export functionality by applying filters on accounts and tags - Improved the symbol validation in the _Yahoo Finance_ service (get asset profiles) - Refactored `lodash.uniq` with `Array.from(new Set(...))` - Refreshed the cryptocurrencies list diff --git a/apps/api/src/app/export/export.controller.ts b/apps/api/src/app/export/export.controller.ts index 551b3e48..d807132c 100644 --- a/apps/api/src/app/export/export.controller.ts +++ b/apps/api/src/app/export/export.controller.ts @@ -21,10 +21,11 @@ export class ExportController { @UseGuards(AuthGuard('jwt'), HasPermissionGuard) public async export( @Query('accounts') filterByAccounts?: string, - @Query('activityIds') activityIds?: string[], + @Query('activityIds') filterByActivityIds?: string, @Query('assetClasses') filterByAssetClasses?: string, @Query('tags') filterByTags?: string ): Promise { + const activityIds = filterByActivityIds?.split(',') ?? []; const filters = this.apiService.buildFiltersFromQueryParams({ filterByAccounts, filterByAssetClasses, diff --git a/apps/api/src/app/export/export.service.ts b/apps/api/src/app/export/export.service.ts index 8b9d2c56..f0449dc1 100644 --- a/apps/api/src/app/export/export.service.ts +++ b/apps/api/src/app/export/export.service.ts @@ -28,6 +28,22 @@ export class ExportService { }): Promise { const platformsMap: { [platformId: string]: Platform } = {}; + let { activities } = await this.orderService.getOrders({ + filters, + userCurrency, + userId, + includeDrafts: true, + sortColumn: 'date', + sortDirection: 'asc', + withExcludedAccounts: true + }); + + if (activityIds?.length > 0) { + activities = activities.filter(({ id }) => { + return activityIds.includes(id); + }); + } + const accounts = ( await this.accountService.accounts({ include: { @@ -39,57 +55,55 @@ export class ExportService { }, where: { userId } }) - ).map( - ({ - balance, - balances, - comment, - currency, - id, - isExcluded, - name, - Platform: platform, - platformId - }) => { - if (platformId) { - platformsMap[platformId] = platform; - } - - return { + ) + .filter(({ id }) => { + return activities.length > 0 + ? activities.some(({ accountId }) => { + return accountId === id; + }) + : true; + }) + .map( + ({ balance, - balances: balances.map(({ date, value }) => { - return { date: date.toISOString(), value }; - }), + balances, comment, currency, id, isExcluded, name, + Platform: platform, platformId - }; - } - ); + }) => { + if (platformId) { + platformsMap[platformId] = platform; + } - let { activities } = await this.orderService.getOrders({ - filters, - userCurrency, - userId, - includeDrafts: true, - sortColumn: 'date', - sortDirection: 'asc', - withExcludedAccounts: true - }); - - if (activityIds) { - activities = activities.filter((activity) => { - return activityIds.includes(activity.id); - }); - } + return { + balance, + balances: balances.map(({ date, value }) => { + return { date: date.toISOString(), value }; + }), + comment, + currency, + id, + isExcluded, + name, + platformId + }; + } + ); const tags = (await this.tagService.getTagsForUser(userId)) - .filter(({ isUsed }) => { - return isUsed; - }) + .filter( + ({ id, isUsed }) => + isUsed && + activities.some((activity) => { + return activity.tags.some(({ id: tagId }) => { + return tagId === id; + }); + }) + ) .map(({ id, name }) => { return { id,