From c6083ec7c9279c21e759f011842794da5f309703 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 17 Apr 2025 07:49:50 +0200 Subject: [PATCH 1/7] Feature/update locales (#4543) Co-authored-by: github-actions[bot] --- apps/client/src/locales/messages.ca.xlf | 18 +++++++++--------- apps/client/src/locales/messages.de.xlf | 18 +++++++++--------- apps/client/src/locales/messages.es.xlf | 18 +++++++++--------- apps/client/src/locales/messages.fr.xlf | 18 +++++++++--------- apps/client/src/locales/messages.it.xlf | 18 +++++++++--------- apps/client/src/locales/messages.nl.xlf | 18 +++++++++--------- apps/client/src/locales/messages.pl.xlf | 18 +++++++++--------- apps/client/src/locales/messages.pt.xlf | 18 +++++++++--------- apps/client/src/locales/messages.tr.xlf | 18 +++++++++--------- apps/client/src/locales/messages.uk.xlf | 18 +++++++++--------- apps/client/src/locales/messages.xlf | 18 +++++++++--------- apps/client/src/locales/messages.zh.xlf | 18 +++++++++--------- 12 files changed, 108 insertions(+), 108 deletions(-) diff --git a/apps/client/src/locales/messages.ca.xlf b/apps/client/src/locales/messages.ca.xlf index 2cef9c24a..b028e9c10 100644 --- a/apps/client/src/locales/messages.ca.xlf +++ b/apps/client/src/locales/messages.ca.xlf @@ -3287,7 +3287,7 @@ Please enter your coupon code. apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 208 + 201 @@ -3295,7 +3295,7 @@ Could not redeem coupon code apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 172 + 165 @@ -3303,7 +3303,7 @@ Coupon code has been redeemed apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 185 + 178 @@ -3311,7 +3311,7 @@ Reload apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 186 + 179 @@ -3599,7 +3599,7 @@ Okay apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 147 + 140 apps/client/src/app/core/http-response.interceptor.ts @@ -7481,7 +7481,7 @@ Could not generate an API key apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 134 + 127 @@ -7489,7 +7489,7 @@ Set this API key in your self-hosted environment: apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 149 + 142 @@ -7497,7 +7497,7 @@ Ghostfolio Premium Data Provider API Key apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 152 + 145 @@ -7505,7 +7505,7 @@ Do you really want to generate a new API key? apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 157 + 150 diff --git a/apps/client/src/locales/messages.de.xlf b/apps/client/src/locales/messages.de.xlf index cfed50169..9b61c4fff 100644 --- a/apps/client/src/locales/messages.de.xlf +++ b/apps/client/src/locales/messages.de.xlf @@ -1450,7 +1450,7 @@ Okay apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 147 + 140 apps/client/src/app/core/http-response.interceptor.ts @@ -1634,7 +1634,7 @@ Bitte gebe deinen Gutscheincode ein. apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 208 + 201 @@ -1642,7 +1642,7 @@ Gutscheincode konnte nicht eingelöst werden apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 172 + 165 @@ -1650,7 +1650,7 @@ Gutscheincode wurde eingelöst apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 185 + 178 @@ -1658,7 +1658,7 @@ Neu laden apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 186 + 179 @@ -7505,7 +7505,7 @@ API-Schlüssel konnte nicht erstellt werden apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 134 + 127 @@ -7513,7 +7513,7 @@ Setze diesen API-Schlüssel in deiner selbst gehosteten Umgebung: apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 149 + 142 @@ -7521,7 +7521,7 @@ API-Schlüssel für den Ghostfolio Premium Datenanbieter apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 152 + 145 @@ -7529,7 +7529,7 @@ Möchtest du wirklich einen neuen API-Schlüssel erstellen? apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 157 + 150 diff --git a/apps/client/src/locales/messages.es.xlf b/apps/client/src/locales/messages.es.xlf index fce5a7b42..a67e053f5 100644 --- a/apps/client/src/locales/messages.es.xlf +++ b/apps/client/src/locales/messages.es.xlf @@ -1435,7 +1435,7 @@ De acuerdo apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 147 + 140 apps/client/src/app/core/http-response.interceptor.ts @@ -1619,7 +1619,7 @@ Por favor, ingresa tu código de cupón: apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 208 + 201 @@ -1627,7 +1627,7 @@ No se puede canjear este código de cupón apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 172 + 165 @@ -1635,7 +1635,7 @@ El codigo de cupón ha sido canjeado apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 185 + 178 @@ -1643,7 +1643,7 @@ Refrescar apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 186 + 179 @@ -7482,7 +7482,7 @@ Could not generate an API key apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 134 + 127 @@ -7490,7 +7490,7 @@ Set this API key in your self-hosted environment: apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 149 + 142 @@ -7498,7 +7498,7 @@ Ghostfolio Premium Data Provider API Key apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 152 + 145 @@ -7506,7 +7506,7 @@ Do you really want to generate a new API key? apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 157 + 150 diff --git a/apps/client/src/locales/messages.fr.xlf b/apps/client/src/locales/messages.fr.xlf index 319a39a9b..8dcadc4d5 100644 --- a/apps/client/src/locales/messages.fr.xlf +++ b/apps/client/src/locales/messages.fr.xlf @@ -1778,7 +1778,7 @@ D’accord apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 147 + 140 apps/client/src/app/core/http-response.interceptor.ts @@ -1874,7 +1874,7 @@ Veuillez entrer votre code promotionnel. apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 208 + 201 @@ -1882,7 +1882,7 @@ Le code promotionnel n’a pas pu être appliqué apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 172 + 165 @@ -1890,7 +1890,7 @@ Le code promotionnel a été appliqué apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 185 + 178 @@ -1898,7 +1898,7 @@ Rafraîchir apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 186 + 179 @@ -7481,7 +7481,7 @@ Impossible de générer une clé API apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 134 + 127 @@ -7489,7 +7489,7 @@ Définissez cette clé API dans votre environnement auto-hébergé : apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 149 + 142 @@ -7497,7 +7497,7 @@ Clé API du fournisseur de données Ghostfolio Premium apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 152 + 145 @@ -7505,7 +7505,7 @@ Voulez-vous vraiment générer une nouvelle clé API ? apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 157 + 150 diff --git a/apps/client/src/locales/messages.it.xlf b/apps/client/src/locales/messages.it.xlf index fe5095c2f..5e5454964 100644 --- a/apps/client/src/locales/messages.it.xlf +++ b/apps/client/src/locales/messages.it.xlf @@ -1435,7 +1435,7 @@ Bene apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 147 + 140 apps/client/src/app/core/http-response.interceptor.ts @@ -1619,7 +1619,7 @@ Inserisci il tuo codice del buono: apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 208 + 201 @@ -1627,7 +1627,7 @@ Impossibile riscattare il codice del buono apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 172 + 165 @@ -1635,7 +1635,7 @@ Il codice del buono è stato riscattato apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 185 + 178 @@ -1643,7 +1643,7 @@ Ricarica apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 186 + 179 @@ -7482,7 +7482,7 @@ Could not generate an API key apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 134 + 127 @@ -7490,7 +7490,7 @@ Set this API key in your self-hosted environment: apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 149 + 142 @@ -7498,7 +7498,7 @@ Ghostfolio Premium Data Provider API Key apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 152 + 145 @@ -7506,7 +7506,7 @@ Do you really want to generate a new API key? apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 157 + 150 diff --git a/apps/client/src/locales/messages.nl.xlf b/apps/client/src/locales/messages.nl.xlf index 725e823c3..08ec8b508 100644 --- a/apps/client/src/locales/messages.nl.xlf +++ b/apps/client/src/locales/messages.nl.xlf @@ -1434,7 +1434,7 @@ Oké apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 147 + 140 apps/client/src/app/core/http-response.interceptor.ts @@ -1618,7 +1618,7 @@ Voer je couponcode in: apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 208 + 201 @@ -1626,7 +1626,7 @@ Kon je kortingscode niet inwisselen apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 172 + 165 @@ -1634,7 +1634,7 @@ Je couponcode is ingewisseld apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 185 + 178 @@ -1642,7 +1642,7 @@ Herladen apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 186 + 179 @@ -7481,7 +7481,7 @@ Could not generate an API key apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 134 + 127 @@ -7489,7 +7489,7 @@ Set this API key in your self-hosted environment: apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 149 + 142 @@ -7497,7 +7497,7 @@ Ghostfolio Premium Data Provider API Key apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 152 + 145 @@ -7505,7 +7505,7 @@ Do you really want to generate a new API key? apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 157 + 150 diff --git a/apps/client/src/locales/messages.pl.xlf b/apps/client/src/locales/messages.pl.xlf index 2faa7b7df..1af9108c3 100644 --- a/apps/client/src/locales/messages.pl.xlf +++ b/apps/client/src/locales/messages.pl.xlf @@ -3015,7 +3015,7 @@ Wpisz kod kuponu: apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 208 + 201 @@ -3023,7 +3023,7 @@ Nie udało się zrealizować kodu kuponu apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 172 + 165 @@ -3031,7 +3031,7 @@ Kupon został zrealizowany apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 185 + 178 @@ -3039,7 +3039,7 @@ Odśwież apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 186 + 179 @@ -3291,7 +3291,7 @@ Okej apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 147 + 140 apps/client/src/app/core/http-response.interceptor.ts @@ -7481,7 +7481,7 @@ Nie udało się wygenerować klucza API apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 134 + 127 @@ -7489,7 +7489,7 @@ Ustaw ten klucz API w samodzielnie hostowanym środowisku: apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 149 + 142 @@ -7497,7 +7497,7 @@ Klucz API dostawcy danych Premium Ghostfolio apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 152 + 145 @@ -7505,7 +7505,7 @@ Czy na pewno chcesz wygenerować nowy klucz API? apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 157 + 150 diff --git a/apps/client/src/locales/messages.pt.xlf b/apps/client/src/locales/messages.pt.xlf index b8735546f..e33e05fde 100644 --- a/apps/client/src/locales/messages.pt.xlf +++ b/apps/client/src/locales/messages.pt.xlf @@ -1762,7 +1762,7 @@ OK apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 147 + 140 apps/client/src/app/core/http-response.interceptor.ts @@ -1858,7 +1858,7 @@ Por favor, insira o seu código de cupão: apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 208 + 201 @@ -1866,7 +1866,7 @@ Não foi possível resgatar o código de cupão apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 172 + 165 @@ -1874,7 +1874,7 @@ Código de cupão foi resgatado apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 185 + 178 @@ -1882,7 +1882,7 @@ Atualizar apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 186 + 179 @@ -7481,7 +7481,7 @@ Could not generate an API key apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 134 + 127 @@ -7489,7 +7489,7 @@ Set this API key in your self-hosted environment: apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 149 + 142 @@ -7497,7 +7497,7 @@ Ghostfolio Premium Data Provider API Key apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 152 + 145 @@ -7505,7 +7505,7 @@ Do you really want to generate a new API key? apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 157 + 150 diff --git a/apps/client/src/locales/messages.tr.xlf b/apps/client/src/locales/messages.tr.xlf index 11bf983ce..bb60cb18b 100644 --- a/apps/client/src/locales/messages.tr.xlf +++ b/apps/client/src/locales/messages.tr.xlf @@ -2867,7 +2867,7 @@ Tamam apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 147 + 140 apps/client/src/app/core/http-response.interceptor.ts @@ -4903,7 +4903,7 @@ Lütfen kupon kodunuzu girin: apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 208 + 201 @@ -4911,7 +4911,7 @@ Kupon kodu kullanılamadı apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 172 + 165 @@ -4919,7 +4919,7 @@ Kupon kodu kullanıldı apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 185 + 178 @@ -4927,7 +4927,7 @@ Yeniden Yükle apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 186 + 179 @@ -7481,7 +7481,7 @@ Could not generate an API key apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 134 + 127 @@ -7489,7 +7489,7 @@ Set this API key in your self-hosted environment: apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 149 + 142 @@ -7497,7 +7497,7 @@ Ghostfolio Premium Data Provider API Key apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 152 + 145 @@ -7505,7 +7505,7 @@ Do you really want to generate a new API key? apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 157 + 150 diff --git a/apps/client/src/locales/messages.uk.xlf b/apps/client/src/locales/messages.uk.xlf index 963041936..24392994e 100644 --- a/apps/client/src/locales/messages.uk.xlf +++ b/apps/client/src/locales/messages.uk.xlf @@ -3479,7 +3479,7 @@ Не вдалося згенерувати ключ API apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 134 + 127 @@ -3487,7 +3487,7 @@ ОК apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 147 + 140 apps/client/src/app/core/http-response.interceptor.ts @@ -3503,7 +3503,7 @@ Встановіть цей ключ API у вашому self-hosted середовищі: apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 149 + 142 @@ -3511,7 +3511,7 @@ Ключ API Ghostfolio Premium Data Provider apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 152 + 145 @@ -3519,7 +3519,7 @@ Ви дійсно хочете згенерувати новий ключ API? apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 157 + 150 @@ -3527,7 +3527,7 @@ Не вдалося обміняти код купона apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 172 + 165 @@ -3535,7 +3535,7 @@ Код купона був обміняний apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 185 + 178 @@ -3543,7 +3543,7 @@ Перезавантажити apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 186 + 179 @@ -3551,7 +3551,7 @@ Будь ласка, введіть ваш код купона. apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 208 + 201 diff --git a/apps/client/src/locales/messages.xlf b/apps/client/src/locales/messages.xlf index addeea158..3b0e161f3 100644 --- a/apps/client/src/locales/messages.xlf +++ b/apps/client/src/locales/messages.xlf @@ -2835,28 +2835,28 @@ Please enter your coupon code. apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 208 + 201 Could not redeem coupon code apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 172 + 165 Coupon code has been redeemed apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 185 + 178 Reload apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 186 + 179 @@ -3080,7 +3080,7 @@ Okay apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 147 + 140 apps/client/src/app/core/http-response.interceptor.ts @@ -6818,28 +6818,28 @@ Could not generate an API key apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 134 + 127 Do you really want to generate a new API key? apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 157 + 150 Ghostfolio Premium Data Provider API Key apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 152 + 145 Set this API key in your self-hosted environment: apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 149 + 142 diff --git a/apps/client/src/locales/messages.zh.xlf b/apps/client/src/locales/messages.zh.xlf index edfeeae30..ea776d409 100644 --- a/apps/client/src/locales/messages.zh.xlf +++ b/apps/client/src/locales/messages.zh.xlf @@ -3024,7 +3024,7 @@ 请输入您的优惠券代码: apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 208 + 201 @@ -3032,7 +3032,7 @@ 无法兑换优惠券代码 apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 172 + 165 @@ -3040,7 +3040,7 @@ 优惠券代码已兑换 apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 185 + 178 @@ -3048,7 +3048,7 @@ 重新加载 apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 186 + 179 @@ -3300,7 +3300,7 @@ 好的 apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 147 + 140 apps/client/src/app/core/http-response.interceptor.ts @@ -7482,7 +7482,7 @@ Could not generate an API key apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 134 + 127 @@ -7490,7 +7490,7 @@ Set this API key in your self-hosted environment: apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 149 + 142 @@ -7498,7 +7498,7 @@ Ghostfolio Premium Data Provider API Key apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 152 + 145 @@ -7506,7 +7506,7 @@ Do you really want to generate a new API key? apps/client/src/app/components/user-account-membership/user-account-membership.component.ts - 157 + 150 From d23dfadbd0f25fd54966bfcf5f388b6227b4851b Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Thu, 17 Apr 2025 17:47:36 +0200 Subject: [PATCH 2/7] Bugfix/fix active subscription in user table of admin control (#4544) * Fix active subscription * Update changelog --- apps/api/src/app/admin/admin.module.ts | 2 -- apps/api/src/app/admin/admin.service.ts | 27 +++++++++++-------- .../components/admin-users/admin-users.html | 2 +- 3 files changed, 17 insertions(+), 14 deletions(-) diff --git a/apps/api/src/app/admin/admin.module.ts b/apps/api/src/app/admin/admin.module.ts index d94cdd963..54145fa27 100644 --- a/apps/api/src/app/admin/admin.module.ts +++ b/apps/api/src/app/admin/admin.module.ts @@ -1,5 +1,4 @@ import { OrderModule } from '@ghostfolio/api/app/order/order.module'; -import { SubscriptionModule } from '@ghostfolio/api/app/subscription/subscription.module'; import { TransformDataSourceInRequestModule } from '@ghostfolio/api/interceptors/transform-data-source-in-request/transform-data-source-in-request.module'; import { ApiModule } from '@ghostfolio/api/services/api/api.module'; import { BenchmarkModule } from '@ghostfolio/api/services/benchmark/benchmark.module'; @@ -31,7 +30,6 @@ import { QueueModule } from './queue/queue.module'; PrismaModule, PropertyModule, QueueModule, - SubscriptionModule, SymbolProfileModule, TransformDataSourceInRequestModule ], diff --git a/apps/api/src/app/admin/admin.service.ts b/apps/api/src/app/admin/admin.service.ts index 11218e8e7..f77d50aac 100644 --- a/apps/api/src/app/admin/admin.service.ts +++ b/apps/api/src/app/admin/admin.service.ts @@ -1,5 +1,4 @@ import { OrderService } from '@ghostfolio/api/app/order/order.service'; -import { SubscriptionService } from '@ghostfolio/api/app/subscription/subscription.service'; import { environment } from '@ghostfolio/api/environments/environment'; import { BenchmarkService } from '@ghostfolio/api/services/benchmark/benchmark.service'; import { ConfigurationService } from '@ghostfolio/api/services/configuration/configuration.service'; @@ -62,7 +61,6 @@ export class AdminService { private readonly orderService: OrderService, private readonly prismaService: PrismaService, private readonly propertyService: PropertyService, - private readonly subscriptionService: SubscriptionService, private readonly symbolProfileService: SymbolProfileService ) {} @@ -807,7 +805,17 @@ export class AdminService { createdAt: true, id: true, role: true, - Subscription: true + Subscription: { + orderBy: { + expiresAt: 'desc' + }, + take: 1, + where: { + expiresAt: { + gt: new Date() + } + } + } } }); @@ -819,14 +827,11 @@ export class AdminService { ? Analytics.activityCount / daysSinceRegistration : undefined; - const subscription = this.configurationService.get( - 'ENABLE_FEATURE_SUBSCRIPTION' - ) - ? this.subscriptionService.getSubscription({ - createdAt, - subscriptions: Subscription - }) - : undefined; + const subscription = + this.configurationService.get('ENABLE_FEATURE_SUBSCRIPTION') && + Subscription?.length > 0 + ? Subscription[0] + : undefined; return { createdAt, diff --git a/apps/client/src/app/components/admin-users/admin-users.html b/apps/client/src/app/components/admin-users/admin-users.html index e8725e70c..56b2e0eac 100644 --- a/apps/client/src/app/components/admin-users/admin-users.html +++ b/apps/client/src/app/components/admin-users/admin-users.html @@ -49,7 +49,7 @@ }" >{{ (element.id | slice: 0 : 5) + '...' }} - @if (element?.subscription?.type === 'Premium') { + @if (element.subscription?.expiresAt) { Date: Thu, 17 Apr 2025 20:32:40 +0200 Subject: [PATCH 3/7] Feature/extend personal finance tools 20250417 (#4551) * Add Finvest * Add Money Peak * Add Peek * Add Tresor One --- libs/common/src/lib/personal-finance-tools.ts | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/libs/common/src/lib/personal-finance-tools.ts b/libs/common/src/lib/personal-finance-tools.ts index 3f15c80a2..bcbfd09ec 100644 --- a/libs/common/src/lib/personal-finance-tools.ts +++ b/libs/common/src/lib/personal-finance-tools.ts @@ -287,6 +287,14 @@ export const personalFinanceTools: Product[] = [ origin: 'British Virgin Islands', slogan: 'Easy-to-use Portfolio Tracker' }, + { + founded: 2021, + hasSelfHostingAbility: false, + key: 'finvest', + name: 'Finvest', + origin: 'United States', + slogan: 'Grow your wealth in a stress-free way' + }, { founded: 2023, hasFreePlan: true, @@ -331,8 +339,10 @@ export const personalFinanceTools: Product[] = [ { hasFreePlan: true, hasSelfHostingAbility: false, + isArchived: true, key: 'gospatz', name: 'goSPATZ', + note: 'Renamed to Money Peak', origin: 'Germany', slogan: 'Volle Kontrolle über deine Investitionen' }, @@ -495,6 +505,15 @@ export const personalFinanceTools: Product[] = [ pricingPerYear: '$100', slogan: 'Personal Finance Manager for Mac, Windows, and Linux' }, + { + hasFreePlan: true, + hasSelfHostingAbility: false, + key: 'moneypeak', + name: 'Money Peak', + note: 'Originally named as goSPATZ', + origin: 'Germany', + slogan: 'Dein smarter Finance Assistant' + }, { hasFreePlan: false, hasSelfHostingAbility: false, @@ -545,6 +564,13 @@ export const personalFinanceTools: Product[] = [ regions: ['Austria', 'Germany', 'Switzerland'], slogan: 'Dein Vermögen immer im Blick' }, + { + hasSelfHostingAbility: false, + key: 'peek', + name: 'Peek', + origin: 'Singapore', + slogan: 'Feel in control of your money without spreadsheets or shame' + }, { founded: 2023, hasFreePlan: true, @@ -780,6 +806,18 @@ export const personalFinanceTools: Product[] = [ pricingPerYear: '$360', slogan: 'The Trading Journal to Improve Your Trading Performance' }, + { + founded: 2020, + hasSelfHostingAbility: false, + hasFreePlan: true, + isArchived: true, + key: 'tresor-one', + name: 'Tresor One', + note: 'Renamed to Parqet', + origin: 'Germany', + regions: ['Austria', 'Germany', 'Switzerland'], + slogan: 'Dein Vermögen immer im Blick' + }, { hasFreePlan: true, hasSelfHostingAbility: false, From 07ad7f281774808ca974db24f338cc2e54b64c34 Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Thu, 17 Apr 2025 20:33:11 +0200 Subject: [PATCH 4/7] Bugfix/fix upgrade vs. renew subscription button labels (#4549) * Fix upgrade vs. renew subscription button labels --- apps/api/src/app/subscription/subscription.service.ts | 11 ++++++++--- .../src/app/components/header/header.component.html | 10 +++------- .../user-account-membership.html | 10 +++------- apps/client/src/app/pages/pricing/pricing-page.html | 10 +++------- .../lib/interfaces/subscription-offer.interface.ts | 1 + 5 files changed, 18 insertions(+), 24 deletions(-) diff --git a/apps/api/src/app/subscription/subscription.service.ts b/apps/api/src/app/subscription/subscription.service.ts index dc3e5cf59..f95334684 100644 --- a/apps/api/src/app/subscription/subscription.service.ts +++ b/apps/api/src/app/subscription/subscription.service.ts @@ -183,8 +183,8 @@ export class SubscriptionService { }); return { - expiresAt, offer, + expiresAt: isBefore(new Date(), expiresAt) ? expiresAt : undefined, type: isBefore(new Date(), expiresAt) ? SubscriptionType.Premium : SubscriptionType.Basic @@ -210,10 +210,15 @@ export class SubscriptionService { return undefined; } - const offers = + const offers: { + [offer in SubscriptionOfferKey]: SubscriptionOffer; + } = ((await this.propertyService.getByKey(PROPERTY_STRIPE_CONFIG)) as any) ?? {}; - return offers[key]; + return { + ...offers[key], + isRenewal: key.startsWith('renewal') + }; } } diff --git a/apps/client/src/app/components/header/header.component.html b/apps/client/src/app/components/header/header.component.html index 680cc98f0..6cf0ca305 100644 --- a/apps/client/src/app/components/header/header.component.html +++ b/apps/client/src/app/components/header/header.component.html @@ -181,14 +181,10 @@ - @if (user.subscription.offer === 'default') { - Upgrade Plan - } @else if ( - user.subscription.offer === 'renewal' || - user.subscription.offer === 'renewal-early-bird-2023' || - user.subscription.offer === 'renewal-early-bird-2024' - ) { + @if (user.subscription.offer.isRenewal) { Renew Plan + } @else { + Upgrade Plan } - @if (user.subscription.offer === 'default') { - Upgrade Plan - } @else if ( - user.subscription.offer === 'renewal' || - user.subscription.offer === 'renewal-early-bird-2023' || - user.subscription.offer === 'renewal-early-bird-2024' - ) { + @if (user.subscription.offer.isRenewal) { Renew Plan + } @else { + Upgrade Plan } @if (price) { diff --git a/apps/client/src/app/pages/pricing/pricing-page.html b/apps/client/src/app/pages/pricing/pricing-page.html index b165d5c23..d26a2e11e 100644 --- a/apps/client/src/app/pages/pricing/pricing-page.html +++ b/apps/client/src/app/pages/pricing/pricing-page.html @@ -306,14 +306,10 @@ mat-flat-button (click)="onCheckout()" > - @if (user.subscription.offer === 'default') { - Upgrade Plan - } @else if ( - user.subscription.offer === 'renewal' || - user.subscription.offer === 'renewal-early-bird-2023' || - user.subscription.offer === 'renewal-early-bird-2024' - ) { + @if (user.subscription.offer.isRenewal) { Renew Plan + } @else { + Upgrade Plan }

diff --git a/libs/common/src/lib/interfaces/subscription-offer.interface.ts b/libs/common/src/lib/interfaces/subscription-offer.interface.ts index 9ffe96a58..a9ebb54f4 100644 --- a/libs/common/src/lib/interfaces/subscription-offer.interface.ts +++ b/libs/common/src/lib/interfaces/subscription-offer.interface.ts @@ -4,6 +4,7 @@ export interface SubscriptionOffer { coupon?: number; couponId?: string; durationExtension?: StringValue; + isRenewal?: boolean; label?: string; price: number; priceId: string; From 073e60055d12f50bd007aea0f53132d6b97061d4 Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Thu, 17 Apr 2025 20:35:12 +0200 Subject: [PATCH 5/7] Release 2.152.1 (#4553) --- CHANGELOG.md | 2 +- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e53cefacb..0850d7831 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). -## 2.152.0 - 2025-04-16 +## 2.152.1 - 2025-04-17 ### Changed diff --git a/package-lock.json b/package-lock.json index 8af486482..827033432 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "ghostfolio", - "version": "2.152.0", + "version": "2.152.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "ghostfolio", - "version": "2.152.0", + "version": "2.152.1", "hasInstallScript": true, "license": "AGPL-3.0", "dependencies": { diff --git a/package.json b/package.json index 36a69a9bd..81c48066d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ghostfolio", - "version": "2.152.0", + "version": "2.152.1", "homepage": "https://ghostfol.io", "license": "AGPL-3.0", "repository": "https://github.com/ghostfolio/ghostfolio", From 53122b09ab194e1e062b37526a2339fbe2a8d115 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 17 Apr 2025 20:39:30 +0200 Subject: [PATCH 6/7] Feature/update locales (#4554) Co-authored-by: github-actions[bot] --- apps/client/src/locales/messages.ca.xlf | 58 ++++++++++++------------- apps/client/src/locales/messages.de.xlf | 58 ++++++++++++------------- apps/client/src/locales/messages.es.xlf | 58 ++++++++++++------------- apps/client/src/locales/messages.fr.xlf | 58 ++++++++++++------------- apps/client/src/locales/messages.it.xlf | 58 ++++++++++++------------- apps/client/src/locales/messages.nl.xlf | 58 ++++++++++++------------- apps/client/src/locales/messages.pl.xlf | 58 ++++++++++++------------- apps/client/src/locales/messages.pt.xlf | 58 ++++++++++++------------- apps/client/src/locales/messages.tr.xlf | 58 ++++++++++++------------- apps/client/src/locales/messages.uk.xlf | 58 ++++++++++++------------- apps/client/src/locales/messages.xlf | 58 ++++++++++++------------- apps/client/src/locales/messages.zh.xlf | 58 ++++++++++++------------- 12 files changed, 348 insertions(+), 348 deletions(-) diff --git a/apps/client/src/locales/messages.ca.xlf b/apps/client/src/locales/messages.ca.xlf index b028e9c10..5c833ef23 100644 --- a/apps/client/src/locales/messages.ca.xlf +++ b/apps/client/src/locales/messages.ca.xlf @@ -74,7 +74,7 @@ apps/client/src/app/components/header/header.component.html - 398 + 394 apps/client/src/app/components/home-market/home-market.html @@ -98,7 +98,7 @@ apps/client/src/app/components/header/header.component.html - 291 + 287 apps/client/src/app/pages/resources/overview/resources-overview.component.html @@ -118,7 +118,7 @@ apps/client/src/app/components/header/header.component.html - 364 + 360 @@ -238,7 +238,7 @@ apps/client/src/app/components/header/header.component.html - 351 + 347 apps/client/src/app/pages/features/features-page.html @@ -282,11 +282,11 @@ apps/client/src/app/components/header/header.component.html - 303 + 299 apps/client/src/app/components/header/header.component.html - 379 + 375 apps/client/src/app/pages/resources/personal-finance-tools/product-page.html @@ -2131,7 +2131,7 @@ apps/client/src/app/components/header/header.component.html - 263 + 259 apps/client/src/app/components/holding-detail-dialog/holding-detail-dialog.html @@ -2347,7 +2347,7 @@ apps/client/src/app/components/header/header.component.html - 245 + 241 @@ -2359,7 +2359,7 @@ apps/client/src/app/components/header/header.component.html - 255 + 251 @@ -2371,7 +2371,7 @@ apps/client/src/app/components/header/header.component.html - 279 + 275 @@ -2379,7 +2379,7 @@ Millora la teva Subscripció apps/client/src/app/components/header/header.component.html - 185 + 187 apps/client/src/app/components/subscription-interstitial-dialog/subscription-interstitial-dialog.html @@ -2387,11 +2387,11 @@ apps/client/src/app/components/user-account-membership/user-account-membership.html - 18 + 20 apps/client/src/app/pages/pricing/pricing-page.html - 310 + 312 @@ -2399,15 +2399,15 @@ Renova la teva Subscripció apps/client/src/app/components/header/header.component.html - 191 + 185 apps/client/src/app/components/user-account-membership/user-account-membership.html - 24 + 18 apps/client/src/app/pages/pricing/pricing-page.html - 316 + 310 @@ -2415,7 +2415,7 @@ Tu apps/client/src/app/components/header/header.component.html - 211 + 207 @@ -2427,7 +2427,7 @@ apps/client/src/app/components/header/header.component.html - 229 + 225 @@ -2435,7 +2435,7 @@ El meu Ghostfolio apps/client/src/app/components/header/header.component.html - 270 + 266 @@ -2443,7 +2443,7 @@ Sobre Ghostfolio apps/client/src/app/components/header/header.component.html - 316 + 312 apps/client/src/app/pages/about/overview/about-overview-page.html @@ -2455,7 +2455,7 @@ Iniciar Sessió apps/client/src/app/components/header/header.component.html - 412 + 408 apps/client/src/app/components/login-with-access-token-dialog/login-with-access-token-dialog.html @@ -2467,7 +2467,7 @@ Primers Passos apps/client/src/app/components/header/header.component.html - 422 + 418 @@ -3319,7 +3319,7 @@ per year apps/client/src/app/components/user-account-membership/user-account-membership.html - 36 + 32 apps/client/src/app/pages/pricing/pricing-page.html @@ -3331,7 +3331,7 @@ Try Premium apps/client/src/app/components/user-account-membership/user-account-membership.html - 53 + 49 @@ -3339,7 +3339,7 @@ Redeem Coupon apps/client/src/app/components/user-account-membership/user-account-membership.html - 67 + 63 @@ -4187,7 +4187,7 @@ apps/client/src/app/pages/pricing/pricing-page.html - 346 + 342 @@ -5415,7 +5415,7 @@ One-time payment, no auto-renewal. apps/client/src/app/pages/pricing/pricing-page.html - 320 + 316 @@ -5423,7 +5423,7 @@ It’s free. apps/client/src/app/pages/pricing/pricing-page.html - 349 + 345 @@ -7103,7 +7103,7 @@ No auto-renewal. apps/client/src/app/components/user-account-membership/user-account-membership.html - 74 + 70 diff --git a/apps/client/src/locales/messages.de.xlf b/apps/client/src/locales/messages.de.xlf index 9b61c4fff..945e369de 100644 --- a/apps/client/src/locales/messages.de.xlf +++ b/apps/client/src/locales/messages.de.xlf @@ -770,7 +770,7 @@ apps/client/src/app/components/header/header.component.html - 229 + 225 @@ -814,7 +814,7 @@ apps/client/src/app/components/header/header.component.html - 245 + 241 @@ -826,7 +826,7 @@ apps/client/src/app/components/header/header.component.html - 255 + 251 @@ -846,7 +846,7 @@ apps/client/src/app/components/header/header.component.html - 263 + 259 apps/client/src/app/components/holding-detail-dialog/holding-detail-dialog.html @@ -866,7 +866,7 @@ apps/client/src/app/components/header/header.component.html - 279 + 275 @@ -882,7 +882,7 @@ apps/client/src/app/components/header/header.component.html - 291 + 287 apps/client/src/app/pages/resources/overview/resources-overview.component.html @@ -902,11 +902,11 @@ apps/client/src/app/components/header/header.component.html - 303 + 299 apps/client/src/app/components/header/header.component.html - 379 + 375 apps/client/src/app/pages/resources/personal-finance-tools/product-page.html @@ -926,7 +926,7 @@ apps/client/src/app/components/header/header.component.html - 364 + 360 @@ -934,7 +934,7 @@ Ich apps/client/src/app/components/header/header.component.html - 211 + 207 @@ -942,7 +942,7 @@ Mein Ghostfolio apps/client/src/app/components/header/header.component.html - 270 + 266 @@ -950,7 +950,7 @@ Über Ghostfolio apps/client/src/app/components/header/header.component.html - 316 + 312 apps/client/src/app/pages/about/overview/about-overview-page.html @@ -966,7 +966,7 @@ apps/client/src/app/components/header/header.component.html - 351 + 347 apps/client/src/app/pages/features/features-page.html @@ -982,7 +982,7 @@ apps/client/src/app/components/header/header.component.html - 398 + 394 apps/client/src/app/components/home-market/home-market.html @@ -1134,7 +1134,7 @@ Einloggen apps/client/src/app/components/header/header.component.html - 412 + 408 apps/client/src/app/components/login-with-access-token-dialog/login-with-access-token-dialog.html @@ -1698,7 +1698,7 @@ pro Jahr apps/client/src/app/components/user-account-membership/user-account-membership.html - 36 + 32 apps/client/src/app/pages/pricing/pricing-page.html @@ -1710,7 +1710,7 @@ Premium ausprobieren apps/client/src/app/components/user-account-membership/user-account-membership.html - 53 + 49 @@ -1718,7 +1718,7 @@ Gutschein einlösen apps/client/src/app/components/user-account-membership/user-account-membership.html - 67 + 63 @@ -2598,7 +2598,7 @@ Registrieren apps/client/src/app/components/header/header.component.html - 422 + 418 @@ -3578,7 +3578,7 @@ Abonnement abschliessen apps/client/src/app/components/header/header.component.html - 185 + 187 apps/client/src/app/components/subscription-interstitial-dialog/subscription-interstitial-dialog.html @@ -3586,11 +3586,11 @@ apps/client/src/app/components/user-account-membership/user-account-membership.html - 18 + 20 apps/client/src/app/pages/pricing/pricing-page.html - 310 + 312 @@ -3702,7 +3702,7 @@ Einmalige Zahlung, keine automatische Erneuerung. apps/client/src/app/pages/pricing/pricing-page.html - 320 + 316 @@ -3718,7 +3718,7 @@ Es ist kostenlos. apps/client/src/app/pages/pricing/pricing-page.html - 349 + 345 @@ -3878,15 +3878,15 @@ Abonnement erneuern apps/client/src/app/components/header/header.component.html - 191 + 185 apps/client/src/app/components/user-account-membership/user-account-membership.html - 24 + 18 apps/client/src/app/pages/pricing/pricing-page.html - 316 + 310 @@ -4918,7 +4918,7 @@ apps/client/src/app/pages/pricing/pricing-page.html - 346 + 342 @@ -7127,7 +7127,7 @@ Keine automatische Erneuerung. apps/client/src/app/components/user-account-membership/user-account-membership.html - 74 + 70 diff --git a/apps/client/src/locales/messages.es.xlf b/apps/client/src/locales/messages.es.xlf index a67e053f5..107336ecc 100644 --- a/apps/client/src/locales/messages.es.xlf +++ b/apps/client/src/locales/messages.es.xlf @@ -755,7 +755,7 @@ apps/client/src/app/components/header/header.component.html - 229 + 225 @@ -799,7 +799,7 @@ apps/client/src/app/components/header/header.component.html - 245 + 241 @@ -811,7 +811,7 @@ apps/client/src/app/components/header/header.component.html - 255 + 251 @@ -831,7 +831,7 @@ apps/client/src/app/components/header/header.component.html - 263 + 259 apps/client/src/app/components/holding-detail-dialog/holding-detail-dialog.html @@ -851,7 +851,7 @@ apps/client/src/app/components/header/header.component.html - 279 + 275 @@ -867,7 +867,7 @@ apps/client/src/app/components/header/header.component.html - 291 + 287 apps/client/src/app/pages/resources/overview/resources-overview.component.html @@ -887,11 +887,11 @@ apps/client/src/app/components/header/header.component.html - 303 + 299 apps/client/src/app/components/header/header.component.html - 379 + 375 apps/client/src/app/pages/resources/personal-finance-tools/product-page.html @@ -911,7 +911,7 @@ apps/client/src/app/components/header/header.component.html - 364 + 360 @@ -919,7 +919,7 @@ apps/client/src/app/components/header/header.component.html - 211 + 207 @@ -927,7 +927,7 @@ Mi Ghostfolio apps/client/src/app/components/header/header.component.html - 270 + 266 @@ -935,7 +935,7 @@ Sobre Ghostfolio apps/client/src/app/components/header/header.component.html - 316 + 312 apps/client/src/app/pages/about/overview/about-overview-page.html @@ -951,7 +951,7 @@ apps/client/src/app/components/header/header.component.html - 351 + 347 apps/client/src/app/pages/features/features-page.html @@ -967,7 +967,7 @@ apps/client/src/app/components/header/header.component.html - 398 + 394 apps/client/src/app/components/home-market/home-market.html @@ -1119,7 +1119,7 @@ Iniciar sesión apps/client/src/app/components/header/header.component.html - 412 + 408 apps/client/src/app/components/login-with-access-token-dialog/login-with-access-token-dialog.html @@ -1683,7 +1683,7 @@ por año apps/client/src/app/components/user-account-membership/user-account-membership.html - 36 + 32 apps/client/src/app/pages/pricing/pricing-page.html @@ -1695,7 +1695,7 @@ Prueba Premium apps/client/src/app/components/user-account-membership/user-account-membership.html - 53 + 49 @@ -1703,7 +1703,7 @@ Canjea el cupón apps/client/src/app/components/user-account-membership/user-account-membership.html - 67 + 63 @@ -2583,7 +2583,7 @@ Comenzar apps/client/src/app/components/header/header.component.html - 422 + 418 @@ -3563,7 +3563,7 @@ Mejorar plan apps/client/src/app/components/header/header.component.html - 185 + 187 apps/client/src/app/components/subscription-interstitial-dialog/subscription-interstitial-dialog.html @@ -3571,11 +3571,11 @@ apps/client/src/app/components/user-account-membership/user-account-membership.html - 18 + 20 apps/client/src/app/pages/pricing/pricing-page.html - 310 + 312 @@ -3687,7 +3687,7 @@ Pago único, sin renovación automática. apps/client/src/app/pages/pricing/pricing-page.html - 320 + 316 @@ -3703,7 +3703,7 @@ Es gratis. apps/client/src/app/pages/pricing/pricing-page.html - 349 + 345 @@ -3855,15 +3855,15 @@ Renovar Plan apps/client/src/app/components/header/header.component.html - 191 + 185 apps/client/src/app/components/user-account-membership/user-account-membership.html - 24 + 18 apps/client/src/app/pages/pricing/pricing-page.html - 316 + 310 @@ -4895,7 +4895,7 @@ apps/client/src/app/pages/pricing/pricing-page.html - 346 + 342 @@ -7104,7 +7104,7 @@ No auto-renewal. apps/client/src/app/components/user-account-membership/user-account-membership.html - 74 + 70 diff --git a/apps/client/src/locales/messages.fr.xlf b/apps/client/src/locales/messages.fr.xlf index 8dcadc4d5..da9e9e620 100644 --- a/apps/client/src/locales/messages.fr.xlf +++ b/apps/client/src/locales/messages.fr.xlf @@ -1014,7 +1014,7 @@ apps/client/src/app/components/header/header.component.html - 229 + 225 @@ -1042,7 +1042,7 @@ apps/client/src/app/components/header/header.component.html - 263 + 259 apps/client/src/app/components/holding-detail-dialog/holding-detail-dialog.html @@ -1130,7 +1130,7 @@ apps/client/src/app/components/header/header.component.html - 245 + 241 @@ -1142,7 +1142,7 @@ apps/client/src/app/components/header/header.component.html - 255 + 251 @@ -1154,7 +1154,7 @@ apps/client/src/app/components/header/header.component.html - 279 + 275 @@ -1170,7 +1170,7 @@ apps/client/src/app/components/header/header.component.html - 291 + 287 apps/client/src/app/pages/resources/overview/resources-overview.component.html @@ -1190,11 +1190,11 @@ apps/client/src/app/components/header/header.component.html - 303 + 299 apps/client/src/app/components/header/header.component.html - 379 + 375 apps/client/src/app/pages/resources/personal-finance-tools/product-page.html @@ -1214,7 +1214,7 @@ apps/client/src/app/components/header/header.component.html - 364 + 360 @@ -1222,7 +1222,7 @@ Moi apps/client/src/app/components/header/header.component.html - 211 + 207 @@ -1230,7 +1230,7 @@ Mon Ghostfolio apps/client/src/app/components/header/header.component.html - 270 + 266 @@ -1238,7 +1238,7 @@ À propos de Ghostfolio apps/client/src/app/components/header/header.component.html - 316 + 312 apps/client/src/app/pages/about/overview/about-overview-page.html @@ -1254,7 +1254,7 @@ apps/client/src/app/components/header/header.component.html - 351 + 347 apps/client/src/app/pages/features/features-page.html @@ -1270,7 +1270,7 @@ apps/client/src/app/components/header/header.component.html - 398 + 394 apps/client/src/app/components/home-market/home-market.html @@ -1286,7 +1286,7 @@ Se connecter apps/client/src/app/components/header/header.component.html - 412 + 408 apps/client/src/app/components/login-with-access-token-dialog/login-with-access-token-dialog.html @@ -1298,7 +1298,7 @@ Démarrer apps/client/src/app/components/header/header.component.html - 422 + 418 @@ -1938,7 +1938,7 @@ par an apps/client/src/app/components/user-account-membership/user-account-membership.html - 36 + 32 apps/client/src/app/pages/pricing/pricing-page.html @@ -1950,7 +1950,7 @@ Essayer Premium apps/client/src/app/components/user-account-membership/user-account-membership.html - 53 + 49 @@ -1958,7 +1958,7 @@ Utiliser un Code Promotionnel apps/client/src/app/components/user-account-membership/user-account-membership.html - 67 + 63 @@ -3562,7 +3562,7 @@ Mettre à niveau l’Abonnement apps/client/src/app/components/header/header.component.html - 185 + 187 apps/client/src/app/components/subscription-interstitial-dialog/subscription-interstitial-dialog.html @@ -3570,11 +3570,11 @@ apps/client/src/app/components/user-account-membership/user-account-membership.html - 18 + 20 apps/client/src/app/pages/pricing/pricing-page.html - 310 + 312 @@ -3686,7 +3686,7 @@ Paiement unique, sans auto-renouvellement. apps/client/src/app/pages/pricing/pricing-page.html - 320 + 316 @@ -3702,7 +3702,7 @@ C’est gratuit. apps/client/src/app/pages/pricing/pricing-page.html - 349 + 345 @@ -3854,15 +3854,15 @@ Renouveler l’Abonnement apps/client/src/app/components/header/header.component.html - 191 + 185 apps/client/src/app/components/user-account-membership/user-account-membership.html - 24 + 18 apps/client/src/app/pages/pricing/pricing-page.html - 316 + 310 @@ -4894,7 +4894,7 @@ apps/client/src/app/pages/pricing/pricing-page.html - 346 + 342 @@ -7103,7 +7103,7 @@ Pas de renouvellement automatique. apps/client/src/app/components/user-account-membership/user-account-membership.html - 74 + 70 diff --git a/apps/client/src/locales/messages.it.xlf b/apps/client/src/locales/messages.it.xlf index 5e5454964..cf6eba907 100644 --- a/apps/client/src/locales/messages.it.xlf +++ b/apps/client/src/locales/messages.it.xlf @@ -755,7 +755,7 @@ apps/client/src/app/components/header/header.component.html - 229 + 225 @@ -799,7 +799,7 @@ apps/client/src/app/components/header/header.component.html - 245 + 241 @@ -811,7 +811,7 @@ apps/client/src/app/components/header/header.component.html - 255 + 251 @@ -831,7 +831,7 @@ apps/client/src/app/components/header/header.component.html - 263 + 259 apps/client/src/app/components/holding-detail-dialog/holding-detail-dialog.html @@ -851,7 +851,7 @@ apps/client/src/app/components/header/header.component.html - 279 + 275 @@ -867,7 +867,7 @@ apps/client/src/app/components/header/header.component.html - 291 + 287 apps/client/src/app/pages/resources/overview/resources-overview.component.html @@ -887,11 +887,11 @@ apps/client/src/app/components/header/header.component.html - 303 + 299 apps/client/src/app/components/header/header.component.html - 379 + 375 apps/client/src/app/pages/resources/personal-finance-tools/product-page.html @@ -911,7 +911,7 @@ apps/client/src/app/components/header/header.component.html - 364 + 360 @@ -919,7 +919,7 @@ Io apps/client/src/app/components/header/header.component.html - 211 + 207 @@ -927,7 +927,7 @@ Il mio Ghostfolio apps/client/src/app/components/header/header.component.html - 270 + 266 @@ -935,7 +935,7 @@ Informazioni su Ghostfolio apps/client/src/app/components/header/header.component.html - 316 + 312 apps/client/src/app/pages/about/overview/about-overview-page.html @@ -951,7 +951,7 @@ apps/client/src/app/components/header/header.component.html - 351 + 347 apps/client/src/app/pages/features/features-page.html @@ -967,7 +967,7 @@ apps/client/src/app/components/header/header.component.html - 398 + 394 apps/client/src/app/components/home-market/home-market.html @@ -1119,7 +1119,7 @@ Accedi apps/client/src/app/components/header/header.component.html - 412 + 408 apps/client/src/app/components/login-with-access-token-dialog/login-with-access-token-dialog.html @@ -1683,7 +1683,7 @@ per anno apps/client/src/app/components/user-account-membership/user-account-membership.html - 36 + 32 apps/client/src/app/pages/pricing/pricing-page.html @@ -1695,7 +1695,7 @@ Prova Premium apps/client/src/app/components/user-account-membership/user-account-membership.html - 53 + 49 @@ -1703,7 +1703,7 @@ Riscatta il buono apps/client/src/app/components/user-account-membership/user-account-membership.html - 67 + 63 @@ -2583,7 +2583,7 @@ Inizia apps/client/src/app/components/header/header.component.html - 422 + 418 @@ -3563,7 +3563,7 @@ Aggiorna il piano apps/client/src/app/components/header/header.component.html - 185 + 187 apps/client/src/app/components/subscription-interstitial-dialog/subscription-interstitial-dialog.html @@ -3571,11 +3571,11 @@ apps/client/src/app/components/user-account-membership/user-account-membership.html - 18 + 20 apps/client/src/app/pages/pricing/pricing-page.html - 310 + 312 @@ -3687,7 +3687,7 @@ Pagamento una tantum, senza rinnovo automatico. apps/client/src/app/pages/pricing/pricing-page.html - 320 + 316 @@ -3703,7 +3703,7 @@ È gratuito. apps/client/src/app/pages/pricing/pricing-page.html - 349 + 345 @@ -3855,15 +3855,15 @@ Rinnova il piano apps/client/src/app/components/header/header.component.html - 191 + 185 apps/client/src/app/components/user-account-membership/user-account-membership.html - 24 + 18 apps/client/src/app/pages/pricing/pricing-page.html - 316 + 310 @@ -4895,7 +4895,7 @@ apps/client/src/app/pages/pricing/pricing-page.html - 346 + 342 @@ -7104,7 +7104,7 @@ No rinnovo automatico. apps/client/src/app/components/user-account-membership/user-account-membership.html - 74 + 70 diff --git a/apps/client/src/locales/messages.nl.xlf b/apps/client/src/locales/messages.nl.xlf index 08ec8b508..29008f66c 100644 --- a/apps/client/src/locales/messages.nl.xlf +++ b/apps/client/src/locales/messages.nl.xlf @@ -754,7 +754,7 @@ apps/client/src/app/components/header/header.component.html - 229 + 225 @@ -798,7 +798,7 @@ apps/client/src/app/components/header/header.component.html - 245 + 241 @@ -810,7 +810,7 @@ apps/client/src/app/components/header/header.component.html - 255 + 251 @@ -830,7 +830,7 @@ apps/client/src/app/components/header/header.component.html - 263 + 259 apps/client/src/app/components/holding-detail-dialog/holding-detail-dialog.html @@ -850,7 +850,7 @@ apps/client/src/app/components/header/header.component.html - 279 + 275 @@ -866,7 +866,7 @@ apps/client/src/app/components/header/header.component.html - 291 + 287 apps/client/src/app/pages/resources/overview/resources-overview.component.html @@ -886,11 +886,11 @@ apps/client/src/app/components/header/header.component.html - 303 + 299 apps/client/src/app/components/header/header.component.html - 379 + 375 apps/client/src/app/pages/resources/personal-finance-tools/product-page.html @@ -910,7 +910,7 @@ apps/client/src/app/components/header/header.component.html - 364 + 360 @@ -918,7 +918,7 @@ Ik apps/client/src/app/components/header/header.component.html - 211 + 207 @@ -926,7 +926,7 @@ Mijn Ghostfolio apps/client/src/app/components/header/header.component.html - 270 + 266 @@ -934,7 +934,7 @@ Over Ghostfolio apps/client/src/app/components/header/header.component.html - 316 + 312 apps/client/src/app/pages/about/overview/about-overview-page.html @@ -950,7 +950,7 @@ apps/client/src/app/components/header/header.component.html - 351 + 347 apps/client/src/app/pages/features/features-page.html @@ -966,7 +966,7 @@ apps/client/src/app/components/header/header.component.html - 398 + 394 apps/client/src/app/components/home-market/home-market.html @@ -1118,7 +1118,7 @@ Aanmelden apps/client/src/app/components/header/header.component.html - 412 + 408 apps/client/src/app/components/login-with-access-token-dialog/login-with-access-token-dialog.html @@ -1682,7 +1682,7 @@ per jaar apps/client/src/app/components/user-account-membership/user-account-membership.html - 36 + 32 apps/client/src/app/pages/pricing/pricing-page.html @@ -1694,7 +1694,7 @@ Probeer Premium apps/client/src/app/components/user-account-membership/user-account-membership.html - 53 + 49 @@ -1702,7 +1702,7 @@ Coupon inwisselen apps/client/src/app/components/user-account-membership/user-account-membership.html - 67 + 63 @@ -2582,7 +2582,7 @@ Aan de slag apps/client/src/app/components/header/header.component.html - 422 + 418 @@ -3562,7 +3562,7 @@ Abonnement uitbreiden apps/client/src/app/components/header/header.component.html - 185 + 187 apps/client/src/app/components/subscription-interstitial-dialog/subscription-interstitial-dialog.html @@ -3570,11 +3570,11 @@ apps/client/src/app/components/user-account-membership/user-account-membership.html - 18 + 20 apps/client/src/app/pages/pricing/pricing-page.html - 310 + 312 @@ -3686,7 +3686,7 @@ Eenmalige betaling, geen automatische verlenging. apps/client/src/app/pages/pricing/pricing-page.html - 320 + 316 @@ -3702,7 +3702,7 @@ Het is gratis. apps/client/src/app/pages/pricing/pricing-page.html - 349 + 345 @@ -3854,15 +3854,15 @@ Abonnement Vernieuwen apps/client/src/app/components/header/header.component.html - 191 + 185 apps/client/src/app/components/user-account-membership/user-account-membership.html - 24 + 18 apps/client/src/app/pages/pricing/pricing-page.html - 316 + 310 @@ -4894,7 +4894,7 @@ apps/client/src/app/pages/pricing/pricing-page.html - 346 + 342 @@ -7103,7 +7103,7 @@ No auto-renewal. apps/client/src/app/components/user-account-membership/user-account-membership.html - 74 + 70 diff --git a/apps/client/src/locales/messages.pl.xlf b/apps/client/src/locales/messages.pl.xlf index 1af9108c3..a888e4074 100644 --- a/apps/client/src/locales/messages.pl.xlf +++ b/apps/client/src/locales/messages.pl.xlf @@ -507,7 +507,7 @@ apps/client/src/app/components/header/header.component.html - 398 + 394 apps/client/src/app/components/home-market/home-market.html @@ -531,7 +531,7 @@ apps/client/src/app/components/header/header.component.html - 291 + 287 apps/client/src/app/pages/resources/overview/resources-overview.component.html @@ -551,7 +551,7 @@ apps/client/src/app/components/header/header.component.html - 364 + 360 @@ -671,7 +671,7 @@ apps/client/src/app/components/header/header.component.html - 351 + 347 apps/client/src/app/pages/features/features-page.html @@ -715,11 +715,11 @@ apps/client/src/app/components/header/header.component.html - 303 + 299 apps/client/src/app/components/header/header.component.html - 379 + 375 apps/client/src/app/pages/resources/personal-finance-tools/product-page.html @@ -1963,7 +1963,7 @@ apps/client/src/app/components/header/header.component.html - 263 + 259 apps/client/src/app/components/holding-detail-dialog/holding-detail-dialog.html @@ -2179,7 +2179,7 @@ apps/client/src/app/components/header/header.component.html - 245 + 241 @@ -2191,7 +2191,7 @@ apps/client/src/app/components/header/header.component.html - 255 + 251 @@ -2203,7 +2203,7 @@ apps/client/src/app/components/header/header.component.html - 279 + 275 @@ -2211,7 +2211,7 @@ Ja apps/client/src/app/components/header/header.component.html - 211 + 207 @@ -2223,7 +2223,7 @@ apps/client/src/app/components/header/header.component.html - 229 + 225 @@ -2231,7 +2231,7 @@ Moje Ghostfolio apps/client/src/app/components/header/header.component.html - 270 + 266 @@ -2239,7 +2239,7 @@ O Ghostfolio apps/client/src/app/components/header/header.component.html - 316 + 312 apps/client/src/app/pages/about/overview/about-overview-page.html @@ -2251,7 +2251,7 @@ Zaloguj się apps/client/src/app/components/header/header.component.html - 412 + 408 apps/client/src/app/components/login-with-access-token-dialog/login-with-access-token-dialog.html @@ -2263,7 +2263,7 @@ Rozpocznij apps/client/src/app/components/header/header.component.html - 422 + 418 @@ -2911,7 +2911,7 @@ Ulepsz Plan apps/client/src/app/components/header/header.component.html - 185 + 187 apps/client/src/app/components/subscription-interstitial-dialog/subscription-interstitial-dialog.html @@ -2919,11 +2919,11 @@ apps/client/src/app/components/user-account-membership/user-account-membership.html - 18 + 20 apps/client/src/app/pages/pricing/pricing-page.html - 310 + 312 @@ -3047,7 +3047,7 @@ rocznie apps/client/src/app/components/user-account-membership/user-account-membership.html - 36 + 32 apps/client/src/app/pages/pricing/pricing-page.html @@ -3059,7 +3059,7 @@ Wypróbuj Premium apps/client/src/app/components/user-account-membership/user-account-membership.html - 53 + 49 @@ -3067,7 +3067,7 @@ Wykorzystaj kupon apps/client/src/app/components/user-account-membership/user-account-membership.html - 67 + 63 @@ -3807,7 +3807,7 @@ apps/client/src/app/pages/pricing/pricing-page.html - 346 + 342 @@ -4967,15 +4967,15 @@ Odnów Plan apps/client/src/app/components/header/header.component.html - 191 + 185 apps/client/src/app/components/user-account-membership/user-account-membership.html - 24 + 18 apps/client/src/app/pages/pricing/pricing-page.html - 316 + 310 @@ -4983,7 +4983,7 @@ Płatność jednorazowa, bez automatycznego odnawiania. apps/client/src/app/pages/pricing/pricing-page.html - 320 + 316 @@ -4999,7 +4999,7 @@ Jest bezpłatny. apps/client/src/app/pages/pricing/pricing-page.html - 349 + 345 @@ -7103,7 +7103,7 @@ Bez automatycznego odnawiania. apps/client/src/app/components/user-account-membership/user-account-membership.html - 74 + 70 diff --git a/apps/client/src/locales/messages.pt.xlf b/apps/client/src/locales/messages.pt.xlf index e33e05fde..bebd4a752 100644 --- a/apps/client/src/locales/messages.pt.xlf +++ b/apps/client/src/locales/messages.pt.xlf @@ -886,7 +886,7 @@ apps/client/src/app/components/header/header.component.html - 229 + 225 @@ -914,7 +914,7 @@ apps/client/src/app/components/header/header.component.html - 263 + 259 apps/client/src/app/components/holding-detail-dialog/holding-detail-dialog.html @@ -1002,7 +1002,7 @@ apps/client/src/app/components/header/header.component.html - 245 + 241 @@ -1014,7 +1014,7 @@ apps/client/src/app/components/header/header.component.html - 255 + 251 @@ -1026,7 +1026,7 @@ apps/client/src/app/components/header/header.component.html - 279 + 275 @@ -1042,7 +1042,7 @@ apps/client/src/app/components/header/header.component.html - 291 + 287 apps/client/src/app/pages/resources/overview/resources-overview.component.html @@ -1062,11 +1062,11 @@ apps/client/src/app/components/header/header.component.html - 303 + 299 apps/client/src/app/components/header/header.component.html - 379 + 375 apps/client/src/app/pages/resources/personal-finance-tools/product-page.html @@ -1086,7 +1086,7 @@ apps/client/src/app/components/header/header.component.html - 364 + 360 @@ -1094,7 +1094,7 @@ Eu apps/client/src/app/components/header/header.component.html - 211 + 207 @@ -1102,7 +1102,7 @@ O meu Ghostfolio apps/client/src/app/components/header/header.component.html - 270 + 266 @@ -1110,7 +1110,7 @@ Sobre o Ghostfolio apps/client/src/app/components/header/header.component.html - 316 + 312 apps/client/src/app/pages/about/overview/about-overview-page.html @@ -1126,7 +1126,7 @@ apps/client/src/app/components/header/header.component.html - 351 + 347 apps/client/src/app/pages/features/features-page.html @@ -1142,7 +1142,7 @@ apps/client/src/app/components/header/header.component.html - 398 + 394 apps/client/src/app/components/home-market/home-market.html @@ -1158,7 +1158,7 @@ Iniciar sessão apps/client/src/app/components/header/header.component.html - 412 + 408 apps/client/src/app/components/login-with-access-token-dialog/login-with-access-token-dialog.html @@ -1170,7 +1170,7 @@ Começar apps/client/src/app/components/header/header.component.html - 422 + 418 @@ -1922,7 +1922,7 @@ por ano apps/client/src/app/components/user-account-membership/user-account-membership.html - 36 + 32 apps/client/src/app/pages/pricing/pricing-page.html @@ -1934,7 +1934,7 @@ Experimentar Premium apps/client/src/app/components/user-account-membership/user-account-membership.html - 53 + 49 @@ -1942,7 +1942,7 @@ Resgatar Cupão apps/client/src/app/components/user-account-membership/user-account-membership.html - 67 + 63 @@ -3562,7 +3562,7 @@ Atualizar Plano apps/client/src/app/components/header/header.component.html - 185 + 187 apps/client/src/app/components/subscription-interstitial-dialog/subscription-interstitial-dialog.html @@ -3570,11 +3570,11 @@ apps/client/src/app/components/user-account-membership/user-account-membership.html - 18 + 20 apps/client/src/app/pages/pricing/pricing-page.html - 310 + 312 @@ -3686,7 +3686,7 @@ Pagamento único, sem renovação automática. apps/client/src/app/pages/pricing/pricing-page.html - 320 + 316 @@ -3702,7 +3702,7 @@ É gratuito. apps/client/src/app/pages/pricing/pricing-page.html - 349 + 345 @@ -3854,15 +3854,15 @@ Renovar Plano apps/client/src/app/components/header/header.component.html - 191 + 185 apps/client/src/app/components/user-account-membership/user-account-membership.html - 24 + 18 apps/client/src/app/pages/pricing/pricing-page.html - 316 + 310 @@ -4894,7 +4894,7 @@ apps/client/src/app/pages/pricing/pricing-page.html - 346 + 342 @@ -7103,7 +7103,7 @@ No auto-renewal. apps/client/src/app/components/user-account-membership/user-account-membership.html - 74 + 70 diff --git a/apps/client/src/locales/messages.tr.xlf b/apps/client/src/locales/messages.tr.xlf index bb60cb18b..424924dd6 100644 --- a/apps/client/src/locales/messages.tr.xlf +++ b/apps/client/src/locales/messages.tr.xlf @@ -479,7 +479,7 @@ apps/client/src/app/components/header/header.component.html - 398 + 394 apps/client/src/app/components/home-market/home-market.html @@ -503,7 +503,7 @@ apps/client/src/app/components/header/header.component.html - 291 + 287 apps/client/src/app/pages/resources/overview/resources-overview.component.html @@ -523,7 +523,7 @@ apps/client/src/app/components/header/header.component.html - 364 + 360 @@ -643,7 +643,7 @@ apps/client/src/app/components/header/header.component.html - 351 + 347 apps/client/src/app/pages/features/features-page.html @@ -687,11 +687,11 @@ apps/client/src/app/components/header/header.component.html - 303 + 299 apps/client/src/app/components/header/header.component.html - 379 + 375 apps/client/src/app/pages/resources/personal-finance-tools/product-page.html @@ -1867,7 +1867,7 @@ apps/client/src/app/components/header/header.component.html - 263 + 259 apps/client/src/app/components/holding-detail-dialog/holding-detail-dialog.html @@ -1927,7 +1927,7 @@ apps/client/src/app/components/header/header.component.html - 229 + 225 @@ -2039,7 +2039,7 @@ apps/client/src/app/components/header/header.component.html - 245 + 241 @@ -2051,7 +2051,7 @@ apps/client/src/app/components/header/header.component.html - 255 + 251 @@ -2063,7 +2063,7 @@ apps/client/src/app/components/header/header.component.html - 279 + 275 @@ -2071,7 +2071,7 @@ Ben apps/client/src/app/components/header/header.component.html - 211 + 207 @@ -2079,7 +2079,7 @@ Ghostfolio’m apps/client/src/app/components/header/header.component.html - 270 + 266 @@ -2087,7 +2087,7 @@ Ghostfolio Hakkında apps/client/src/app/components/header/header.component.html - 316 + 312 apps/client/src/app/pages/about/overview/about-overview-page.html @@ -2099,7 +2099,7 @@ Giriş apps/client/src/app/components/header/header.component.html - 412 + 408 apps/client/src/app/components/login-with-access-token-dialog/login-with-access-token-dialog.html @@ -2111,7 +2111,7 @@ Haydi Başlayalım apps/client/src/app/components/header/header.component.html - 422 + 418 @@ -2751,7 +2751,7 @@ Üyeliğinizi Yükseltin apps/client/src/app/components/header/header.component.html - 185 + 187 apps/client/src/app/components/subscription-interstitial-dialog/subscription-interstitial-dialog.html @@ -2759,11 +2759,11 @@ apps/client/src/app/components/user-account-membership/user-account-membership.html - 18 + 20 apps/client/src/app/pages/pricing/pricing-page.html - 310 + 312 @@ -3339,7 +3339,7 @@ apps/client/src/app/pages/pricing/pricing-page.html - 346 + 342 @@ -4431,15 +4431,15 @@ Aboneliği Yenile apps/client/src/app/components/header/header.component.html - 191 + 185 apps/client/src/app/components/user-account-membership/user-account-membership.html - 24 + 18 apps/client/src/app/pages/pricing/pricing-page.html - 316 + 310 @@ -4447,7 +4447,7 @@ Tek seferlik ödeme, otomatik yenileme yok. apps/client/src/app/pages/pricing/pricing-page.html - 320 + 316 @@ -4463,7 +4463,7 @@ Ücretsiz. apps/client/src/app/pages/pricing/pricing-page.html - 349 + 345 @@ -4963,7 +4963,7 @@ yıllık apps/client/src/app/components/user-account-membership/user-account-membership.html - 36 + 32 apps/client/src/app/pages/pricing/pricing-page.html @@ -4975,7 +4975,7 @@ Premium’u Deneyin apps/client/src/app/components/user-account-membership/user-account-membership.html - 53 + 49 @@ -4983,7 +4983,7 @@ Kupon Kullan apps/client/src/app/components/user-account-membership/user-account-membership.html - 67 + 63 @@ -7103,7 +7103,7 @@ No auto-renewal. apps/client/src/app/components/user-account-membership/user-account-membership.html - 74 + 70 diff --git a/apps/client/src/locales/messages.uk.xlf b/apps/client/src/locales/messages.uk.xlf index 24392994e..2141c7727 100644 --- a/apps/client/src/locales/messages.uk.xlf +++ b/apps/client/src/locales/messages.uk.xlf @@ -74,7 +74,7 @@ apps/client/src/app/components/header/header.component.html - 398 + 394 apps/client/src/app/components/home-market/home-market.html @@ -98,7 +98,7 @@ apps/client/src/app/components/header/header.component.html - 291 + 287 apps/client/src/app/pages/resources/overview/resources-overview.component.html @@ -118,7 +118,7 @@ apps/client/src/app/components/header/header.component.html - 364 + 360 @@ -238,7 +238,7 @@ apps/client/src/app/components/header/header.component.html - 351 + 347 apps/client/src/app/pages/features/features-page.html @@ -282,11 +282,11 @@ apps/client/src/app/components/header/header.component.html - 303 + 299 apps/client/src/app/components/header/header.component.html - 379 + 375 apps/client/src/app/pages/resources/personal-finance-tools/product-page.html @@ -2119,7 +2119,7 @@ apps/client/src/app/components/header/header.component.html - 263 + 259 apps/client/src/app/components/holding-detail-dialog/holding-detail-dialog.html @@ -2319,7 +2319,7 @@ apps/client/src/app/components/header/header.component.html - 229 + 225 @@ -2479,7 +2479,7 @@ apps/client/src/app/components/header/header.component.html - 245 + 241 @@ -2491,7 +2491,7 @@ apps/client/src/app/components/header/header.component.html - 255 + 251 @@ -2503,7 +2503,7 @@ apps/client/src/app/components/header/header.component.html - 279 + 275 @@ -2511,7 +2511,7 @@ Оновити план apps/client/src/app/components/header/header.component.html - 185 + 187 apps/client/src/app/components/subscription-interstitial-dialog/subscription-interstitial-dialog.html @@ -2519,11 +2519,11 @@ apps/client/src/app/components/user-account-membership/user-account-membership.html - 18 + 20 apps/client/src/app/pages/pricing/pricing-page.html - 310 + 312 @@ -2531,15 +2531,15 @@ Поновити план apps/client/src/app/components/header/header.component.html - 191 + 185 apps/client/src/app/components/user-account-membership/user-account-membership.html - 24 + 18 apps/client/src/app/pages/pricing/pricing-page.html - 316 + 310 @@ -2547,7 +2547,7 @@ Я apps/client/src/app/components/header/header.component.html - 211 + 207 @@ -2555,7 +2555,7 @@ Мій Ghostfolio apps/client/src/app/components/header/header.component.html - 270 + 266 @@ -2563,7 +2563,7 @@ Про Ghostfolio apps/client/src/app/components/header/header.component.html - 316 + 312 apps/client/src/app/pages/about/overview/about-overview-page.html @@ -2575,7 +2575,7 @@ Увійти apps/client/src/app/components/header/header.component.html - 412 + 408 apps/client/src/app/components/login-with-access-token-dialog/login-with-access-token-dialog.html @@ -2587,7 +2587,7 @@ Почати apps/client/src/app/components/header/header.component.html - 422 + 418 @@ -3559,7 +3559,7 @@ на рік apps/client/src/app/components/user-account-membership/user-account-membership.html - 36 + 32 apps/client/src/app/pages/pricing/pricing-page.html @@ -3571,7 +3571,7 @@ Спробуйте Premium apps/client/src/app/components/user-account-membership/user-account-membership.html - 53 + 49 @@ -3579,7 +3579,7 @@ Обміняти купон apps/client/src/app/components/user-account-membership/user-account-membership.html - 67 + 63 @@ -3587,7 +3587,7 @@ Без автоматичного поновлення. apps/client/src/app/components/user-account-membership/user-account-membership.html - 74 + 70 @@ -4427,7 +4427,7 @@ apps/client/src/app/pages/pricing/pricing-page.html - 346 + 342 @@ -5739,7 +5739,7 @@ Разова оплата, без автоматичного поновлення. apps/client/src/app/pages/pricing/pricing-page.html - 320 + 316 @@ -5747,7 +5747,7 @@ Це безкоштовно. apps/client/src/app/pages/pricing/pricing-page.html - 349 + 345 diff --git a/apps/client/src/locales/messages.xlf b/apps/client/src/locales/messages.xlf index 3b0e161f3..11f35ec57 100644 --- a/apps/client/src/locales/messages.xlf +++ b/apps/client/src/locales/messages.xlf @@ -495,7 +495,7 @@ apps/client/src/app/components/header/header.component.html - 398 + 394 apps/client/src/app/components/home-market/home-market.html @@ -518,7 +518,7 @@ apps/client/src/app/components/header/header.component.html - 291 + 287 apps/client/src/app/pages/resources/overview/resources-overview.component.html @@ -537,7 +537,7 @@ apps/client/src/app/components/header/header.component.html - 364 + 360 @@ -654,7 +654,7 @@ apps/client/src/app/components/header/header.component.html - 351 + 347 apps/client/src/app/pages/features/features-page.html @@ -695,11 +695,11 @@ apps/client/src/app/components/header/header.component.html - 303 + 299 apps/client/src/app/components/header/header.component.html - 379 + 375 apps/client/src/app/pages/resources/personal-finance-tools/product-page.html @@ -1885,7 +1885,7 @@ apps/client/src/app/components/header/header.component.html - 263 + 259 apps/client/src/app/components/holding-detail-dialog/holding-detail-dialog.html @@ -2078,7 +2078,7 @@ apps/client/src/app/components/header/header.component.html - 245 + 241 @@ -2089,7 +2089,7 @@ apps/client/src/app/components/header/header.component.html - 255 + 251 @@ -2100,14 +2100,14 @@ apps/client/src/app/components/header/header.component.html - 279 + 275 Me apps/client/src/app/components/header/header.component.html - 211 + 207 @@ -2118,21 +2118,21 @@ apps/client/src/app/components/header/header.component.html - 229 + 225 My Ghostfolio apps/client/src/app/components/header/header.component.html - 270 + 266 About Ghostfolio apps/client/src/app/components/header/header.component.html - 316 + 312 apps/client/src/app/pages/about/overview/about-overview-page.html @@ -2143,7 +2143,7 @@ Sign in apps/client/src/app/components/header/header.component.html - 412 + 408 apps/client/src/app/components/login-with-access-token-dialog/login-with-access-token-dialog.html @@ -2154,7 +2154,7 @@ Get started apps/client/src/app/components/header/header.component.html - 422 + 418 @@ -2740,7 +2740,7 @@ Upgrade Plan apps/client/src/app/components/header/header.component.html - 185 + 187 apps/client/src/app/components/subscription-interstitial-dialog/subscription-interstitial-dialog.html @@ -2748,11 +2748,11 @@ apps/client/src/app/components/user-account-membership/user-account-membership.html - 18 + 20 apps/client/src/app/pages/pricing/pricing-page.html - 310 + 312 @@ -2863,7 +2863,7 @@ per year apps/client/src/app/components/user-account-membership/user-account-membership.html - 36 + 32 apps/client/src/app/pages/pricing/pricing-page.html @@ -2874,14 +2874,14 @@ Try Premium apps/client/src/app/components/user-account-membership/user-account-membership.html - 53 + 49 Redeem Coupon apps/client/src/app/components/user-account-membership/user-account-membership.html - 67 + 63 @@ -3546,7 +3546,7 @@ apps/client/src/app/pages/pricing/pricing-page.html - 346 + 342 @@ -4580,22 +4580,22 @@ Renew Plan apps/client/src/app/components/header/header.component.html - 191 + 185 apps/client/src/app/components/user-account-membership/user-account-membership.html - 24 + 18 apps/client/src/app/pages/pricing/pricing-page.html - 316 + 310 One-time payment, no auto-renewal. apps/client/src/app/pages/pricing/pricing-page.html - 320 + 316 @@ -4609,7 +4609,7 @@ It’s free. apps/client/src/app/pages/pricing/pricing-page.html - 349 + 345 @@ -6464,7 +6464,7 @@ No auto-renewal. apps/client/src/app/components/user-account-membership/user-account-membership.html - 74 + 70 diff --git a/apps/client/src/locales/messages.zh.xlf b/apps/client/src/locales/messages.zh.xlf index ea776d409..38a4e5e64 100644 --- a/apps/client/src/locales/messages.zh.xlf +++ b/apps/client/src/locales/messages.zh.xlf @@ -508,7 +508,7 @@ apps/client/src/app/components/header/header.component.html - 398 + 394 apps/client/src/app/components/home-market/home-market.html @@ -532,7 +532,7 @@ apps/client/src/app/components/header/header.component.html - 291 + 287 apps/client/src/app/pages/resources/overview/resources-overview.component.html @@ -552,7 +552,7 @@ apps/client/src/app/components/header/header.component.html - 364 + 360 @@ -672,7 +672,7 @@ apps/client/src/app/components/header/header.component.html - 351 + 347 apps/client/src/app/pages/features/features-page.html @@ -716,11 +716,11 @@ apps/client/src/app/components/header/header.component.html - 303 + 299 apps/client/src/app/components/header/header.component.html - 379 + 375 apps/client/src/app/pages/resources/personal-finance-tools/product-page.html @@ -1972,7 +1972,7 @@ apps/client/src/app/components/header/header.component.html - 263 + 259 apps/client/src/app/components/holding-detail-dialog/holding-detail-dialog.html @@ -2188,7 +2188,7 @@ apps/client/src/app/components/header/header.component.html - 245 + 241 @@ -2200,7 +2200,7 @@ apps/client/src/app/components/header/header.component.html - 255 + 251 @@ -2212,7 +2212,7 @@ apps/client/src/app/components/header/header.component.html - 279 + 275 @@ -2220,7 +2220,7 @@ apps/client/src/app/components/header/header.component.html - 211 + 207 @@ -2232,7 +2232,7 @@ apps/client/src/app/components/header/header.component.html - 229 + 225 @@ -2240,7 +2240,7 @@ 我的 Ghostfolio apps/client/src/app/components/header/header.component.html - 270 + 266 @@ -2248,7 +2248,7 @@ 关于 Ghostfolio apps/client/src/app/components/header/header.component.html - 316 + 312 apps/client/src/app/pages/about/overview/about-overview-page.html @@ -2260,7 +2260,7 @@ 登入 apps/client/src/app/components/header/header.component.html - 412 + 408 apps/client/src/app/components/login-with-access-token-dialog/login-with-access-token-dialog.html @@ -2272,7 +2272,7 @@ 开始使用 apps/client/src/app/components/header/header.component.html - 422 + 418 @@ -2920,7 +2920,7 @@ 升级计划 apps/client/src/app/components/header/header.component.html - 185 + 187 apps/client/src/app/components/subscription-interstitial-dialog/subscription-interstitial-dialog.html @@ -2928,11 +2928,11 @@ apps/client/src/app/components/user-account-membership/user-account-membership.html - 18 + 20 apps/client/src/app/pages/pricing/pricing-page.html - 310 + 312 @@ -3056,7 +3056,7 @@ 每年 apps/client/src/app/components/user-account-membership/user-account-membership.html - 36 + 32 apps/client/src/app/pages/pricing/pricing-page.html @@ -3068,7 +3068,7 @@ 尝试高级版 apps/client/src/app/components/user-account-membership/user-account-membership.html - 53 + 49 @@ -3076,7 +3076,7 @@ 兑换优惠券 apps/client/src/app/components/user-account-membership/user-account-membership.html - 67 + 63 @@ -3816,7 +3816,7 @@ apps/client/src/app/pages/pricing/pricing-page.html - 346 + 342 @@ -4976,15 +4976,15 @@ 更新计划 apps/client/src/app/components/header/header.component.html - 191 + 185 apps/client/src/app/components/user-account-membership/user-account-membership.html - 24 + 18 apps/client/src/app/pages/pricing/pricing-page.html - 316 + 310 @@ -4992,7 +4992,7 @@ 一次性付款,无自动续订。 apps/client/src/app/pages/pricing/pricing-page.html - 320 + 316 @@ -5008,7 +5008,7 @@ 免费。 apps/client/src/app/pages/pricing/pricing-page.html - 349 + 345 @@ -7104,7 +7104,7 @@ No auto-renewal. apps/client/src/app/components/user-account-membership/user-account-membership.html - 74 + 70 From 3361666f63f348a23ad24cdb06d3de6d958997da Mon Sep 17 00:00:00 2001 From: csehatt741 <77381875+csehatt741@users.noreply.github.com> Date: Fri, 18 Apr 2025 11:11:49 +0200 Subject: [PATCH 7/7] Feature/activity in custom currency (#4486) * Activity in custom currency * Update changelog --------- Co-authored-by: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> --- CHANGELOG.md | 6 ++ apps/api/src/app/export/export.service.ts | 3 +- apps/api/src/app/import/import.controller.ts | 5 +- apps/api/src/app/import/import.service.ts | 88 ++++--------------- .../order/interfaces/activities.interface.ts | 4 +- apps/api/src/app/order/order.service.ts | 13 ++- .../portfolio-calculator-test-utils.ts | 3 +- .../calculator/portfolio-calculator.ts | 8 +- ...aln-buy-and-sell-in-two-activities.spec.ts | 12 +-- ...folio-calculator-baln-buy-and-sell.spec.ts | 8 +- .../portfolio-calculator-baln-buy.spec.ts | 4 +- ...ator-btcusd-buy-and-sell-partially.spec.ts | 8 +- .../roai/portfolio-calculator-fee.spec.ts | 4 +- .../portfolio-calculator-googl-buy.spec.ts | 4 +- .../roai/portfolio-calculator-item.spec.ts | 4 +- .../portfolio-calculator-liability.spec.ts | 4 +- ...-calculator-msft-buy-with-dividend.spec.ts | 8 +- ...ulator-novn-buy-and-sell-partially.spec.ts | 4 +- ...folio-calculator-novn-buy-and-sell.spec.ts | 4 +- .../src/app/portfolio/portfolio.service.ts | 8 +- ...ate-or-update-activity-dialog.component.ts | 86 +++--------------- .../create-or-update-activity-dialog.html | 74 +--------------- .../app/services/import-activities.service.ts | 3 +- .../activities-table.component.html | 2 +- .../migration.sql | 2 + test/import/ok-btceur.json | 29 ++++++ test/import/ok-btcusd.json | 29 ++++++ 27 files changed, 164 insertions(+), 263 deletions(-) create mode 100644 prisma/migrations/20250401084916_set_value_of_currency_to_null_in_order/migration.sql create mode 100644 test/import/ok-btceur.json create mode 100644 test/import/ok-btcusd.json diff --git a/CHANGELOG.md b/CHANGELOG.md index 0850d7831..043f56390 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 + +- Added support for activities in a custom currency + ## 2.152.1 - 2025-04-17 ### Changed diff --git a/apps/api/src/app/export/export.service.ts b/apps/api/src/app/export/export.service.ts index f0449dc14..5efa429c7 100644 --- a/apps/api/src/app/export/export.service.ts +++ b/apps/api/src/app/export/export.service.ts @@ -120,6 +120,7 @@ export class ExportService { ({ accountId, comment, + currency, date, fee, id, @@ -137,7 +138,7 @@ export class ExportService { quantity, type, unitPrice, - currency: SymbolProfile.currency, + currency: currency ?? SymbolProfile.currency, dataSource: SymbolProfile.dataSource, date: date.toISOString(), symbol: ['FEE', 'INTEREST', 'ITEM', 'LIABILITY'].includes(type) diff --git a/apps/api/src/app/import/import.controller.ts b/apps/api/src/app/import/import.controller.ts index b276a3c3d..15631a3e8 100644 --- a/apps/api/src/app/import/import.controller.ts +++ b/apps/api/src/app/import/import.controller.ts @@ -98,12 +98,9 @@ export class ImportController { @Param('dataSource') dataSource: DataSource, @Param('symbol') symbol: string ): Promise { - const userCurrency = this.request.user.Settings.settings.baseCurrency; - const activities = await this.importService.getDividends({ dataSource, - symbol, - userCurrency + symbol }); return { activities }; diff --git a/apps/api/src/app/import/import.service.ts b/apps/api/src/app/import/import.service.ts index c72420417..babe7c3e3 100644 --- a/apps/api/src/app/import/import.service.ts +++ b/apps/api/src/app/import/import.service.ts @@ -10,12 +10,10 @@ import { PlatformService } from '@ghostfolio/api/app/platform/platform.service'; import { PortfolioService } from '@ghostfolio/api/app/portfolio/portfolio.service'; import { ConfigurationService } from '@ghostfolio/api/services/configuration/configuration.service'; import { DataProviderService } from '@ghostfolio/api/services/data-provider/data-provider.service'; -import { ExchangeRateDataService } from '@ghostfolio/api/services/exchange-rate-data/exchange-rate-data.service'; import { DataGatheringService } from '@ghostfolio/api/services/queues/data-gathering/data-gathering.service'; import { SymbolProfileService } from '@ghostfolio/api/services/symbol-profile/symbol-profile.service'; import { DATA_GATHERING_QUEUE_PRIORITY_HIGH } from '@ghostfolio/common/config'; import { - DATE_FORMAT, getAssetProfileIdentifier, parseDate } from '@ghostfolio/common/helper'; @@ -29,8 +27,8 @@ import { import { Injectable } from '@nestjs/common'; import { DataSource, Prisma, SymbolProfile } from '@prisma/client'; import { Big } from 'big.js'; -import { endOfToday, format, isAfter, isSameSecond, parseISO } from 'date-fns'; -import { isNumber, uniqBy } from 'lodash'; +import { endOfToday, isAfter, isSameSecond, parseISO } from 'date-fns'; +import { uniqBy } from 'lodash'; import { v4 as uuidv4 } from 'uuid'; @Injectable() @@ -40,7 +38,6 @@ export class ImportService { private readonly configurationService: ConfigurationService, private readonly dataGatheringService: DataGatheringService, private readonly dataProviderService: DataProviderService, - private readonly exchangeRateDataService: ExchangeRateDataService, private readonly orderService: OrderService, private readonly platformService: PlatformService, private readonly portfolioService: PortfolioService, @@ -49,9 +46,8 @@ export class ImportService { public async getDividends({ dataSource, - symbol, - userCurrency - }: AssetProfileIdentifier & { userCurrency: string }): Promise { + symbol + }: AssetProfileIdentifier): Promise { try { const { firstBuyDate, historicalData, orders } = await this.portfolioService.getPosition(dataSource, undefined, symbol); @@ -121,22 +117,16 @@ export class ImportService { currency: undefined, createdAt: undefined, fee: 0, - feeInBaseCurrency: 0, + feeInAssetProfileCurrency: 0, id: assetProfile.id, isDraft: false, SymbolProfile: assetProfile, symbolProfileId: assetProfile.id, type: 'DIVIDEND', unitPrice: marketPrice, + unitPriceInAssetProfileCurrency: marketPrice, updatedAt: undefined, - userId: Account?.userId, - valueInBaseCurrency: - await this.exchangeRateDataService.toCurrencyAtDate( - value, - assetProfile.currency, - userCurrency, - date - ) + userId: Account?.userId }; }) ); @@ -266,17 +256,17 @@ export class ImportService { const activities: Activity[] = []; - for (const [index, activity] of activitiesExtendedWithErrors.entries()) { + for (const activity of activitiesExtendedWithErrors) { const accountId = activity.accountId; const comment = activity.comment; const currency = activity.currency; const date = activity.date; const error = activity.error; - let fee = activity.fee; + const fee = activity.fee; const quantity = activity.quantity; const SymbolProfile = activity.SymbolProfile; const type = activity.type; - let unitPrice = activity.unitPrice; + const unitPrice = activity.unitPrice; const assetProfile = assetProfiles[ getAssetProfileIdentifier({ @@ -284,7 +274,6 @@ export class ImportService { symbol: SymbolProfile.symbol }) ] ?? { - currency: SymbolProfile.currency, dataSource: SymbolProfile.dataSource, symbol: SymbolProfile.symbol }; @@ -320,35 +309,6 @@ export class ImportService { Account?: { id: string; name: string }; }); - if (SymbolProfile.currency !== assetProfile.currency) { - // Convert the unit price and fee to the asset currency if the imported - // activity is in a different currency - unitPrice = await this.exchangeRateDataService.toCurrencyAtDate( - unitPrice, - SymbolProfile.currency, - assetProfile.currency, - date - ); - - if (!isNumber(unitPrice)) { - throw new Error( - `activities.${index} historical exchange rate at ${format( - date, - DATE_FORMAT - )} is not available from "${SymbolProfile.currency}" to "${ - assetProfile.currency - }"` - ); - } - - fee = await this.exchangeRateDataService.toCurrencyAtDate( - fee, - SymbolProfile.currency, - assetProfile.currency, - date - ); - } - if (isDryRun) { order = { comment, @@ -400,6 +360,7 @@ export class ImportService { order = await this.orderService.createOrder({ comment, + currency, date, fee, quantity, @@ -439,21 +400,8 @@ export class ImportService { ...order, error, value, - feeInBaseCurrency: await this.exchangeRateDataService.toCurrencyAtDate( - fee, - assetProfile.currency, - userCurrency, - date - ), // @ts-ignore - SymbolProfile: assetProfile, - valueInBaseCurrency: - await this.exchangeRateDataService.toCurrencyAtDate( - value, - assetProfile.currency, - userCurrency, - date - ) + SymbolProfile: assetProfile }); } @@ -520,7 +468,8 @@ export class ImportService { return ( activity.accountId === accountId && activity.comment === comment && - activity.SymbolProfile.currency === currency && + (activity.currency === currency || + activity.SymbolProfile.currency === currency) && activity.SymbolProfile.dataSource === dataSource && isSameSecond(activity.date, date) && activity.fee === fee && @@ -538,6 +487,7 @@ export class ImportService { return { accountId, comment, + currency, date, error, fee, @@ -545,7 +495,6 @@ export class ImportService { type, unitPrice, SymbolProfile: { - currency, dataSource, symbol, activitiesCount: undefined, @@ -553,6 +502,7 @@ export class ImportService { assetSubClass: undefined, countries: undefined, createdAt: undefined, + currency: undefined, holdings: undefined, id: undefined, isActive: true, @@ -633,12 +583,6 @@ export class ImportService { `activities.${index}.symbol ("${symbol}") is not valid for the specified data source ("${dataSource}")` ); } - - if (assetProfile.currency !== currency) { - throw new Error( - `activities.${index}.currency ("${currency}") does not match with currency of ${assetProfile.symbol} ("${assetProfile.currency}")` - ); - } } assetProfiles[getAssetProfileIdentifier({ dataSource, symbol })] = diff --git a/apps/api/src/app/order/interfaces/activities.interface.ts b/apps/api/src/app/order/interfaces/activities.interface.ts index b16d10b7d..0c25c8ef8 100644 --- a/apps/api/src/app/order/interfaces/activities.interface.ts +++ b/apps/api/src/app/order/interfaces/activities.interface.ts @@ -11,12 +11,12 @@ export interface Activities { export interface Activity extends Order { Account?: AccountWithPlatform; error?: ActivityError; - feeInBaseCurrency: number; + feeInAssetProfileCurrency: number; SymbolProfile?: EnhancedSymbolProfile; tags?: Tag[]; + unitPriceInAssetProfileCurrency: number; updateAccountBalance?: boolean; value: number; - valueInBaseCurrency: number; } export interface ActivityError { diff --git a/apps/api/src/app/order/order.service.ts b/apps/api/src/app/order/order.service.ts index aa5ac4630..c2b822ac9 100644 --- a/apps/api/src/app/order/order.service.ts +++ b/apps/api/src/app/order/order.service.ts @@ -534,18 +534,25 @@ export class OrderService { return { ...order, value, - feeInBaseCurrency: + feeInAssetProfileCurrency: await this.exchangeRateDataService.toCurrencyAtDate( order.fee, + order.currency ?? order.SymbolProfile.currency, order.SymbolProfile.currency, - userCurrency, order.date ), SymbolProfile: assetProfile, + unitPriceInAssetProfileCurrency: + await this.exchangeRateDataService.toCurrencyAtDate( + order.unitPrice, + order.currency ?? order.SymbolProfile.currency, + order.SymbolProfile.currency, + order.date + ), valueInBaseCurrency: await this.exchangeRateDataService.toCurrencyAtDate( value, - order.SymbolProfile.currency, + order.currency ?? order.SymbolProfile.currency, userCurrency, order.date ) diff --git a/apps/api/src/app/portfolio/calculator/portfolio-calculator-test-utils.ts b/apps/api/src/app/portfolio/calculator/portfolio-calculator-test-utils.ts index c5a902c29..2c9f7b6f3 100644 --- a/apps/api/src/app/portfolio/calculator/portfolio-calculator-test-utils.ts +++ b/apps/api/src/app/portfolio/calculator/portfolio-calculator-test-utils.ts @@ -6,10 +6,11 @@ export const activityDummyData = { comment: undefined, createdAt: new Date(), currency: undefined, - feeInBaseCurrency: undefined, + fee: undefined, id: undefined, isDraft: false, symbolProfileId: undefined, + unitPrice: undefined, updatedAt: new Date(), userId: undefined, value: undefined, diff --git a/apps/api/src/app/portfolio/calculator/portfolio-calculator.ts b/apps/api/src/app/portfolio/calculator/portfolio-calculator.ts index 52d57230b..9698cb315 100644 --- a/apps/api/src/app/portfolio/calculator/portfolio-calculator.ts +++ b/apps/api/src/app/portfolio/calculator/portfolio-calculator.ts @@ -112,12 +112,12 @@ export abstract class PortfolioCalculator { .map( ({ date, - fee, + feeInAssetProfileCurrency, quantity, SymbolProfile, tags = [], type, - unitPrice + unitPriceInAssetProfileCurrency }) => { if (isBefore(date, dateOfFirstActivity)) { dateOfFirstActivity = date; @@ -134,9 +134,9 @@ export abstract class PortfolioCalculator { tags, type, date: format(date, DATE_FORMAT), - fee: new Big(fee), + fee: new Big(feeInAssetProfileCurrency), quantity: new Big(quantity), - unitPrice: new Big(unitPrice) + unitPrice: new Big(unitPriceInAssetProfileCurrency) }; } ) diff --git a/apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-baln-buy-and-sell-in-two-activities.spec.ts b/apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-baln-buy-and-sell-in-two-activities.spec.ts index e157e2d26..eed5a1e80 100644 --- a/apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-baln-buy-and-sell-in-two-activities.spec.ts +++ b/apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-baln-buy-and-sell-in-two-activities.spec.ts @@ -91,7 +91,7 @@ describe('PortfolioCalculator', () => { { ...activityDummyData, date: new Date('2021-11-22'), - fee: 1.55, + feeInAssetProfileCurrency: 1.55, quantity: 2, SymbolProfile: { ...symbolProfileDummyData, @@ -101,12 +101,12 @@ describe('PortfolioCalculator', () => { symbol: 'BALN.SW' }, type: 'BUY', - unitPrice: 142.9 + unitPriceInAssetProfileCurrency: 142.9 }, { ...activityDummyData, date: new Date('2021-11-30'), - fee: 1.65, + feeInAssetProfileCurrency: 1.65, quantity: 1, SymbolProfile: { ...symbolProfileDummyData, @@ -116,12 +116,12 @@ describe('PortfolioCalculator', () => { symbol: 'BALN.SW' }, type: 'SELL', - unitPrice: 136.6 + unitPriceInAssetProfileCurrency: 136.6 }, { ...activityDummyData, date: new Date('2021-11-30'), - fee: 0, + feeInAssetProfileCurrency: 0, quantity: 1, SymbolProfile: { ...symbolProfileDummyData, @@ -131,7 +131,7 @@ describe('PortfolioCalculator', () => { symbol: 'BALN.SW' }, type: 'SELL', - unitPrice: 136.6 + unitPriceInAssetProfileCurrency: 136.6 } ]; diff --git a/apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-baln-buy-and-sell.spec.ts b/apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-baln-buy-and-sell.spec.ts index a1650ea82..15f3983fe 100644 --- a/apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-baln-buy-and-sell.spec.ts +++ b/apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-baln-buy-and-sell.spec.ts @@ -91,7 +91,7 @@ describe('PortfolioCalculator', () => { { ...activityDummyData, date: new Date('2021-11-22'), - fee: 1.55, + feeInAssetProfileCurrency: 1.55, quantity: 2, SymbolProfile: { ...symbolProfileDummyData, @@ -101,12 +101,12 @@ describe('PortfolioCalculator', () => { symbol: 'BALN.SW' }, type: 'BUY', - unitPrice: 142.9 + unitPriceInAssetProfileCurrency: 142.9 }, { ...activityDummyData, date: new Date('2021-11-30'), - fee: 1.65, + feeInAssetProfileCurrency: 1.65, quantity: 2, SymbolProfile: { ...symbolProfileDummyData, @@ -116,7 +116,7 @@ describe('PortfolioCalculator', () => { symbol: 'BALN.SW' }, type: 'SELL', - unitPrice: 136.6 + unitPriceInAssetProfileCurrency: 136.6 } ]; diff --git a/apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-baln-buy.spec.ts b/apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-baln-buy.spec.ts index 63a4d77b4..7a34bd114 100644 --- a/apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-baln-buy.spec.ts +++ b/apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-baln-buy.spec.ts @@ -91,7 +91,7 @@ describe('PortfolioCalculator', () => { { ...activityDummyData, date: new Date('2021-11-30'), - fee: 1.55, + feeInAssetProfileCurrency: 1.55, quantity: 2, SymbolProfile: { ...symbolProfileDummyData, @@ -101,7 +101,7 @@ describe('PortfolioCalculator', () => { symbol: 'BALN.SW' }, type: 'BUY', - unitPrice: 136.6 + unitPriceInAssetProfileCurrency: 136.6 } ]; diff --git a/apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-btcusd-buy-and-sell-partially.spec.ts b/apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-btcusd-buy-and-sell-partially.spec.ts index 2853e3d87..3158076cb 100644 --- a/apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-btcusd-buy-and-sell-partially.spec.ts +++ b/apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-btcusd-buy-and-sell-partially.spec.ts @@ -105,7 +105,7 @@ describe('PortfolioCalculator', () => { { ...activityDummyData, date: new Date('2015-01-01'), - fee: 0, + feeInAssetProfileCurrency: 0, quantity: 2, SymbolProfile: { ...symbolProfileDummyData, @@ -115,12 +115,12 @@ describe('PortfolioCalculator', () => { symbol: 'BTCUSD' }, type: 'BUY', - unitPrice: 320.43 + unitPriceInAssetProfileCurrency: 320.43 }, { ...activityDummyData, date: new Date('2017-12-31'), - fee: 0, + feeInAssetProfileCurrency: 0, quantity: 1, SymbolProfile: { ...symbolProfileDummyData, @@ -130,7 +130,7 @@ describe('PortfolioCalculator', () => { symbol: 'BTCUSD' }, type: 'SELL', - unitPrice: 14156.4 + unitPriceInAssetProfileCurrency: 14156.4 } ]; diff --git a/apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-fee.spec.ts b/apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-fee.spec.ts index b96e4f540..22a34af24 100644 --- a/apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-fee.spec.ts +++ b/apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-fee.spec.ts @@ -91,7 +91,7 @@ describe('PortfolioCalculator', () => { { ...activityDummyData, date: new Date('2021-09-01'), - fee: 49, + feeInAssetProfileCurrency: 49, quantity: 0, SymbolProfile: { ...symbolProfileDummyData, @@ -101,7 +101,7 @@ describe('PortfolioCalculator', () => { symbol: '2c463fb3-af07-486e-adb0-8301b3d72141' }, type: 'FEE', - unitPrice: 0 + unitPriceInAssetProfileCurrency: 0 } ]; diff --git a/apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-googl-buy.spec.ts b/apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-googl-buy.spec.ts index b3793a5b4..41299eb40 100644 --- a/apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-googl-buy.spec.ts +++ b/apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-googl-buy.spec.ts @@ -104,7 +104,7 @@ describe('PortfolioCalculator', () => { { ...activityDummyData, date: new Date('2023-01-03'), - fee: 1, + feeInAssetProfileCurrency: 1, quantity: 1, SymbolProfile: { ...symbolProfileDummyData, @@ -114,7 +114,7 @@ describe('PortfolioCalculator', () => { symbol: 'GOOGL' }, type: 'BUY', - unitPrice: 89.12 + unitPriceInAssetProfileCurrency: 89.12 } ]; diff --git a/apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-item.spec.ts b/apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-item.spec.ts index d226fe6f8..721c9ae96 100644 --- a/apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-item.spec.ts +++ b/apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-item.spec.ts @@ -91,7 +91,7 @@ describe('PortfolioCalculator', () => { { ...activityDummyData, date: new Date('2022-01-01'), - fee: 0, + feeInAssetProfileCurrency: 0, quantity: 1, SymbolProfile: { ...symbolProfileDummyData, @@ -101,7 +101,7 @@ describe('PortfolioCalculator', () => { symbol: 'dac95060-d4f2-4653-a253-2c45e6fb5cde' }, type: 'ITEM', - unitPrice: 500000 + unitPriceInAssetProfileCurrency: 500000 } ]; diff --git a/apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-liability.spec.ts b/apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-liability.spec.ts index 569212b9a..a82e605d4 100644 --- a/apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-liability.spec.ts +++ b/apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-liability.spec.ts @@ -91,7 +91,7 @@ describe('PortfolioCalculator', () => { { ...activityDummyData, date: new Date('2023-01-01'), // Date in future - fee: 0, + feeInAssetProfileCurrency: 0, quantity: 1, SymbolProfile: { ...symbolProfileDummyData, @@ -101,7 +101,7 @@ describe('PortfolioCalculator', () => { symbol: '55196015-1365-4560-aa60-8751ae6d18f8' }, type: 'LIABILITY', - unitPrice: 3000 + unitPriceInAssetProfileCurrency: 3000 } ]; diff --git a/apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-msft-buy-with-dividend.spec.ts b/apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-msft-buy-with-dividend.spec.ts index 4c54ba7aa..d8e774639 100644 --- a/apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-msft-buy-with-dividend.spec.ts +++ b/apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-msft-buy-with-dividend.spec.ts @@ -104,7 +104,7 @@ describe('PortfolioCalculator', () => { { ...activityDummyData, date: new Date('2021-09-16'), - fee: 19, + feeInAssetProfileCurrency: 19, quantity: 1, SymbolProfile: { ...symbolProfileDummyData, @@ -114,12 +114,12 @@ describe('PortfolioCalculator', () => { symbol: 'MSFT' }, type: 'BUY', - unitPrice: 298.58 + unitPriceInAssetProfileCurrency: 298.58 }, { ...activityDummyData, date: new Date('2021-11-16'), - fee: 0, + feeInAssetProfileCurrency: 0, quantity: 1, SymbolProfile: { ...symbolProfileDummyData, @@ -129,7 +129,7 @@ describe('PortfolioCalculator', () => { symbol: 'MSFT' }, type: 'DIVIDEND', - unitPrice: 0.62 + unitPriceInAssetProfileCurrency: 0.62 } ]; diff --git a/apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-novn-buy-and-sell-partially.spec.ts b/apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-novn-buy-and-sell-partially.spec.ts index 84bcc5bc1..ffbfe7345 100644 --- a/apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-novn-buy-and-sell-partially.spec.ts +++ b/apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-novn-buy-and-sell-partially.spec.ts @@ -105,13 +105,15 @@ describe('PortfolioCalculator', () => { ...activityDummyData, ...activity, date: parseDate(activity.date), + feeInAssetProfileCurrency: activity.fee, SymbolProfile: { ...symbolProfileDummyData, currency: activity.currency, dataSource: activity.dataSource, name: 'Novartis AG', symbol: activity.symbol - } + }, + unitPriceInAssetProfileCurrency: activity.unitPrice })); const portfolioCalculator = portfolioCalculatorFactory.createCalculator({ diff --git a/apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-novn-buy-and-sell.spec.ts b/apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-novn-buy-and-sell.spec.ts index 937fd8b48..0256a6a1e 100644 --- a/apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-novn-buy-and-sell.spec.ts +++ b/apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-novn-buy-and-sell.spec.ts @@ -105,13 +105,15 @@ describe('PortfolioCalculator', () => { ...activityDummyData, ...activity, date: parseDate(activity.date), + feeInAssetProfileCurrency: activity.fee, SymbolProfile: { ...symbolProfileDummyData, currency: activity.currency, dataSource: activity.dataSource, name: 'Novartis AG', symbol: activity.symbol - } + }, + unitPriceInAssetProfileCurrency: activity.unitPrice })); const portfolioCalculator = portfolioCalculatorFactory.createCalculator({ diff --git a/apps/api/src/app/portfolio/portfolio.service.ts b/apps/api/src/app/portfolio/portfolio.service.ts index 7287c103b..d3bbc1e06 100644 --- a/apps/api/src/app/portfolio/portfolio.service.ts +++ b/apps/api/src/app/portfolio/portfolio.service.ts @@ -246,10 +246,14 @@ export class PortfolioService { activities: Activity[]; groupBy?: GroupBy; }): Promise { - let dividends = activities.map(({ date, valueInBaseCurrency }) => { + let dividends = activities.map(({ currency, date, value }) => { return { date: format(date, DATE_FORMAT), - investment: valueInBaseCurrency + investment: this.exchangeRateDataService.toCurrency( + value, + currency, + this.getUserCurrency() + ) }; }); 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 555fbc7aa..f6ce2a81d 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 @@ -15,7 +15,7 @@ import { DateAdapter, MAT_DATE_LOCALE } from '@angular/material/core'; import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; import { AssetClass, AssetSubClass, Tag, Type } from '@prisma/client'; import { isAfter, isToday } from 'date-fns'; -import { EMPTY, Subject, lastValueFrom } from 'rxjs'; +import { EMPTY, Subject } from 'rxjs'; import { catchError, delay, takeUntil } from 'rxjs/operators'; import { DataService } from '../../../../services/data.service'; @@ -102,7 +102,8 @@ export class CreateOrUpdateActivityDialog implements OnDestroy { Validators.required ], currencyOfUnitPrice: [ - this.data.activity?.SymbolProfile?.currency, + this.data.activity?.currency ?? + this.data.activity?.SymbolProfile?.currency, Validators.required ], dataSource: [ @@ -111,7 +112,6 @@ export class CreateOrUpdateActivityDialog implements OnDestroy { ], date: [this.data.activity?.date, Validators.required], fee: [this.data.activity?.fee, Validators.required], - feeInCustomCurrency: [this.data.activity?.fee, Validators.required], name: [this.data.activity?.SymbolProfile?.name, Validators.required], quantity: [this.data.activity?.quantity, Validators.required], searchSymbol: [ @@ -133,10 +133,6 @@ export class CreateOrUpdateActivityDialog implements OnDestroy { ], type: [undefined, Validators.required], // Set after value changes subscription unitPrice: [this.data.activity?.unitPrice, Validators.required], - unitPriceInCustomCurrency: [ - this.data.activity?.unitPrice, - Validators.required - ], updateAccountBalance: [false] }); @@ -148,57 +144,6 @@ export class CreateOrUpdateActivityDialog implements OnDestroy { takeUntil(this.unsubscribeSubject) ) .subscribe(async () => { - let exchangeRateOfUnitPrice = 1; - - this.activityForm.get('feeInCustomCurrency').setErrors(null); - this.activityForm.get('unitPriceInCustomCurrency').setErrors(null); - - const currency = this.activityForm.get('currency').value; - const currencyOfUnitPrice = this.activityForm.get( - 'currencyOfUnitPrice' - ).value; - const date = this.activityForm.get('date').value; - - if ( - currency && - currencyOfUnitPrice && - currency !== currencyOfUnitPrice && - date - ) { - try { - const { marketPrice } = await lastValueFrom( - this.dataService - .fetchExchangeRateForDate({ - date, - symbol: `${currencyOfUnitPrice}-${currency}` - }) - .pipe(takeUntil(this.unsubscribeSubject)) - ); - - exchangeRateOfUnitPrice = marketPrice; - } catch { - this.activityForm.get('unitPriceInCustomCurrency').setErrors({ - invalid: true - }); - } - } - - const feeInCustomCurrency = - this.activityForm.get('feeInCustomCurrency').value * - exchangeRateOfUnitPrice; - - const unitPriceInCustomCurrency = - this.activityForm.get('unitPriceInCustomCurrency').value * - exchangeRateOfUnitPrice; - - this.activityForm.get('fee').setValue(feeInCustomCurrency, { - emitEvent: false - }); - - this.activityForm.get('unitPrice').setValue(unitPriceInCustomCurrency, { - emitEvent: false - }); - if ( this.activityForm.get('type').value === 'BUY' || this.activityForm.get('type').value === 'FEE' || @@ -265,10 +210,6 @@ export class CreateOrUpdateActivityDialog implements OnDestroy { this.activityForm.get('type').value ) ) { - this.activityForm - .get('dataSource') - .setValue(this.activityForm.get('searchSymbol').value.dataSource); - this.updateSymbol(); } @@ -297,7 +238,7 @@ export class CreateOrUpdateActivityDialog implements OnDestroy { .get('dataSource') .removeValidators(Validators.required); this.activityForm.get('dataSource').updateValueAndValidity(); - this.activityForm.get('feeInCustomCurrency').reset(); + this.activityForm.get('fee').reset(); this.activityForm.get('name').setValidators(Validators.required); this.activityForm.get('name').updateValueAndValidity(); this.activityForm.get('quantity').setValue(1); @@ -331,12 +272,11 @@ export class CreateOrUpdateActivityDialog implements OnDestroy { this.activityForm.get('dataSource').updateValueAndValidity(); if ( - (type === 'FEE' && - this.activityForm.get('feeInCustomCurrency').value === 0) || + (type === 'FEE' && this.activityForm.get('fee').value === 0) || type === 'INTEREST' || type === 'LIABILITY' ) { - this.activityForm.get('feeInCustomCurrency').reset(); + this.activityForm.get('fee').reset(); } this.activityForm.get('name').setValidators(Validators.required); @@ -354,7 +294,7 @@ export class CreateOrUpdateActivityDialog implements OnDestroy { this.activityForm.get('searchSymbol').updateValueAndValidity(); if (type === 'FEE') { - this.activityForm.get('unitPriceInCustomCurrency').setValue(0); + this.activityForm.get('unitPrice').setValue(0); } if ( @@ -410,7 +350,7 @@ export class CreateOrUpdateActivityDialog implements OnDestroy { public applyCurrentMarketPrice() { this.activityForm.patchValue({ currencyOfUnitPrice: this.activityForm.get('currency').value, - unitPriceInCustomCurrency: this.currentMarketPrice + unitPrice: this.currentMarketPrice }); } @@ -496,7 +436,7 @@ export class CreateOrUpdateActivityDialog implements OnDestroy { this.dataService .fetchSymbolItem({ - dataSource: this.activityForm.get('dataSource').value, + dataSource: this.activityForm.get('searchSymbol').value.dataSource, symbol: this.activityForm.get('searchSymbol').value.symbol }) .pipe( @@ -512,9 +452,11 @@ export class CreateOrUpdateActivityDialog implements OnDestroy { takeUntil(this.unsubscribeSubject) ) .subscribe(({ currency, dataSource, marketPrice }) => { - this.activityForm.get('currency').setValue(currency); - this.activityForm.get('currencyOfUnitPrice').setValue(currency); - this.activityForm.get('dataSource').setValue(dataSource); + if (this.mode === 'create') { + this.activityForm.get('currency').setValue(currency); + this.activityForm.get('currencyOfUnitPrice').setValue(currency); + this.activityForm.get('dataSource').setValue(dataSource); + } this.currentMarketPrice = marketPrice; diff --git a/apps/client/src/app/pages/portfolio/activities/create-or-update-activity-dialog/create-or-update-activity-dialog.html b/apps/client/src/app/pages/portfolio/activities/create-or-update-activity-dialog/create-or-update-activity-dialog.html index 85fcf5a94..b0521530f 100644 --- a/apps/client/src/app/pages/portfolio/activities/create-or-update-activity-dialog/create-or-update-activity-dialog.html +++ b/apps/client/src/app/pages/portfolio/activities/create-or-update-activity-dialog/create-or-update-activity-dialog.html @@ -214,11 +214,7 @@ } } - +

- @if ( - activityForm.get('unitPriceInCustomCurrency').hasError('invalid') - ) { - Oops! Could not get the historical exchange rate - from - {{ - activityForm.get('date')?.value | date: defaultDateFormat - }} - } @if ( currentMarketPrice && @@ -263,36 +246,6 @@ } -
- - - @switch (activityForm.get('type')?.value) { - @case ('DIVIDEND') { - Dividend - } - @case ('FEE') { - Value - } - @case ('INTEREST') { - Value - } - @case ('ITEM') { - Value - } - @case ('LIABILITY') { - Value - } - @default { - Unit Price - } - } - - - {{ - activityForm.get('currency').value - }} - -
Fee - +
{{ activityForm.get('currencyOfUnitPrice').value }}
- @if (activityForm.get('feeInCustomCurrency').hasError('invalid')) { - Oops! Could not get the historical exchange rate - from - {{ - activityForm.get('date')?.value | date: defaultDateFormat - }} - } - -
-
- - Fee - - {{ - activityForm.get('currency').value - }}
@@ -392,7 +325,8 @@ [isCurrency]="true" [locale]="data.user?.settings?.locale" [unit]=" - activityForm.get('currency')?.value ?? data.user?.settings?.baseCurrency + activityForm.get('currencyOfUnitPrice')?.value ?? + data.user?.settings?.baseCurrency " [value]="total" /> diff --git a/apps/client/src/app/services/import-activities.service.ts b/apps/client/src/app/services/import-activities.service.ts index c1b2209b3..2164bd248 100644 --- a/apps/client/src/app/services/import-activities.service.ts +++ b/apps/client/src/app/services/import-activities.service.ts @@ -126,6 +126,7 @@ export class ImportActivitiesService { private convertToCreateOrderDto({ accountId, comment, + currency, date, fee, quantity, @@ -142,7 +143,7 @@ export class ImportActivitiesService { type, unitPrice, updateAccountBalance, - currency: SymbolProfile.currency, + currency: currency ?? SymbolProfile.currency, dataSource: SymbolProfile.dataSource, date: date.toString(), symbol: SymbolProfile.symbol diff --git a/libs/ui/src/lib/activities-table/activities-table.component.html b/libs/ui/src/lib/activities-table/activities-table.component.html index e5b33efd2..79a7d3417 100644 --- a/libs/ui/src/lib/activities-table/activities-table.component.html +++ b/libs/ui/src/lib/activities-table/activities-table.component.html @@ -280,7 +280,7 @@ class="d-none d-lg-table-cell px-1" mat-cell > - {{ element.SymbolProfile?.currency }} + {{ element.currency ?? element.SymbolProfile?.currency }} diff --git a/prisma/migrations/20250401084916_set_value_of_currency_to_null_in_order/migration.sql b/prisma/migrations/20250401084916_set_value_of_currency_to_null_in_order/migration.sql new file mode 100644 index 000000000..03a4e7178 --- /dev/null +++ b/prisma/migrations/20250401084916_set_value_of_currency_to_null_in_order/migration.sql @@ -0,0 +1,2 @@ +-- AlterTable +UPDATE "Order" SET "currency" = NULL; diff --git a/test/import/ok-btceur.json b/test/import/ok-btceur.json new file mode 100644 index 000000000..b370682f9 --- /dev/null +++ b/test/import/ok-btceur.json @@ -0,0 +1,29 @@ +{ + "meta": { + "date": "2021-12-12T00:00:00.000Z", + "version": "dev" + }, + "accounts": [], + "platforms": [], + "tags": [], + "activities": [ + { + "accountId": null, + "comment": null, + "fee": 3.94, + "quantity": 1, + "type": "BUY", + "unitPrice": 39378.5, + "currency": "EUR", + "dataSource": "YAHOO", + "date": "2021-12-12T00:00:00.000Z", + "symbol": "BTCUSD", + "tags": [] + } + ], + "user": { + "settings": { + "currency": "USD" + } + } +} diff --git a/test/import/ok-btcusd.json b/test/import/ok-btcusd.json new file mode 100644 index 000000000..fc2e1f66e --- /dev/null +++ b/test/import/ok-btcusd.json @@ -0,0 +1,29 @@ +{ + "meta": { + "date": "2021-12-12T00:00:00.000Z", + "version": "dev" + }, + "accounts": [], + "platforms": [], + "tags": [], + "activities": [ + { + "accountId": null, + "comment": null, + "fee": 4.46, + "quantity": 1, + "type": "BUY", + "unitPrice": 44558.42, + "currency": "USD", + "dataSource": "YAHOO", + "date": "2021-12-12T00:00:00.000Z", + "symbol": "BTCUSD", + "tags": [] + } + ], + "user": { + "settings": { + "currency": "USD" + } + } +}