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']);
}
);
performanceInformation.performance = nullifyValuesInObject(
performanceInformation.performance,
['currentNetPerformance', 'currentNetPerformancePercent']
);
}
return performanceInformation;

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

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

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

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

Loading…
Cancel
Save