Browse Source

Implement ROI portfolio calculator

Thomas Kaul 2 weeks ago
parent
commit
94c0d150d6
  1. 37
      apps/client/src/app/components/portfolio-summary/portfolio-summary.component.html
  2. 37
      apps/client/src/app/pages/portfolio/analysis/analysis-page.html

37
apps/client/src/app/components/portfolio-summary/portfolio-summary.component.html

@ -149,26 +149,23 @@
<div class="flex-nowrap px-3 py-1 row"> <div class="flex-nowrap px-3 py-1 row">
<div class="flex-grow-1 indent-1 text-truncate"> <div class="flex-grow-1 indent-1 text-truncate">
<ng-container i18n>Net Performance</ng-container> <ng-container i18n>Net Performance</ng-container>
@if ( @switch (user?.settings?.performanceCalculationType) {
user?.settings?.performanceCalculationType === @case (PerformanceCalculationType.ROAI) {
PerformanceCalculationType.ROAI <abbr
) { class="d-none d-sm-inline-block initialism ml-2 text-muted"
<abbr i18n-title
class="d-none d-sm-inline-block initialism ml-2 text-muted" title="Return on Average Investment (total return with dividends)"
i18n-title >(ROAI)</abbr
title="Return on Average Investment (total return with dividends)" >
>(ROAI)</abbr }
> @case (PerformanceCalculationType.ROI) {
} @else if ( <abbr
user?.settings?.performanceCalculationType === class="d-none d-sm-inline-block initialism ml-2 text-muted"
PerformanceCalculationType.ROI i18n-title
) { title="Return on Investment (total return with dividends)"
<abbr >(ROI)</abbr
class="d-none d-sm-inline-block initialism ml-2 text-muted" >
i18n-title }
title="Return on Investment (total return with dividends)"
>(ROI)</abbr
>
} }
</div> </div>
<div class="flex-column flex-wrap justify-content-end"> <div class="flex-column flex-wrap justify-content-end">

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

@ -254,26 +254,23 @@
<div class="d-flex ml-3 py-1"> <div class="d-flex ml-3 py-1">
<div class="flex-grow-1 mr-2 text-truncate"> <div class="flex-grow-1 mr-2 text-truncate">
<ng-container i18n>Net Performance</ng-container> <ng-container i18n>Net Performance</ng-container>
@if ( @switch (user?.settings?.performanceCalculationType) {
user?.settings?.performanceCalculationType === @case (PerformanceCalculationType.ROAI) {
PerformanceCalculationType.ROAI <abbr
) { class="d-none d-sm-inline-block initialism ml-2 text-muted"
<abbr i18n-title
class="d-none d-sm-inline-block initialism ml-2 text-muted" title="Return on Average Investment (total return with dividends)"
i18n-title >(ROAI)</abbr
title="Return on Average Investment (total return with dividends)" >
>(ROAI)</abbr }
> @case (PerformanceCalculationType.ROI) {
} @else if ( <abbr
user?.settings?.performanceCalculationType === class="d-none d-sm-inline-block initialism ml-2 text-muted"
PerformanceCalculationType.ROI i18n-title
) { title="Return on Investment (total return with dividends)"
<abbr >(ROI)</abbr
class="d-none d-sm-inline-block initialism ml-2 text-muted" >
i18n-title }
title="Return on Investment (total return with dividends)"
>(ROI)</abbr
>
} }
</div> </div>
<div class="d-flex justify-content-end"> <div class="d-flex justify-content-end">

Loading…
Cancel
Save