From 0adaf12a01bd48f437b5fcc8d44220ad4e0d81d3 Mon Sep 17 00:00:00 2001 From: Martin Vandenbussche <26136934+MaVdbussche@users.noreply.github.com> Date: Sat, 10 Jun 2023 11:19:33 +0200 Subject: [PATCH 1/9] Add new French translations (#2057) * Add new French translations * Update changelog Signed-off-by: Martin Vandenbussche --- CHANGELOG.md | 6 + apps/client/src/locales/messages.fr.xlf | 178 ++++++++++++------------ 2 files changed, 95 insertions(+), 89 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1ca4771cc..1cdd9430f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## Unreleased + +### Changed + +- Improved the language localization for French (`fr`) + ## 1.278.0 - 2023-06-09 ### Changed diff --git a/apps/client/src/locales/messages.fr.xlf b/apps/client/src/locales/messages.fr.xlf index fe8c9e0ff..27739d8e1 100644 --- a/apps/client/src/locales/messages.fr.xlf +++ b/apps/client/src/locales/messages.fr.xlf @@ -3,7 +3,7 @@ The risk of loss in trading can be substantial. It is not advisable to invest money you may need in the short term. - Le risque de perte en investissant peut être important. Il est déconseillé d'investir de l'argent dont vous pourriez avoir besoin à court terme. + Le risque de perte en investissant peut être important. Il est déconseillé d'investir de l'argent dont vous pourriez avoir besoin à court terme. apps/client/src/app/app.component.html 164,165 @@ -931,7 +931,7 @@ Last Request - Dernière Requête + Dernière Requête apps/client/src/app/components/admin-users/admin-users.html 35,37 @@ -1223,7 +1223,7 @@ Upgrade Plan - Mettre à Niveau l'Abonnement + Mettre à niveau l'Abonnement apps/client/src/app/components/home-summary/home-summary.component.ts 114 @@ -1455,7 +1455,7 @@ Annualized Performance - Performance annualisée + Performance annualisée apps/client/src/app/components/portfolio-summary/portfolio-summary.component.html 210,212 @@ -2159,7 +2159,7 @@ Frequently Asked Questions (FAQ) - Foire aux questions (FAQ) + Questions Fréquentes (FAQ) apps/client/src/app/pages/faq/faq-page-routing.module.ts 12 @@ -2239,7 +2239,7 @@ Update activity - Mettre à jour activité + Mettre à jour Activité apps/client/src/app/pages/portfolio/activities/create-or-update-activity-dialog/create-or-update-activity-dialog.html 7 @@ -2247,7 +2247,7 @@ Add activity - Ajouter activité + Ajouter Activité apps/client/src/app/pages/portfolio/activities/create-or-update-activity-dialog/create-or-update-activity-dialog.html 8 @@ -2819,7 +2819,7 @@ Import Activities - Importer Activités + Importer Activités apps/client/src/app/pages/portfolio/activities/import-activities-dialog/import-activities-dialog.component.ts 40 @@ -3210,7 +3210,7 @@ Import Dividends - Importer Dividendes + Importer Dividendes apps/client/src/app/pages/portfolio/activities/import-activities-dialog/import-activities-dialog.component.ts 76 @@ -3218,7 +3218,7 @@ Valid until - Valid until + Valide jusqu'au apps/client/src/app/pages/account/account-page.html 27 @@ -3234,7 +3234,7 @@ Grant - Grant + Donner libs/ui/src/lib/i18n.ts 12 @@ -3242,7 +3242,7 @@ Higher Risk - Higher Risk + Risque élevé libs/ui/src/lib/i18n.ts 13 @@ -3250,7 +3250,7 @@ Lower Risk - Lower Risk + Risque faible libs/ui/src/lib/i18n.ts 15 @@ -3258,7 +3258,7 @@ Retirement Provision - Retirement Provision + Réserve pour retraite libs/ui/src/lib/i18n.ts 19 @@ -3266,7 +3266,7 @@ Satellite - Satellite + Satellite libs/ui/src/lib/i18n.ts 20 @@ -3274,7 +3274,7 @@ Protection for sensitive information like absolute performances and quantity values - Protection for sensitive information like absolute performances and quantity values + Protection pour les informations sensibles telles que la performance absolue et les montants apps/client/src/app/pages/account/account-page.html 85,88 @@ -3282,7 +3282,7 @@ Distraction-free experience for turbulent times - Distraction-free experience for turbulent times + Expérience sans distraction pour les périodes tumultueuses apps/client/src/app/pages/account/account-page.html 224,226 @@ -3290,7 +3290,7 @@ Sneak peek at upcoming functionality - Sneak peek at upcoming functionality + Avant-première de fonctionnalités futures apps/client/src/app/pages/account/account-page.html 254,256 @@ -3298,7 +3298,7 @@ Are you an ambitious investor who needs the full picture? - Are you an ambitious investor who needs the full picture? + Êtes-vous un investisseur ambitieux qui a besoin d'une vue complète ? apps/client/src/app/components/subscription-interstitial-dialog/subscription-interstitial-dialog.html 15,17 @@ -3306,7 +3306,7 @@ Portfolio Summary - Portfolio Summary + Résumé du Portefeuille apps/client/src/app/components/subscription-interstitial-dialog/subscription-interstitial-dialog.html 25 @@ -3322,7 +3322,7 @@ Performance Benchmarks - Performance Benchmarks + Référence de Performance apps/client/src/app/components/subscription-interstitial-dialog/subscription-interstitial-dialog.html 33 @@ -3338,7 +3338,7 @@ FIRE Calculator - FIRE Calculator + Calculateur FIRE apps/client/src/app/components/subscription-interstitial-dialog/subscription-interstitial-dialog.html 37 @@ -3354,7 +3354,7 @@ and more Features... - and more Features... + et d'autres fonctionnalités... apps/client/src/app/components/subscription-interstitial-dialog/subscription-interstitial-dialog.html 45 @@ -3370,7 +3370,7 @@ Skip - Skip + Passer apps/client/src/app/components/subscription-interstitial-dialog/subscription-interstitial-dialog.html 55 @@ -3378,7 +3378,7 @@ Upgrade Plan - Upgrade Plan + Mettre à niveau l'Abonnement apps/client/src/app/components/subscription-interstitial-dialog/subscription-interstitial-dialog.html 62 @@ -3390,7 +3390,7 @@ For tech-savvy investors who prefer to run Ghostfolio on their own infrastructure. - For tech-savvy investors who prefer to run Ghostfolio on their own infrastructure. + Pour les investisseurs à l'aise avec la technologie qui préfèrent héberger Ghostfolio sur leur propre infrastructure. apps/client/src/app/pages/pricing/pricing-page.html 36,39 @@ -3398,7 +3398,7 @@ Unlimited Transactions - Unlimited Transactions + Transactions Illimitées apps/client/src/app/pages/pricing/pricing-page.html 46 @@ -3414,7 +3414,7 @@ Unlimited Accounts - Unlimited Accounts + Comptes illimités apps/client/src/app/pages/pricing/pricing-page.html 53 @@ -3430,7 +3430,7 @@ Portfolio Performance - Portfolio Performance + Performance du Portefeuille apps/client/src/app/pages/pricing/pricing-page.html 60 @@ -3446,7 +3446,7 @@ Self-hosted, update manually. - Self-hosted, update manually. + Hébergé localement, mises à jour manuelles. apps/client/src/app/pages/pricing/pricing-page.html 122 @@ -3454,7 +3454,7 @@ Free - Free + Gratuit apps/client/src/app/pages/pricing/pricing-page.html 123 @@ -3466,7 +3466,7 @@ For new investors who are just getting started with trading. - For new investors who are just getting started with trading. + Pour les nouveaux investisseurs qui débutent en Bourse. apps/client/src/app/pages/pricing/pricing-page.html 150,152 @@ -3474,7 +3474,7 @@ Fully managed Ghostfolio cloud offering. - Fully managed Ghostfolio cloud offering. + Offre Ghostfolio cloud complètement administrée. apps/client/src/app/pages/pricing/pricing-page.html 191 @@ -3486,7 +3486,7 @@ For ambitious investors who need the full picture of their financial assets. - For ambitious investors who need the full picture of their financial assets. + Pour les investisseurs ambitieux qui ont besoin d'une vue complète de leurs actifs financiers. apps/client/src/app/pages/pricing/pricing-page.html 225,228 @@ -3494,7 +3494,7 @@ One-time payment, no auto-renewal. - One-time payment, no auto-renewal. + Paiement unique, sans auto-renouvellement. apps/client/src/app/pages/pricing/pricing-page.html 352 @@ -3502,7 +3502,7 @@ Get Started - Get Started + Débuter apps/client/src/app/pages/pricing/pricing-page.html 363,365 @@ -3510,7 +3510,7 @@ It’s free. - It’s free. + C'est gratuit. apps/client/src/app/pages/pricing/pricing-page.html 366 @@ -3518,7 +3518,7 @@ Fees - Fees + Frais apps/client/src/app/components/position/position-detail-dialog/position-detail-dialog.html 148 @@ -3526,7 +3526,7 @@ Portfolio Allocations - Portfolio Allocations + Allocations du Portefeuille apps/client/src/app/components/subscription-interstitial-dialog/subscription-interstitial-dialog.html 29 @@ -3542,7 +3542,7 @@ Savings Rate per Month - Savings Rate per Month + Taux d'Épargne mensuel libs/ui/src/lib/fire-calculator/fire-calculator.component.html 10 @@ -3550,7 +3550,7 @@ Data Import and Export - Data Import and Export + Import et Export de Données apps/client/src/app/pages/pricing/pricing-page.html 95 @@ -3566,7 +3566,7 @@ Switch to Ghostfolio Premium easily - Switch to Ghostfolio Premium easily + Passez à Ghostfolio Premium facilement libs/ui/src/lib/i18n.ts 9 @@ -3574,7 +3574,7 @@ Community Support - Community Support + Support de la Communauté apps/client/src/app/pages/pricing/pricing-page.html 118 @@ -3582,7 +3582,7 @@ Email and Chat Support - Email and Chat Support + Support par E-mail et Tchat apps/client/src/app/pages/pricing/pricing-page.html 314 @@ -3590,7 +3590,7 @@ Switch to Ghostfolio Premium or Ghostfolio Open Source easily - Switch to Ghostfolio Premium or Ghostfolio Open Source easily + Passez à Ghostfolio Premium ou Ghostfolio Open Source facilement libs/ui/src/lib/i18n.ts 8 @@ -3598,7 +3598,7 @@ Switch to Ghostfolio Open Source or Ghostfolio Basic easily - Switch to Ghostfolio Open Source or Ghostfolio Basic easily + Passez à Ghostfolio Open Source ou Ghostfolio Basic facilement libs/ui/src/lib/i18n.ts 10 @@ -3606,7 +3606,7 @@ Market data provided by - Market data provided by + Données de marché fournies par libs/ui/src/lib/data-provider-credits/data-provider-credits.component.html 2 @@ -3614,7 +3614,7 @@ Oops! Could not get the historical exchange rate from - Oops! Could not get the historical exchange rate from + Oups ! Nous n'avons pas pu obtenir le taux de change historique à partir de apps/client/src/app/pages/portfolio/activities/create-or-update-activity-dialog/create-or-update-activity-dialog.html 155 @@ -3626,7 +3626,7 @@ Gather Historical Data - Gather Historical Data + Obtenir les Données Historiques apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.html 30 @@ -3634,7 +3634,7 @@ Retirement Date - Retirement Date + Date de Retraite libs/ui/src/lib/fire-calculator/fire-calculator.component.html 32 @@ -3642,7 +3642,7 @@ Professional Data Provider - Professional Data Provider + Fournisseur de Données Professionnel apps/client/src/app/components/subscription-interstitial-dialog/subscription-interstitial-dialog.html 41 @@ -3654,7 +3654,7 @@ Pricing Plans - Pricing Plans + Abonnements apps/client/src/app/pages/pricing/pricing-page.html 4 @@ -3662,7 +3662,7 @@ Renew - Renew + Renouveler apps/client/src/app/pages/account/account-page.html 45 @@ -3670,7 +3670,7 @@ Renew Plan - Renew Plan + Renouveler l'Abonnement apps/client/src/app/pages/pricing/pricing-page.html 348 @@ -3678,7 +3678,7 @@ Our official Ghostfolio Premium cloud offering is the easiest way to get started. Due to the time it saves, this will be the best option for most people. The revenue is used to cover the hosting infrastructure and to fund the ongoing development of Ghostfolio. - Our official Ghostfolio Premium cloud offering is the easiest way to get started. Due to the time it saves, this will be the best option for most people. The revenue is used to cover the hosting infrastructure and to fund the ongoing development of Ghostfolio. + Notre offre Ghostfolio Premium cloud est la manière la plus simple de débuter. Grâce au temps qu'elle économise, ce sera la meilleure option pour la plupart des gens. Les revenus sont utilisés pour couvrir les frais d'infrastructures et financer le développement continu de Ghostfolio. apps/client/src/app/pages/pricing/pricing-page.html 6,11 @@ -3686,7 +3686,7 @@ Impersonate User - Impersonate User + Voir en tant que... apps/client/src/app/components/admin-users/admin-users.html 121 @@ -3694,7 +3694,7 @@ Delete User - Delete User + Supprimer Utilisateur apps/client/src/app/components/admin-users/admin-users.html 129 @@ -3702,7 +3702,7 @@ Do you really want to delete all your activities? - Do you really want to delete all your activities? + Voulez-vous vraiment supprimer toutes vos activités ? apps/client/src/app/pages/portfolio/activities/activities-page.component.ts 143 @@ -3710,7 +3710,7 @@ By ETF Provider - By ETF Provider + Par Émetteur d'ETF apps/client/src/app/pages/portfolio/allocations/allocations-page.html 276 @@ -3718,7 +3718,7 @@ Delete all Activities - Delete all Activities + Supprimer toutes les Activités libs/ui/src/lib/activities-table/activities-table.component.html 62 @@ -3726,7 +3726,7 @@ Update platform - Update platform + Mettre à jour la Plateforme apps/client/src/app/components/admin-platform/create-or-update-platform-dialog/create-or-update-platform-dialog.html 2 @@ -3734,7 +3734,7 @@ Add platform - Add platform + Ajouter une Plateforme apps/client/src/app/components/admin-platform/create-or-update-platform-dialog/create-or-update-platform-dialog.html 3 @@ -3742,7 +3742,7 @@ Url - Url + Lien apps/client/src/app/components/admin-platform/admin-platform.component.html 50 @@ -3754,7 +3754,7 @@ Do you really want to delete this platform? - Do you really want to delete this platform? + Voulez-vous vraiment supprimer cette plateforme ? apps/client/src/app/components/admin-platform/admin-platform.component.ts 76 @@ -3762,7 +3762,7 @@ Platforms - Platforms + Platformes apps/client/src/app/components/admin-settings/admin-settings.component.html 4 @@ -3770,7 +3770,7 @@ Update Cash Balance - Update Cash Balance + Mettre à jour la Balance Cash apps/client/src/app/pages/portfolio/activities/create-or-update-activity-dialog/create-or-update-activity-dialog.html 41 @@ -3778,7 +3778,7 @@ By Platform - By Platform + Par Plateforme apps/client/src/app/pages/portfolio/allocations/allocations-page.html 42 @@ -3786,7 +3786,7 @@ Upgrade to Ghostfolio Premium today and gain access to exclusive features to enhance your investment experience: - Upgrade to Ghostfolio Premium today and gain access to exclusive features to enhance your investment experience: + Mettez à niveau vers Ghostfolio Premium aujourd'hui et gagnez accès à des fonctionnalités exclusives pour améliorer votre expérience d'investissement: apps/client/src/app/components/subscription-interstitial-dialog/subscription-interstitial-dialog.html 18,21 @@ -3794,7 +3794,7 @@ Get the tools to effectively manage your finances and refine your personal investment strategy. - Get the tools to effectively manage your finances and refine your personal investment strategy. + Obtenez les outils pour gérer efficacement vos finances et affinez votre stratégie d'investissement personnelle. apps/client/src/app/components/subscription-interstitial-dialog/subscription-interstitial-dialog.html 48,51 @@ -3802,7 +3802,7 @@ Add Platform - Add Platform + Ajoutez une Plateforme apps/client/src/app/components/admin-platform/admin-platform.component.html 11,13 @@ -3810,7 +3810,7 @@ Settings - Settings + Paramètres apps/client/src/app/pages/admin/admin-page-routing.module.ts 30 @@ -3822,7 +3822,7 @@ Equity - Equity + Capital apps/client/src/app/components/account-detail-dialog/account-detail-dialog.html 43 @@ -3830,7 +3830,7 @@ This activity already exists. - This activity already exists. + Cette activité existe déjà. libs/ui/src/lib/i18n.ts 14 @@ -3838,7 +3838,7 @@ Set as Benchmark - Set as Benchmark + Mettre comme Référence apps/client/src/app/components/admin-market-data/asset-profile-dialog/asset-profile-dialog.html 45 @@ -3846,7 +3846,7 @@ Manage Benchmarks - Manage Benchmarks + Gérer les Références apps/client/src/app/components/benchmark-comparator/benchmark-comparator.component.html 34 @@ -3854,7 +3854,7 @@ Select Holding - Select Holding + Selectionner Position apps/client/src/app/pages/portfolio/activities/import-activities-dialog/import-activities-dialog.html 20 @@ -3862,7 +3862,7 @@ Select File - Select File + Selectionner Fichier apps/client/src/app/pages/portfolio/activities/import-activities-dialog/import-activities-dialog.html 23 @@ -3870,7 +3870,7 @@ Select Dividends - Select Dividends + Selectionner Dividendes apps/client/src/app/pages/portfolio/activities/import-activities-dialog/import-activities-dialog.html 96 @@ -3878,7 +3878,7 @@ Select Activities - Select Activities + Selectionner Activités apps/client/src/app/pages/portfolio/activities/import-activities-dialog/import-activities-dialog.html 99 @@ -3886,7 +3886,7 @@ Import Activities - Import Activities + Importer Activités libs/ui/src/lib/activities-table/activities-table.component.html 16 @@ -3898,7 +3898,7 @@ Import Dividends - Import Dividends + Importer Dividendes libs/ui/src/lib/activities-table/activities-table.component.html 34 @@ -3910,7 +3910,7 @@ Personal Finance - Personal Finance + Finance Personnelle apps/client/src/app/app.component.html 67 @@ -3926,7 +3926,7 @@ Frequently Asked Questions (FAQ) - Frequently Asked Questions (FAQ) + Questions Fréquentes (FAQ) apps/client/src/app/app.component.html 87 @@ -3934,7 +3934,7 @@ Current Streak - Current Streak + Série en cours apps/client/src/app/pages/portfolio/analysis/analysis-page.html 187 @@ -3942,7 +3942,7 @@ Longest Streak - Longest Streak + Série la plus longue apps/client/src/app/pages/portfolio/analysis/analysis-page.html 196 @@ -3950,7 +3950,7 @@ Months - Months + Mois libs/ui/src/lib/i18n.ts 17 @@ -3958,7 +3958,7 @@ Years - Years + Années libs/ui/src/lib/i18n.ts 25 @@ -3966,7 +3966,7 @@ Month - Month + Mois libs/ui/src/lib/i18n.ts 16 @@ -3974,7 +3974,7 @@ Year - Year + Année libs/ui/src/lib/i18n.ts 24 From 91164433059486afa367d0eddc11d0a676af2aa5 Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Sat, 10 Jun 2023 12:01:13 +0200 Subject: [PATCH 2/9] Feature/support note in accounts (#2063) * Add support for a note in accounts * Update changelog --- CHANGELOG.md | 4 ++++ .../api/src/app/account/create-account.dto.ts | 9 +++++++ .../api/src/app/account/update-account.dto.ts | 9 +++++++ apps/api/src/app/export/export.service.ts | 1 + .../accounts-table.component.html | 24 +++++++++++++++++++ .../accounts-table.component.ts | 7 +++++- .../pages/accounts/accounts-page.component.ts | 3 +++ .../create-or-update-account-dialog.html | 13 ++++++++++ .../migration.sql | 2 ++ prisma/schema.prisma | 1 + 10 files changed, 72 insertions(+), 1 deletion(-) create mode 100644 prisma/migrations/20230610083653_added_comment_to_account/migration.sql diff --git a/CHANGELOG.md b/CHANGELOG.md index 1cdd9430f..fdd2cbea7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased +### Added + +- Supported a note for accounts + ### Changed - Improved the language localization for French (`fr`) diff --git a/apps/api/src/app/account/create-account.dto.ts b/apps/api/src/app/account/create-account.dto.ts index 6495fa518..c700e7fa9 100644 --- a/apps/api/src/app/account/create-account.dto.ts +++ b/apps/api/src/app/account/create-account.dto.ts @@ -1,4 +1,5 @@ import { AccountType } from '@prisma/client'; +import { Transform, TransformFnParams } from 'class-transformer'; import { IsBoolean, IsNumber, @@ -6,6 +7,7 @@ import { IsString, ValidateIf } from 'class-validator'; +import { isString } from 'lodash'; export class CreateAccountDto { @IsString() @@ -14,6 +16,13 @@ export class CreateAccountDto { @IsNumber() balance: number; + @IsOptional() + @IsString() + @Transform(({ value }: TransformFnParams) => + isString(value) ? value.trim() : value + ) + comment?: string; + @IsString() currency: string; diff --git a/apps/api/src/app/account/update-account.dto.ts b/apps/api/src/app/account/update-account.dto.ts index 0b5737607..d8c62aff7 100644 --- a/apps/api/src/app/account/update-account.dto.ts +++ b/apps/api/src/app/account/update-account.dto.ts @@ -1,4 +1,5 @@ import { AccountType } from '@prisma/client'; +import { Transform, TransformFnParams } from 'class-transformer'; import { IsBoolean, IsNumber, @@ -6,6 +7,7 @@ import { IsString, ValidateIf } from 'class-validator'; +import { isString } from 'lodash'; export class UpdateAccountDto { @IsString() @@ -14,6 +16,13 @@ export class UpdateAccountDto { @IsNumber() balance: number; + @IsOptional() + @IsString() + @Transform(({ value }: TransformFnParams) => + isString(value) ? value.trim() : value + ) + comment?: string; + @IsString() currency: string; diff --git a/apps/api/src/app/export/export.service.ts b/apps/api/src/app/export/export.service.ts index c8bd651a6..eaeea0f07 100644 --- a/apps/api/src/app/export/export.service.ts +++ b/apps/api/src/app/export/export.service.ts @@ -21,6 +21,7 @@ export class ExportService { select: { accountType: true, balance: true, + comment: true, currency: true, id: true, isExcluded: true, diff --git a/apps/client/src/app/components/accounts-table/accounts-table.component.html b/apps/client/src/app/components/accounts-table/accounts-table.component.html index 0ab9ea9af..0b859321f 100644 --- a/apps/client/src/app/components/accounts-table/accounts-table.component.html +++ b/apps/client/src/app/components/accounts-table/accounts-table.component.html @@ -207,6 +207,30 @@ + + + + + + + + diff --git a/apps/client/src/app/components/accounts-table/accounts-table.component.ts b/apps/client/src/app/components/accounts-table/accounts-table.component.ts index 8ec0f86fb..77b7b4d0f 100644 --- a/apps/client/src/app/components/accounts-table/accounts-table.component.ts +++ b/apps/client/src/app/components/accounts-table/accounts-table.component.ts @@ -58,7 +58,8 @@ export class AccountsTableComponent implements OnChanges, OnDestroy, OnInit { 'balance', 'value', 'currency', - 'valueInBaseCurrency' + 'valueInBaseCurrency', + 'comment' ]; if (this.showActions) { @@ -92,6 +93,10 @@ export class AccountsTableComponent implements OnChanges, OnDestroy, OnInit { }); } + public onOpenComment(aComment: string) { + alert(aComment); + } + public onUpdateAccount(aAccount: AccountModel) { this.accountToUpdate.emit(aAccount); } diff --git a/apps/client/src/app/pages/accounts/accounts-page.component.ts b/apps/client/src/app/pages/accounts/accounts-page.component.ts index dc1fa590e..96bd06816 100644 --- a/apps/client/src/app/pages/accounts/accounts-page.component.ts +++ b/apps/client/src/app/pages/accounts/accounts-page.component.ts @@ -153,6 +153,7 @@ export class AccountsPageComponent implements OnDestroy, OnInit { public openUpdateAccountDialog({ accountType, balance, + comment, currency, id, isExcluded, @@ -164,6 +165,7 @@ export class AccountsPageComponent implements OnDestroy, OnInit { account: { accountType, balance, + comment, currency, id, isExcluded, @@ -232,6 +234,7 @@ export class AccountsPageComponent implements OnDestroy, OnInit { account: { accountType: AccountType.SECURITIES, balance: 0, + comment: null, currency: this.user?.settings?.baseCurrency, isExcluded: false, name: null, diff --git a/apps/client/src/app/pages/accounts/create-or-update-account-dialog/create-or-update-account-dialog.html b/apps/client/src/app/pages/accounts/create-or-update-account-dialog/create-or-update-account-dialog.html index fca606d27..5413d08b3 100644 --- a/apps/client/src/app/pages/accounts/create-or-update-account-dialog/create-or-update-account-dialog.html +++ b/apps/client/src/app/pages/accounts/create-or-update-account-dialog/create-or-update-account-dialog.html @@ -50,6 +50,19 @@ +
+ + Note + + +
Date: Sat, 10 Jun 2023 12:01:26 +0200 Subject: [PATCH 3/9] Bugfix/handle value nullifcation for undefined object (#2064) * Handle undefined object * Update changelog --- CHANGELOG.md | 4 ++++ apps/api/src/helper/object.helper.ts | 8 +++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fdd2cbea7..a1a6f29fd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Improved the language localization for French (`fr`) +### Fixed + +- Fixed an issue with the value nullification related to the investment streaks + ## 1.278.0 - 2023-06-09 ### Changed diff --git a/apps/api/src/helper/object.helper.ts b/apps/api/src/helper/object.helper.ts index 6db53b0a1..50a4f2b12 100644 --- a/apps/api/src/helper/object.helper.ts +++ b/apps/api/src/helper/object.helper.ts @@ -16,9 +16,11 @@ export function hasNotDefinedValuesInObject(aObject: Object): boolean { export function nullifyValuesInObject(aObject: T, keys: string[]): T { const object = cloneDeep(aObject); - keys.forEach((key) => { - object[key] = null; - }); + if (object) { + keys.forEach((key) => { + object[key] = null; + }); + } return object; } From b4a126280fb17f7f54aaf544954750923972424c Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Sat, 10 Jun 2023 12:19:34 +0200 Subject: [PATCH 4/9] Bugfix/fix public page (#2065) * Check for user in request because of public page * Update changelog --- CHANGELOG.md | 1 + .../impersonation/impersonation.service.ts | 42 ++++++++++++------- 2 files changed, 29 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a1a6f29fd..10ab094f5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - Fixed an issue with the value nullification related to the investment streaks +- Fixed an issue in the public page related to the impersonation service ## 1.278.0 - 2023-06-09 diff --git a/apps/api/src/services/impersonation/impersonation.service.ts b/apps/api/src/services/impersonation/impersonation.service.ts index 3aace0788..e678356cb 100644 --- a/apps/api/src/services/impersonation/impersonation.service.ts +++ b/apps/api/src/services/impersonation/impersonation.service.ts @@ -12,22 +12,36 @@ export class ImpersonationService { ) {} public async validateImpersonationId(aId = '') { - const accessObject = await this.prismaService.access.findFirst({ - where: { - GranteeUser: { id: this.request.user.id }, - id: aId + if (this.request.user) { + const accessObject = await this.prismaService.access.findFirst({ + where: { + GranteeUser: { id: this.request.user.id }, + id: aId + } + }); + + if (accessObject?.userId) { + return accessObject.userId; + } else if ( + hasPermission( + this.request.user.permissions, + permissions.impersonateAllUsers + ) + ) { + return aId; } - }); + } else { + // Public access + const accessObject = await this.prismaService.access.findFirst({ + where: { + GranteeUser: null, + User: { id: aId } + } + }); - if (accessObject?.userId) { - return accessObject?.userId; - } else if ( - hasPermission( - this.request.user.permissions, - permissions.impersonateAllUsers - ) - ) { - return aId; + if (accessObject?.userId) { + return accessObject.userId; + } } return null; From 6f7e370fcaa963eafd1ec62843522756626c6827 Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Sat, 10 Jun 2023 12:21:11 +0200 Subject: [PATCH 5/9] Release 1.279.0 (#2066) --- CHANGELOG.md | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 10ab094f5..bb550c2fd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## Unreleased +## 1.279.0 - 2023-06-10 ### Added diff --git a/package.json b/package.json index b235a828a..3b19d5fd4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ghostfolio", - "version": "1.278.0", + "version": "1.279.0", "homepage": "https://ghostfol.io", "license": "AGPL-3.0", "scripts": { From 04eb452e043ea603a879dad0bb29a5f18f81eb61 Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Sat, 10 Jun 2023 16:16:27 +0200 Subject: [PATCH 6/9] Add missing guards (#2067) --- .../pages/portfolio/analysis/analysis-page.component.ts | 8 ++++---- .../portfolio-proportion-chart.component.ts | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts b/apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts index 0e493ec9c..a9ab22454 100644 --- a/apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts +++ b/apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts @@ -251,18 +251,18 @@ export class AnalysisPageComponent implements OnDestroy, OnInit { this.streaks = streaks; this.unitCurrentStreak = this.mode === 'year' - ? this.streaks.currentStreak === 1 + ? this.streaks?.currentStreak === 1 ? translate('YEAR') : translate('YEARS') - : this.streaks.currentStreak === 1 + : this.streaks?.currentStreak === 1 ? translate('MONTH') : translate('MONTHS'); this.unitLongestStreak = this.mode === 'year' - ? this.streaks.longestStreak === 1 + ? this.streaks?.longestStreak === 1 ? translate('YEAR') : translate('YEARS') - : this.streaks.longestStreak === 1 + : this.streaks?.longestStreak === 1 ? translate('MONTH') : translate('MONTHS'); diff --git a/libs/ui/src/lib/portfolio-proportion-chart/portfolio-proportion-chart.component.ts b/libs/ui/src/lib/portfolio-proportion-chart/portfolio-proportion-chart.component.ts index 452cd8f35..ec0a63eea 100644 --- a/libs/ui/src/lib/portfolio-proportion-chart/portfolio-proportion-chart.component.ts +++ b/libs/ui/src/lib/portfolio-proportion-chart/portfolio-proportion-chart.component.ts @@ -100,7 +100,7 @@ export class PortfolioProportionChartComponent }; Object.keys(this.positions).forEach((symbol) => { - if (this.positions[symbol][this.keys[0]].toUpperCase()) { + if (this.positions[symbol][this.keys[0]]?.toUpperCase()) { if (chartData[this.positions[symbol][this.keys[0]].toUpperCase()]) { chartData[this.positions[symbol][this.keys[0]].toUpperCase()].value = chartData[ From 7931e6950d5ef697448d2def7c6107c301bb6d29 Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Sat, 10 Jun 2023 16:17:11 +0200 Subject: [PATCH 7/9] Feature/add support for liabilities (#1789) * Add support for liabilities * Update changelog --- CHANGELOG.md | 6 +++ apps/api/src/app/order/order.service.ts | 13 ++++-- .../src/app/portfolio/portfolio.controller.ts | 1 + .../src/app/portfolio/portfolio.service.ts | 44 ++++++++++++++----- .../portfolio-summary.component.html | 20 +++++++++ ...ate-or-update-activity-dialog.component.ts | 27 ++++++++++++ .../create-or-update-activity-dialog.html | 13 +++++- .../interfaces/portfolio-summary.interface.ts | 1 + .../activities-table.component.html | 10 ++++- .../activities-table.component.scss | 4 ++ .../migration.sql | 2 + prisma/schema.prisma | 1 + 12 files changed, 124 insertions(+), 18 deletions(-) create mode 100644 prisma/migrations/20230614345544_added_liability_to_order_type/migration.sql diff --git a/CHANGELOG.md b/CHANGELOG.md index bb550c2fd..1311c54ce 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 + +### Added + +- Added support for liabilities + ## 1.279.0 - 2023-06-10 ### Added diff --git a/apps/api/src/app/order/order.service.ts b/apps/api/src/app/order/order.service.ts index 696f5442e..cc9718e7d 100644 --- a/apps/api/src/app/order/order.service.ts +++ b/apps/api/src/app/order/order.service.ts @@ -96,7 +96,7 @@ export class OrderService { const updateAccountBalance = data.updateAccountBalance ?? false; const userId = data.userId; - if (data.type === 'ITEM') { + if (data.type === 'ITEM' || data.type === 'LIABILITY') { const assetClass = data.assetClass; const assetSubClass = data.assetSubClass; currency = data.SymbolProfile.connectOrCreate.create.currency; @@ -129,7 +129,10 @@ export class OrderService { } }); - const isDraft = isAfter(data.date as Date, endOfToday()); + const isDraft = + data.type === 'LIABILITY' + ? false + : isAfter(data.date as Date, endOfToday()); if (!isDraft) { // Gather symbol data of order in the background, if not draft @@ -320,7 +323,11 @@ export class OrderService { }) ) .filter((order) => { - return withExcludedAccounts || order.Account?.isExcluded === false; + return ( + withExcludedAccounts || + !order.Account || + order.Account?.isExcluded === false + ); }) .map((order) => { const value = new Big(order.quantity).mul(order.unitPrice).toNumber(); diff --git a/apps/api/src/app/portfolio/portfolio.controller.ts b/apps/api/src/app/portfolio/portfolio.controller.ts index 1747936fd..06f841e12 100644 --- a/apps/api/src/app/portfolio/portfolio.controller.ts +++ b/apps/api/src/app/portfolio/portfolio.controller.ts @@ -162,6 +162,7 @@ export class PortfolioController { 'excludedAccountsAndActivities', 'fees', 'items', + 'liabilities', 'netWorth', 'totalBuy', 'totalSell' diff --git a/apps/api/src/app/portfolio/portfolio.service.ts b/apps/api/src/app/portfolio/portfolio.service.ts index aea522f40..66f3841a4 100644 --- a/apps/api/src/app/portfolio/portfolio.service.ts +++ b/apps/api/src/app/portfolio/portfolio.service.ts @@ -1302,12 +1302,11 @@ export class PortfolioService { }: { activities: OrderWithAccount[]; date?: Date; - userCurrency: string; }) { return activities .filter((activity) => { - // Filter out all activities before given date and type dividend + // Filter out all activities before given date (drafts) and type dividend return ( isBefore(date, new Date(activity.date)) && activity.type === TypeOfOrder.DIVIDEND @@ -1431,7 +1430,7 @@ export class PortfolioService { }) { return activities .filter((activity) => { - // Filter out all activities before given date + // Filter out all activities before given date (drafts) return isBefore(date, new Date(activity.date)); }) .map(({ fee, SymbolProfile }) => { @@ -1478,19 +1477,37 @@ export class PortfolioService { }; } - private getItems(orders: OrderWithAccount[], date = new Date(0)) { - return orders - .filter((order) => { - // Filter out all orders before given date and type item + private getItems(activities: OrderWithAccount[], date = new Date(0)) { + return activities + .filter((activity) => { + // Filter out all activities before given date (drafts) and type item return ( - isBefore(date, new Date(order.date)) && - order.type === TypeOfOrder.ITEM + isBefore(date, new Date(activity.date)) && + activity.type === TypeOfOrder.ITEM ); }) - .map((order) => { + .map(({ quantity, SymbolProfile, unitPrice }) => { return this.exchangeRateDataService.toCurrency( - new Big(order.quantity).mul(order.unitPrice).toNumber(), - order.SymbolProfile.currency, + new Big(quantity).mul(unitPrice).toNumber(), + SymbolProfile.currency, + this.request.user.Settings.settings.baseCurrency + ); + }) + .reduce( + (previous, current) => new Big(previous).plus(current), + new Big(0) + ); + } + + private getLiabilities(activities: OrderWithAccount[]) { + return activities + .filter(({ type }) => { + return type === TypeOfOrder.LIABILITY; + }) + .map(({ quantity, SymbolProfile, unitPrice }) => { + return this.exchangeRateDataService.toCurrency( + new Big(quantity).mul(unitPrice).toNumber(), + SymbolProfile.currency, this.request.user.Settings.settings.baseCurrency ); }) @@ -1601,6 +1618,7 @@ export class PortfolioService { const fees = this.getFees({ activities, userCurrency }).toNumber(); const firstOrderDate = activities[0]?.date; const items = this.getItems(activities).toNumber(); + const liabilities = this.getLiabilities(activities).toNumber(); const totalBuy = this.getTotalByType(activities, userCurrency, 'BUY'); const totalSell = this.getTotalByType(activities, userCurrency, 'SELL'); @@ -1633,6 +1651,7 @@ export class PortfolioService { .plus(performanceInformation.performance.currentValue) .plus(items) .plus(excludedAccountsAndActivities) + .minus(liabilities) .toNumber(); const daysInMarket = differenceInDays(new Date(), firstOrderDate); @@ -1659,6 +1678,7 @@ export class PortfolioService { fees, firstOrderDate, items, + liabilities, netWorth, totalBuy, totalSell, diff --git a/apps/client/src/app/components/portfolio-summary/portfolio-summary.component.html b/apps/client/src/app/components/portfolio-summary/portfolio-summary.component.html index 8b507f553..3ceadb048 100644 --- a/apps/client/src/app/components/portfolio-summary/portfolio-summary.component.html +++ b/apps/client/src/app/components/portfolio-summary/portfolio-summary.component.html @@ -194,6 +194,26 @@

+
+
Liabilities
+
+ - + +
+
+
+

+
Net Worth
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 4f7b8aa92..d9fdb3fe4 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 @@ -300,6 +300,33 @@ export class CreateOrUpdateActivityDialog implements OnDestroy { this.activityForm.controls['searchSymbol'].updateValueAndValidity(); this.activityForm.controls['updateAccountBalance'].disable(); this.activityForm.controls['updateAccountBalance'].setValue(false); + } else if (type === 'LIABILITY') { + this.activityForm.controls['accountId'].removeValidators( + Validators.required + ); + this.activityForm.controls['accountId'].updateValueAndValidity(); + this.activityForm.controls['currency'].setValue( + this.data.user.settings.baseCurrency + ); + this.activityForm.controls['currencyOfFee'].setValue( + this.data.user.settings.baseCurrency + ); + this.activityForm.controls['currencyOfUnitPrice'].setValue( + this.data.user.settings.baseCurrency + ); + this.activityForm.controls['dataSource'].removeValidators( + Validators.required + ); + this.activityForm.controls['dataSource'].updateValueAndValidity(); + this.activityForm.controls['name'].setValidators(Validators.required); + this.activityForm.controls['name'].updateValueAndValidity(); + this.activityForm.controls['quantity'].setValue(1); + this.activityForm.controls['searchSymbol'].removeValidators( + Validators.required + ); + this.activityForm.controls['searchSymbol'].updateValueAndValidity(); + this.activityForm.controls['updateAccountBalance'].disable(); + this.activityForm.controls['updateAccountBalance'].setValue(false); } else { this.activityForm.controls['accountId'].setValidators( Validators.required 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 33a2f4c73..85511f012 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 @@ -14,6 +14,7 @@ Buy Dividend Item + Liability Sell @@ -116,7 +117,10 @@
-
+
Quantity @@ -130,6 +134,7 @@ >Dividend Value + Value Unit Price @@ -177,6 +182,7 @@ >Dividend Value + Value Unit Price @@ -186,7 +192,10 @@ >
-
+
Fee diff --git a/libs/common/src/lib/interfaces/portfolio-summary.interface.ts b/libs/common/src/lib/interfaces/portfolio-summary.interface.ts index 97a50cfed..c520da9fb 100644 --- a/libs/common/src/lib/interfaces/portfolio-summary.interface.ts +++ b/libs/common/src/lib/interfaces/portfolio-summary.interface.ts @@ -10,6 +10,7 @@ export interface PortfolioSummary extends PortfolioPerformance { fees: number; firstOrderDate: Date; items: number; + liabilities: number; netWorth: number; ordersCount: number; totalBuy: number; 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 36d5e0c8f..5fa80124e 100644 --- a/libs/ui/src/lib/activities-table/activities-table.component.html +++ b/libs/ui/src/lib/activities-table/activities-table.component.html @@ -162,6 +162,7 @@ buy: element.type === 'BUY', dividend: element.type === 'DIVIDEND', item: element.type === 'ITEM', + liability: element.type === 'LIABILITY', sell: element.type === 'SELL' }" > @@ -173,6 +174,10 @@ *ngIf="element.type === 'ITEM'" name="cube-outline" > + diff --git a/libs/ui/src/lib/activities-table/activities-table.component.scss b/libs/ui/src/lib/activities-table/activities-table.component.scss index 270dfaf66..c74cc50ff 100644 --- a/libs/ui/src/lib/activities-table/activities-table.component.scss +++ b/libs/ui/src/lib/activities-table/activities-table.component.scss @@ -37,6 +37,10 @@ color: var(--purple); } + &.liability { + color: var(--red); + } + &.sell { color: var(--orange); } diff --git a/prisma/migrations/20230614345544_added_liability_to_order_type/migration.sql b/prisma/migrations/20230614345544_added_liability_to_order_type/migration.sql new file mode 100644 index 000000000..67daa4dc2 --- /dev/null +++ b/prisma/migrations/20230614345544_added_liability_to_order_type/migration.sql @@ -0,0 +1,2 @@ +-- AlterEnum +ALTER TYPE "Type" ADD VALUE 'LIABILITY'; diff --git a/prisma/schema.prisma b/prisma/schema.prisma index 2957ce7e5..712e71ca9 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -238,6 +238,7 @@ enum Type { BUY DIVIDEND ITEM + LIABILITY SELL } From be36050d7650dc5eaba72341e529eb8a21add7a2 Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Sat, 10 Jun 2023 17:18:28 +0200 Subject: [PATCH 8/9] Release 1.280.0 (#2068) --- CHANGELOG.md | 2 +- apps/api/src/app/import/import.service.ts | 2 +- apps/client/src/app/services/import-activities.service.ts | 2 ++ package.json | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1311c54ce..a86e8fd20 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## Unreleased +## 1.280.0 - 2023-06-10 ### Added diff --git a/apps/api/src/app/import/import.service.ts b/apps/api/src/app/import/import.service.ts index 3b45e3422..65611ce0d 100644 --- a/apps/api/src/app/import/import.service.ts +++ b/apps/api/src/app/import/import.service.ts @@ -202,7 +202,7 @@ export class ImportService { for (const activity of activitiesDto) { if (!activity.dataSource) { - if (activity.type === 'ITEM') { + if (activity.type === 'ITEM' || activity.type === 'LIABILITY') { activity.dataSource = DataSource.MANUAL; } else { activity.dataSource = diff --git a/apps/client/src/app/services/import-activities.service.ts b/apps/client/src/app/services/import-activities.service.ts index 8e4d93342..02eeb7e03 100644 --- a/apps/client/src/app/services/import-activities.service.ts +++ b/apps/client/src/app/services/import-activities.service.ts @@ -342,6 +342,8 @@ export class ImportActivitiesService { return Type.DIVIDEND; case 'item': return Type.ITEM; + case 'liability': + return Type.LIABILITY; case 'sell': return Type.SELL; default: diff --git a/package.json b/package.json index 3b19d5fd4..0a5462c1c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ghostfolio", - "version": "1.279.0", + "version": "1.280.0", "homepage": "https://ghostfol.io", "license": "AGPL-3.0", "scripts": { From 06dfb91f82be1bae86c04a992ebd98818c34894f Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Sat, 10 Jun 2023 21:41:39 +0200 Subject: [PATCH 9/9] Release 1.280.1 (#2069) --- CHANGELOG.md | 2 +- apps/api/src/app/order/order.service.ts | 4 ++-- .../ui/src/lib/activities-table/activities-table.component.ts | 3 ++- package.json | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a86e8fd20..ad60933ec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## 1.280.0 - 2023-06-10 +## 1.280.1 - 2023-06-10 ### Added diff --git a/apps/api/src/app/order/order.service.ts b/apps/api/src/app/order/order.service.ts index cc9718e7d..be5708a90 100644 --- a/apps/api/src/app/order/order.service.ts +++ b/apps/api/src/app/order/order.service.ts @@ -204,7 +204,7 @@ export class OrderService { where }); - if (order.type === 'ITEM') { + if (order.type === 'ITEM' || order.type === 'LIABILITY') { await this.symbolProfileService.deleteById(order.symbolProfileId); } @@ -375,7 +375,7 @@ export class OrderService { let isDraft = false; - if (data.type === 'ITEM') { + if (data.type === 'ITEM' || data.type === 'LIABILITY') { delete data.SymbolProfile.connect; } else { delete data.SymbolProfile.update; diff --git a/libs/ui/src/lib/activities-table/activities-table.component.ts b/libs/ui/src/lib/activities-table/activities-table.component.ts index 2797b035e..743747fb3 100644 --- a/libs/ui/src/lib/activities-table/activities-table.component.ts +++ b/libs/ui/src/lib/activities-table/activities-table.component.ts @@ -206,7 +206,8 @@ export class ActivitiesTableComponent implements OnChanges, OnDestroy, OnInit { } else if ( this.hasPermissionToOpenDetails && !activity.isDraft && - activity.type !== 'ITEM' + activity.type !== 'ITEM' && + activity.type !== 'LIABILITY' ) { this.onOpenPositionDialog({ dataSource: activity.SymbolProfile.dataSource, diff --git a/package.json b/package.json index 0a5462c1c..c328e2a1b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ghostfolio", - "version": "1.280.0", + "version": "1.280.1", "homepage": "https://ghostfol.io", "license": "AGPL-3.0", "scripts": {