Browse Source
Verify current benchmark before loading it (#2541)
* Verify current benchmark before loading it
* Update changelog
---------
Co-authored-by: Thomas <4159106+dtslvr@users.noreply.github.com>
pull/2543/head
Basim Mohammed
1 year ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with
26 additions and
24 deletions
-
CHANGELOG.md
-
apps/client/src/app/pages/portfolio/analysis/analysis-page.component.ts
-
apps/client/src/app/pages/portfolio/analysis/analysis-page.html
|
|
@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 |
|
|
|
### Fixed |
|
|
|
|
|
|
|
- Fixed the chart in the account detail dialog for accounts excluded from analysis |
|
|
|
- Verified the current benchmark before loading it on the analysis page |
|
|
|
|
|
|
|
## 2.14.0 - 2023-10-21 |
|
|
|
|
|
|
|
|
|
@ -309,7 +309,6 @@ export class AnalysisPageComponent implements OnDestroy, OnInit { |
|
|
|
} |
|
|
|
|
|
|
|
private update() { |
|
|
|
this.isLoadingBenchmarkComparator = true; |
|
|
|
this.isLoadingInvestmentChart = true; |
|
|
|
|
|
|
|
this.dataService |
|
|
@ -385,12 +384,17 @@ export class AnalysisPageComponent implements OnDestroy, OnInit { |
|
|
|
} |
|
|
|
|
|
|
|
private updateBenchmarkDataItems() { |
|
|
|
this.benchmarkDataItems = []; |
|
|
|
|
|
|
|
if (this.user.settings.benchmark) { |
|
|
|
const { dataSource, symbol } = |
|
|
|
this.benchmarks.find(({ id }) => { |
|
|
|
return id === this.user.settings.benchmark; |
|
|
|
}) ?? {}; |
|
|
|
|
|
|
|
if (dataSource && symbol) { |
|
|
|
this.isLoadingBenchmarkComparator = true; |
|
|
|
|
|
|
|
this.dataService |
|
|
|
.fetchBenchmarkBySymbol({ |
|
|
|
dataSource, |
|
|
@ -410,10 +414,7 @@ export class AnalysisPageComponent implements OnDestroy, OnInit { |
|
|
|
|
|
|
|
this.changeDetectorRef.markForCheck(); |
|
|
|
}); |
|
|
|
} else { |
|
|
|
this.benchmarkDataItems = []; |
|
|
|
|
|
|
|
this.isLoadingBenchmarkComparator = false; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
@ -3,7 +3,7 @@ |
|
|
|
<div *ngIf="user?.settings?.viewMode !== 'ZEN'" class="my-4 text-center"> |
|
|
|
<gf-toggle |
|
|
|
[defaultValue]="user?.settings?.dateRange" |
|
|
|
[isLoading]="isLoadingBenchmarkComparator" |
|
|
|
[isLoading]="isLoadingBenchmarkComparator || isLoadingInvestmentChart" |
|
|
|
[options]="dateRangeOptions" |
|
|
|
(change)="onChangeDateRange($event.value)" |
|
|
|
></gf-toggle> |
|
|
@ -23,7 +23,7 @@ |
|
|
|
[benchmarks]="benchmarks" |
|
|
|
[colorScheme]="user?.settings?.colorScheme" |
|
|
|
[daysInMarket]="daysInMarket" |
|
|
|
[isLoading]="isLoadingBenchmarkComparator" |
|
|
|
[isLoading]="isLoadingBenchmarkComparator || isLoadingInvestmentChart" |
|
|
|
[locale]="user?.settings?.locale" |
|
|
|
[performanceDataItems]="performanceDataItemsInPercentage" |
|
|
|
[user]="user" |
|
|
@ -149,7 +149,7 @@ |
|
|
|
[daysInMarket]="daysInMarket" |
|
|
|
[historicalDataItems]="performanceDataItems" |
|
|
|
[isInPercent]="hasImpersonationId || user.settings.isRestrictedView" |
|
|
|
[isLoading]="isLoadingBenchmarkComparator" |
|
|
|
[isLoading]="isLoadingInvestmentChart" |
|
|
|
[locale]="user?.settings?.locale" |
|
|
|
[range]="user?.settings?.dateRange" |
|
|
|
></gf-investment-chart> |
|
|
|