From 19dcb50600ed297ecdd9dc9c067372e9dfb82e03 Mon Sep 17 00:00:00 2001 From: swissbuechi <24353767+swissbuechi@users.noreply.github.com> Date: Sun, 31 May 2026 13:46:31 +0200 Subject: [PATCH] Feature/removed precious metals from the analysis data by continents, countries, sectors and markets Co-authored-by: Copilot --- CHANGELOG.md | 4 ++++ apps/api/src/app/portfolio/portfolio.service.ts | 5 ++++- .../portfolio/allocations/allocations-page.component.ts | 7 +++++-- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b9b9f118d..c6d46363e 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 +### Removed + +- Removed precious metals (Commodities) from the analysis data by continents, countries, sectors and markets. + ### Added - Added an automatic refresh every 30 seconds to the users table in the admin control panel diff --git a/apps/api/src/app/portfolio/portfolio.service.ts b/apps/api/src/app/portfolio/portfolio.service.ts index 4feb0f77a..1fab002f3 100644 --- a/apps/api/src/app/portfolio/portfolio.service.ts +++ b/apps/api/src/app/portfolio/portfolio.service.ts @@ -1453,7 +1453,10 @@ export class PortfolioService { for (const [, position] of Object.entries(holdings)) { const value = position.valueInBaseCurrency; - if (position.assetProfile.assetClass !== AssetClass.LIQUIDITY) { + if ( + position.assetProfile.assetClass !== AssetClass.LIQUIDITY && + position.assetProfile.assetSubClass !== AssetClass.COMMODITY + ) { if (position.assetProfile.countries.length > 0) { markets.developedMarkets.valueInBaseCurrency += position.markets.developedMarkets * value; diff --git a/apps/client/src/app/pages/portfolio/allocations/allocations-page.component.ts b/apps/client/src/app/pages/portfolio/allocations/allocations-page.component.ts index f48b551bb..9cf270d86 100644 --- a/apps/client/src/app/pages/portfolio/allocations/allocations-page.component.ts +++ b/apps/client/src/app/pages/portfolio/allocations/allocations-page.component.ts @@ -348,8 +348,11 @@ export class GfAllocationsPageComponent implements OnInit { name: position.assetProfile.name }; - if (position.assetProfile.assetClass !== AssetClass.LIQUIDITY) { - // Prepare analysis data by continents, countries, holdings and sectors except for liquidity + if ( + position.assetProfile.assetClass !== AssetClass.LIQUIDITY && + position.assetProfile.assetSubClass !== AssetClass.COMMODITY + ) { + // Prepare analysis data by continents, countries, holdings and sectors except for liquidity and commodity if (position.assetProfile.countries.length > 0) { for (const country of position.assetProfile.countries) {