Browse Source

Integrate isAllTimeHigh and isAllTimeLow

pull/428/head
Thomas 4 years ago
parent
commit
70b94c01a9
  1. 4
      apps/client/src/app/components/portfolio-performance/portfolio-performance.component.html
  2. 2
      apps/client/src/app/components/portfolio-performance/portfolio-performance.component.ts
  3. 4
      apps/client/src/app/pages/home/home-page.component.ts
  4. 2
      apps/client/src/app/pages/home/home-page.html
  5. 4
      apps/client/src/app/pages/zen/zen-page.component.ts
  6. 2
      apps/client/src/app/pages/zen/zen-page.html

4
apps/client/src/app/components/portfolio-performance/portfolio-performance.component.html

@ -2,8 +2,8 @@
<div <div
class="row no-gutters" class="row no-gutters"
[ngClass]="{ [ngClass]="{
'text-success': performance?.isAllTimeHigh, 'text-danger': isAllTimeLow,
'text-danger': performance?.isAllTimeLow 'text-success': isAllTimeHigh
}" }"
> >
<div class="flex-grow-1"></div> <div class="flex-grow-1"></div>

2
apps/client/src/app/components/portfolio-performance/portfolio-performance.component.ts

@ -19,6 +19,8 @@ import { isNumber } from 'lodash';
}) })
export class PortfolioPerformanceComponent implements OnChanges, OnInit { export class PortfolioPerformanceComponent implements OnChanges, OnInit {
@Input() baseCurrency: string; @Input() baseCurrency: string;
@Input() isAllTimeHigh: boolean;
@Input() isAllTimeLow: boolean;
@Input() isLoading: boolean; @Input() isLoading: boolean;
@Input() locale: string; @Input() locale: string;
@Input() performance: PortfolioPerformance; @Input() performance: PortfolioPerformance;

4
apps/client/src/app/pages/home/home-page.component.ts

@ -55,6 +55,8 @@ export class HomePageComponent implements OnDestroy, OnInit {
]; ];
public deviceType: string; public deviceType: string;
public fearAndGreedIndex: number; public fearAndGreedIndex: number;
public isAllTimeHigh: boolean;
public isAllTimeLow: boolean;
public hasImpersonationId: boolean; public hasImpersonationId: boolean;
public hasPermissionToAccessFearAndGreedIndex: boolean; public hasPermissionToAccessFearAndGreedIndex: boolean;
public hasPermissionToCreateOrder: boolean; public hasPermissionToCreateOrder: boolean;
@ -172,6 +174,8 @@ export class HomePageComponent implements OnDestroy, OnInit {
value: chartDataItem.value value: chartDataItem.value
}; };
}); });
this.isAllTimeHigh = chartData.isAllTimeHigh;
this.isAllTimeLow = chartData.isAllTimeLow;
this.changeDetectorRef.markForCheck(); this.changeDetectorRef.markForCheck();
}); });

2
apps/client/src/app/pages/home/home-page.html

@ -54,6 +54,8 @@
<gf-portfolio-performance <gf-portfolio-performance
class="pb-4" class="pb-4"
[baseCurrency]="user?.settings?.baseCurrency" [baseCurrency]="user?.settings?.baseCurrency"
[isAllTimeHigh]="isAllTimeHigh"
[isAllTimeLow]="isAllTimeLow"
[isLoading]="isLoadingPerformance" [isLoading]="isLoadingPerformance"
[locale]="user?.settings?.locale" [locale]="user?.settings?.locale"
[performance]="performance" [performance]="performance"

4
apps/client/src/app/pages/zen/zen-page.component.ts

@ -39,6 +39,8 @@ export class ZenPageComponent implements AfterViewInit, OnDestroy, OnInit {
public hasImpersonationId: boolean; public hasImpersonationId: boolean;
public hasPermissionToCreateOrder: boolean; public hasPermissionToCreateOrder: boolean;
public historicalDataItems: LineChartItem[]; public historicalDataItems: LineChartItem[];
public isAllTimeHigh: boolean;
public isAllTimeLow: boolean;
public isLoadingPerformance = true; public isLoadingPerformance = true;
public performance: PortfolioPerformance; public performance: PortfolioPerformance;
public positions: Position[]; public positions: Position[];
@ -120,6 +122,8 @@ export class ZenPageComponent implements AfterViewInit, OnDestroy, OnInit {
value: chartDataItem.value value: chartDataItem.value
}; };
}); });
this.isAllTimeHigh = chartData.isAllTimeHigh;
this.isAllTimeLow = chartData.isAllTimeLow;
this.changeDetectorRef.markForCheck(); this.changeDetectorRef.markForCheck();
}); });

2
apps/client/src/app/pages/zen/zen-page.html

@ -47,6 +47,8 @@
<gf-portfolio-performance <gf-portfolio-performance
class="pb-4" class="pb-4"
[baseCurrency]="user?.settings?.baseCurrency" [baseCurrency]="user?.settings?.baseCurrency"
[isAllTimeHigh]="isAllTimeHigh"
[isAllTimeLow]="isAllTimeLow"
[isLoading]="isLoadingPerformance" [isLoading]="isLoadingPerformance"
[locale]="user?.settings?.locale" [locale]="user?.settings?.locale"
[performance]="performance" [performance]="performance"

Loading…
Cancel
Save