Browse Source

Feature/improve loading state during filtering on allocations page (#2141)

* Improve loading state

* Update changelog
pull/2145/head
Thomas Kaul 2 years ago
committed by GitHub
parent
commit
92382e0b4d
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      CHANGELOG.md
  2. 13
      apps/client/src/app/pages/portfolio/allocations/allocations-page.component.ts

1
CHANGELOG.md

@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed ### Changed
- Improved the loading state during filtering on the allocations page
- Beautified the names with ampersand (`&`) in the asset profile - Beautified the names with ampersand (`&`) in the asset profile
## 1.287.0 - 2023-07-09 ## 1.287.0 - 2023-07-09

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

@ -139,6 +139,8 @@ export class AllocationsPageComponent implements OnDestroy, OnInit {
? $localize`Filter by account or tag...` ? $localize`Filter by account or tag...`
: ''; : '';
this.initialize();
return this.dataService.fetchPortfolioDetails({ return this.dataService.fetchPortfolioDetails({
filters: this.activeFilters filters: this.activeFilters
}); });
@ -146,6 +148,8 @@ export class AllocationsPageComponent implements OnDestroy, OnInit {
takeUntil(this.unsubscribeSubject) takeUntil(this.unsubscribeSubject)
) )
.subscribe((portfolioDetails) => { .subscribe((portfolioDetails) => {
this.initialize();
this.portfolioDetails = portfolioDetails; this.portfolioDetails = portfolioDetails;
this.initializeAnalysisData(); this.initializeAnalysisData();
@ -237,6 +241,13 @@ export class AllocationsPageComponent implements OnDestroy, OnInit {
} }
}; };
this.platforms = {}; this.platforms = {};
this.portfolioDetails = {
accounts: {},
filteredValueInPercentage: 0,
holdings: {},
platforms: {},
summary: undefined
};
this.positions = {}; this.positions = {};
this.sectors = { this.sectors = {
[UNKNOWN_KEY]: { [UNKNOWN_KEY]: {
@ -254,8 +265,6 @@ export class AllocationsPageComponent implements OnDestroy, OnInit {
} }
public initializeAnalysisData() { public initializeAnalysisData() {
this.initialize();
for (const [ for (const [
id, id,
{ name, valueInBaseCurrency, valueInPercentage } { name, valueInBaseCurrency, valueInPercentage }

Loading…
Cancel
Save