Browse Source

Move break down of performance to general availability

pull/3047/head
Thomas Kaul 2 years ago
parent
commit
410e802edd
  1. 4
      apps/api/src/app/portfolio/portfolio.controller.ts
  2. 29
      apps/client/src/app/pages/portfolio/analysis/analysis-page.html
  3. 11
      libs/ui/src/lib/value/value.component.html

4
apps/api/src/app/portfolio/portfolio.controller.ts

@ -425,6 +425,10 @@ export class PortfolioController {
return nullifyValuesInObject(item, ['totalInvestment', 'value']); return nullifyValuesInObject(item, ['totalInvestment', 'value']);
} }
); );
performanceInformation.performance = nullifyValuesInObject(
performanceInformation.performance,
['currentNetPerformance', 'currentNetPerformancePercent']
);
} }
return performanceInformation; return performanceInformation;

29
apps/client/src/app/pages/portfolio/analysis/analysis-page.html

@ -18,14 +18,20 @@
</div> </div>
</div> </div>
@if (user?.settings?.isExperimentalFeatures) {
<div class="mb-5 row"> <div class="mb-5 row">
<div class="col"> <div class="col">
<mat-card appearance="outlined" class="mb-3"> <mat-card appearance="outlined" class="mb-3">
<mat-card-content> <mat-card-content>
<div class="d-flex py-1"> <div class="d-flex py-1">
<div class="flex-grow-1 mr-2 text-truncate" i18n> <div
Absolute Asset Performance class="align-items-center d-flex flex-grow-1 mr-2 text-truncate"
i18n
>
<span>Absolute Asset Performance</span>
<gf-premium-indicator
*ngIf="user?.subscription?.type === 'Basic'"
class="ml-1"
/>
</div> </div>
<div class="d-flex justify-content-end"> <div class="d-flex justify-content-end">
<gf-value <gf-value
@ -62,8 +68,15 @@
</div> </div>
</div> </div>
<div class="d-flex py-1"> <div class="d-flex py-1">
<div class="flex-grow-1 mr-2 text-truncate" i18n> <div
Absolute Currency Performance class="align-items-center d-flex flex-grow-1 mr-2 text-truncate"
i18n
>
<span>Absolute Currency Performance</span>
<gf-premium-indicator
*ngIf="user?.subscription?.type === 'Basic'"
class="ml-1"
/>
</div> </div>
<div class="d-flex justify-content-end"> <div class="d-flex justify-content-end">
<gf-value <gf-value
@ -75,8 +88,7 @@
[value]=" [value]="
isLoadingInvestmentChart isLoadingInvestmentChart
? undefined ? undefined
: performance?.currentNetPerformanceWithCurrencyEffect === : performance?.currentNetPerformance === null
null
? null ? null
: performance?.currentNetPerformanceWithCurrencyEffect - : performance?.currentNetPerformanceWithCurrencyEffect -
performance?.currentNetPerformance performance?.currentNetPerformance
@ -98,6 +110,8 @@
[value]=" [value]="
isLoadingInvestmentChart isLoadingInvestmentChart
? undefined ? undefined
: performance?.currentNetPerformancePercent === null
? null
: performance?.currentNetPerformancePercentWithCurrencyEffect - : performance?.currentNetPerformancePercentWithCurrencyEffect -
performance?.currentNetPerformancePercent performance?.currentNetPerformancePercent
" "
@ -147,7 +161,6 @@
</mat-card> </mat-card>
</div> </div>
</div> </div>
}
<div class="mb-5 row"> <div class="mb-5 row">
<div class="col-md-6"> <div class="col-md-6">

11
libs/ui/src/lib/value/value.component.html

@ -21,7 +21,11 @@
h4: size === 'medium' h4: size === 'medium'
}" }"
> >
@if (value === null) {
<span class="text-monospace text-muted">*****</span>%
} @else {
{{ formattedValue }}% {{ formattedValue }}%
}
</div> </div>
<div <div
*ngIf="!isPercent" *ngIf="!isPercent"
@ -31,12 +35,11 @@
h4: size === 'medium' h4: size === 'medium'
}" }"
> >
<ng-container *ngIf="value === null"> @if (value === null) {
<span class="text-monospace text-muted">*****</span> <span class="text-monospace text-muted">*****</span>
</ng-container> } @else {
<ng-container *ngIf="value !== null">
{{ formattedValue }} {{ formattedValue }}
</ng-container> }
</div> </div>
<small *ngIf="unit && size === 'medium'" class="ml-1"> <small *ngIf="unit && size === 'medium'" class="ml-1">
{{ unit }} {{ unit }}

Loading…
Cancel
Save