Thomas Kaul
12 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with
20 additions and
11 deletions
-
apps/client/src/app/pages/portfolio/fire/fire-page.component.ts
-
apps/client/src/app/pages/portfolio/fire/fire-page.html
-
libs/ui/src/lib/fire-calculator/fire-calculator.component.scss
|
@ -48,11 +48,9 @@ export class FirePageComponent implements OnDestroy, OnInit { |
|
|
.fetchPortfolioDetails() |
|
|
.fetchPortfolioDetails() |
|
|
.pipe(takeUntil(this.unsubscribeSubject)) |
|
|
.pipe(takeUntil(this.unsubscribeSubject)) |
|
|
.subscribe(({ summary }) => { |
|
|
.subscribe(({ summary }) => { |
|
|
if (summary.cash === null || summary.currentValue === null) { |
|
|
this.fireWealth = summary.fireWealth |
|
|
return; |
|
|
? new Big(summary.fireWealth) |
|
|
} |
|
|
: new Big(10000); |
|
|
|
|
|
|
|
|
this.fireWealth = new Big(summary.fireWealth); |
|
|
|
|
|
this.withdrawalRatePerYear = this.fireWealth.mul(4).div(100); |
|
|
this.withdrawalRatePerYear = this.fireWealth.mul(4).div(100); |
|
|
this.withdrawalRatePerMonth = this.withdrawalRatePerYear.div(12); |
|
|
this.withdrawalRatePerMonth = this.withdrawalRatePerYear.div(12); |
|
|
|
|
|
|
|
@ -94,7 +92,10 @@ export class FirePageComponent implements OnDestroy, OnInit { |
|
|
permissions.createOrder |
|
|
permissions.createOrder |
|
|
); |
|
|
); |
|
|
|
|
|
|
|
|
this.hasPermissionToUpdateUserSettings = hasPermission( |
|
|
this.hasPermissionToUpdateUserSettings = |
|
|
|
|
|
this.user.subscription?.type === 'Basic' |
|
|
|
|
|
? false |
|
|
|
|
|
: hasPermission( |
|
|
this.user.permissions, |
|
|
this.user.permissions, |
|
|
permissions.updateUserSettings |
|
|
permissions.updateUserSettings |
|
|
); |
|
|
); |
|
|
|
@ -18,6 +18,10 @@ |
|
|
[fireWealth]="fireWealth?.toNumber()" |
|
|
[fireWealth]="fireWealth?.toNumber()" |
|
|
[hasPermissionToUpdateUserSettings]="!hasImpersonationId && hasPermissionToUpdateUserSettings" |
|
|
[hasPermissionToUpdateUserSettings]="!hasImpersonationId && hasPermissionToUpdateUserSettings" |
|
|
[locale]="user?.settings?.locale" |
|
|
[locale]="user?.settings?.locale" |
|
|
|
|
|
[ngStyle]="{ |
|
|
|
|
|
opacity: user?.subscription?.type === 'Basic' ? '0.67' : 'initial', |
|
|
|
|
|
'pointer-events': user?.subscription?.type === 'Basic' ? 'none' : 'initial' |
|
|
|
|
|
}" |
|
|
[projectedTotalAmount]="user?.settings?.projectedTotalAmount" |
|
|
[projectedTotalAmount]="user?.settings?.projectedTotalAmount" |
|
|
[retirementDate]="user?.settings?.retirementDate" |
|
|
[retirementDate]="user?.settings?.retirementDate" |
|
|
[savingsRate]="user?.settings?.savingsRate" |
|
|
[savingsRate]="user?.settings?.savingsRate" |
|
@ -54,7 +58,11 @@ |
|
|
}" |
|
|
}" |
|
|
/> |
|
|
/> |
|
|
</div> |
|
|
</div> |
|
|
<div *ngIf="!isLoading" i18n> |
|
|
<div |
|
|
|
|
|
*ngIf="!isLoading" |
|
|
|
|
|
i18n |
|
|
|
|
|
[ngClass]="{ 'text-muted': user?.subscription?.type === 'Basic' }" |
|
|
|
|
|
> |
|
|
If you retire today, you would be able to withdraw |
|
|
If you retire today, you would be able to withdraw |
|
|
<span class="font-weight-bold" |
|
|
<span class="font-weight-bold" |
|
|
><gf-value |
|
|
><gf-value |
|
|
|
@ -13,7 +13,7 @@ |
|
|
.mdc-text-field--disabled { |
|
|
.mdc-text-field--disabled { |
|
|
.mdc-floating-label, |
|
|
.mdc-floating-label, |
|
|
.mdc-text-field__input { |
|
|
.mdc-text-field__input { |
|
|
color: inherit; |
|
|
color: inherit !important; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.mdc-notched-outline__leading, |
|
|
.mdc-notched-outline__leading, |
|
|