Feature/hide irrelevant errors in client (#1623)

* Hide irrelevant errors in client

* Update changelog
This commit is contained in:
Thomas Kaul
2023-01-21 11:30:53 +01:00
committed by GitHub
parent 271001f523
commit 6cd51fb044
7 changed files with 30 additions and 40 deletions

View File

@@ -110,13 +110,12 @@ export class HomeOverviewComponent implements OnDestroy, OnInit {
range: this.user?.settings?.dateRange
})
.pipe(takeUntil(this.unsubscribeSubject))
.subscribe((response) => {
this.errors = response.errors;
this.hasError = response.hasErrors;
this.performance = response.performance;
.subscribe(({ chart, errors, performance }) => {
this.errors = errors;
this.performance = performance;
this.isLoadingPerformance = false;
this.historicalDataItems = response.chart.map(
this.historicalDataItems = chart.map(
({ date, netPerformanceInPercentage }) => {
return {
date,

View File

@@ -37,7 +37,6 @@
[baseCurrency]="user?.settings?.baseCurrency"
[deviceType]="deviceType"
[errors]="errors"
[hasError]="hasError"
[isAllTimeHigh]="isAllTimeHigh"
[isAllTimeLow]="isAllTimeLow"
[isLoading]="isLoadingPerformance"

View File

@@ -3,14 +3,14 @@
<div
class="flex-grow-1 status text-muted text-right"
[title]="
hasError && !isLoading
errors?.length > 0 && !isLoading
? 'Sorry! Our data provider partner is experiencing the hiccups.'
: ''
"
(click)="errors?.length > 0 && onShowErrors()"
>
<ion-icon
*ngIf="hasError && !isLoading"
*ngIf="errors?.length > 0 && !isLoading"
name="alert-circle-outline"
></ion-icon>
</div>

View File

@@ -28,7 +28,6 @@ export class PortfolioPerformanceComponent implements OnChanges, OnInit {
@Input() baseCurrency: string;
@Input() deviceType: string;
@Input() errors: ResponseError['errors'];
@Input() hasError: boolean;
@Input() isAllTimeHigh: boolean;
@Input() isAllTimeLow: boolean;
@Input() isLoading: boolean;