Browse Source

Feature/removed precious metals from the analysis data by continents, countries, sectors and markets

Co-authored-by: Copilot <copilot@github.com>
pull/6968/head
swissbuechi 1 week ago
parent
commit
19dcb50600
  1. 4
      CHANGELOG.md
  2. 5
      apps/api/src/app/portfolio/portfolio.service.ts
  3. 7
      apps/client/src/app/pages/portfolio/allocations/allocations-page.component.ts

4
CHANGELOG.md

@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## Unreleased ## Unreleased
### Removed
- Removed precious metals (Commodities) from the analysis data by continents, countries, sectors and markets.
### Added ### Added
- Added an automatic refresh every 30 seconds to the users table in the admin control panel - Added an automatic refresh every 30 seconds to the users table in the admin control panel

5
apps/api/src/app/portfolio/portfolio.service.ts

@ -1453,7 +1453,10 @@ export class PortfolioService {
for (const [, position] of Object.entries(holdings)) { for (const [, position] of Object.entries(holdings)) {
const value = position.valueInBaseCurrency; 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) { if (position.assetProfile.countries.length > 0) {
markets.developedMarkets.valueInBaseCurrency += markets.developedMarkets.valueInBaseCurrency +=
position.markets.developedMarkets * value; position.markets.developedMarkets * value;

7
apps/client/src/app/pages/portfolio/allocations/allocations-page.component.ts

@ -348,8 +348,11 @@ export class GfAllocationsPageComponent implements OnInit {
name: position.assetProfile.name name: position.assetProfile.name
}; };
if (position.assetProfile.assetClass !== AssetClass.LIQUIDITY) { if (
// Prepare analysis data by continents, countries, holdings and sectors except for liquidity 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) { if (position.assetProfile.countries.length > 0) {
for (const country of position.assetProfile.countries) { for (const country of position.assetProfile.countries) {

Loading…
Cancel
Save