Browse Source

Feature/add portfolio performance metrics to public page (#3793)

* Add portfolio performance metrics

* Update changelog
pull/3795/head
Thomas Kaul 2 weeks ago
committed by GitHub
parent
commit
7053aba2da
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 1
      CHANGELOG.md
  2. 56
      apps/client/src/app/pages/public/public-page.html
  3. 2
      libs/ui/src/lib/value/value.component.html

1
CHANGELOG.md

@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- Extended the _Public API_ with a new endpoint that provides portfolio performance metrics (experimental)
- Added the portfolio performance metrics to the public page
- Added a blog post: _Hacktoberfest 2024_
### Changed

56
apps/client/src/app/pages/public/public-page.html

@ -7,6 +7,62 @@
</h1>
</div>
</div>
<div class="row">
<div class="col-md-4">
<mat-card appearance="outlined" class="mb-3">
<mat-card-content>
<gf-value
i18n
size="large"
[colorizeSign]="true"
[isPercent]="true"
[precision]="2"
[value]="
publicPortfolioDetails?.performance?.['1d']?.relativeChange ??
undefined
"
>Today</gf-value
>
</mat-card-content>
</mat-card>
</div>
<div class="col-md-4">
<mat-card appearance="outlined" class="mb-3">
<mat-card-content>
<gf-value
i18n
size="large"
[colorizeSign]="true"
[isPercent]="true"
[precision]="2"
[value]="
publicPortfolioDetails?.performance?.['ytd']?.relativeChange ??
undefined
"
>This year</gf-value
>
</mat-card-content>
</mat-card>
</div>
<div class="col-md-4">
<mat-card appearance="outlined" class="mb-3">
<mat-card-content>
<gf-value
i18n
size="large"
[colorizeSign]="true"
[isPercent]="true"
[precision]="2"
[value]="
publicPortfolioDetails?.performance?.['max']?.relativeChange ??
undefined
"
>From the beginning</gf-value
>
</mat-card-content>
</mat-card>
</div>
</div>
<div class="proportion-charts row">
<div class="col-md-12 allocations-by-symbol">
<mat-card appearance="outlined" class="mb-3">

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

@ -5,7 +5,7 @@
<ng-template #label><ng-content></ng-content></ng-template>
<ng-container *ngIf="value || value === 0 || value === null">
<div
class="d-flex"
class="align-items-center d-flex"
[ngClass]="position === 'end' ? 'justify-content-end' : ''"
>
<ng-container *ngIf="isNumber || value === null">

Loading…
Cancel
Save