Browse Source

Accentuate all time high and all time low

pull/428/head
Thomas 4 years ago
parent
commit
2b631d6e6b
  1. 8
      apps/api/src/app/portfolio/portfolio.service.ts
  2. 10
      apps/client/src/app/components/portfolio-performance/portfolio-performance.component.html
  3. 2
      libs/common/src/lib/interfaces/portfolio-performance.interface.ts

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

@ -639,7 +639,9 @@ export class PortfolioService {
currentGrossPerformancePercent: 0,
currentNetPerformance: 0,
currentNetPerformancePercent: 0,
currentValue: 0
currentValue: 0,
isAllTimeHigh: false,
isAllTimeLow: false
}
};
}
@ -672,7 +674,9 @@ export class PortfolioService {
currentGrossPerformancePercent,
currentNetPerformance,
currentNetPerformancePercent,
currentValue
currentValue,
isAllTimeHigh: true, // TODO
isAllTimeLow: false // TODO
}
};
}

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

@ -1,5 +1,11 @@
<div class="container p-0">
<div class="row no-gutters">
<div
class="row no-gutters"
[ngClass]="{
'text-success': performance?.isAllTimeHigh,
'text-danger': performance?.isAllTimeLow
}"
>
<div class="flex-grow-1"></div>
<div *ngIf="isLoading" class="align-items-center d-flex">
<ngx-skeleton-loader
@ -12,8 +18,8 @@
></ngx-skeleton-loader>
</div>
<div
[hidden]="isLoading"
class="display-4 font-weight-bold m-0 text-center value-container"
[hidden]="isLoading"
>
<span #value id="value"></span>
</div>

2
libs/common/src/lib/interfaces/portfolio-performance.interface.ts

@ -5,4 +5,6 @@ export interface PortfolioPerformance {
currentNetPerformance: number;
currentNetPerformancePercent: number;
currentValue: number;
isAllTimeHigh: boolean;
isAllTimeLow: boolean;
}

Loading…
Cancel
Save