Browse Source

chore(fire): Small fixes based on PR comments

pull/1748/head
Robbert Coeckelbergh 3 years ago
committed by Thomas
parent
commit
29d9abf56f
  1. 1
      apps/client/src/app/pages/portfolio/fire/fire-page.component.ts
  2. 8
      libs/ui/src/lib/fire-calculator/fire-calculator.component.ts
  3. 4
      libs/ui/src/lib/fire-calculator/fire-calculator.service.spec.ts

1
apps/client/src/app/pages/portfolio/fire/fire-page.component.ts

@ -39,6 +39,7 @@ export class FirePageComponent implements OnDestroy, OnInit {
public ngOnInit() { public ngOnInit() {
this.isLoading = true; this.isLoading = true;
this.deviceType = this.deviceService.getDeviceInfo().deviceType; this.deviceType = this.deviceService.getDeviceInfo().deviceType;
this.dataService this.dataService
.fetchPortfolioDetails({}) .fetchPortfolioDetails({})
.pipe(takeUntil(this.unsubscribeSubject)) .pipe(takeUntil(this.unsubscribeSubject))

8
libs/ui/src/lib/fire-calculator/fire-calculator.component.ts

@ -62,8 +62,8 @@ export class FireCalculatorComponent
annualInterestRate: new FormControl<number>(undefined), annualInterestRate: new FormControl<number>(undefined),
paymentPerPeriod: new FormControl<number>(undefined), paymentPerPeriod: new FormControl<number>(undefined),
principalInvestmentAmount: new FormControl<number>(undefined), principalInvestmentAmount: new FormControl<number>(undefined),
time: new FormControl<number>(undefined), retirementNetWorth: new FormControl<number>(undefined),
retirementNetWorth: new FormControl<number>(undefined) time: new FormControl<number>(undefined)
}); });
public chart: Chart<'bar'>; public chart: Chart<'bar'>;
public isLoading = true; public isLoading = true;
@ -91,8 +91,8 @@ export class FireCalculatorComponent
annualInterestRate: 5, annualInterestRate: 5,
paymentPerPeriod: this.savingsRate, paymentPerPeriod: this.savingsRate,
principalInvestmentAmount: 0, principalInvestmentAmount: 0,
time: 10, retirementNetWorth: this.targetNetWorth,
retirementNetWorth: this.targetNetWorth time: 10
}, },
{ {
emitEvent: false emitEvent: false

4
libs/ui/src/lib/fire-calculator/fire-calculator.service.spec.ts

@ -16,10 +16,6 @@ describe('FireCalculatorService', () => {
); );
}); });
it('true', async () => {
expect(true).toBe(true);
});
describe('Test periods to retire', () => { describe('Test periods to retire', () => {
it('should return the correct amount of periods to retire with no interst rate', async () => { it('should return the correct amount of periods to retire with no interst rate', async () => {
const r = 0; const r = 0;

Loading…
Cancel
Save