Browse Source

Refactoring

pull/6490/head
Thomas Kaul 4 weeks ago
parent
commit
65fbf883c0
  1. 9
      libs/ui/src/lib/fire-calculator/fire-calculator.component.ts

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

@ -97,25 +97,30 @@ export class GfFireCalculatorComponent implements OnChanges, OnDestroy {
projectedTotalAmount: new FormControl<number | null>(null), projectedTotalAmount: new FormControl<number | null>(null),
retirementDate: new FormControl<Date | null>(null) retirementDate: new FormControl<Date | null>(null)
}); });
public chart: Chart<'bar'>; public chart: Chart<'bar'>;
public isLoading = true; public isLoading = true;
public minDate = addDays(new Date(), 1); public minDate = addDays(new Date(), 1);
public periodsToRetire = 0; public periodsToRetire = 0;
protected readonly annualInterestRateChanged = output<number>(); protected readonly annualInterestRateChanged = output<number>();
protected readonly calculationCompleted = protected readonly calculationCompleted =
output<FireCalculationCompleteEvent>(); output<FireCalculationCompleteEvent>();
protected readonly projectedTotalAmountChanged = output<number>(); protected readonly projectedTotalAmountChanged = output<number>();
protected readonly retirementDateChanged = output<Date>(); protected readonly retirementDateChanged = output<Date>();
protected readonly savingsRateChanged = output<number>(); protected readonly savingsRateChanged = output<number>();
private readonly chartCanvas =
viewChild.required<ElementRef<HTMLCanvasElement>>('chartCanvas');
private readonly CONTRIBUTION_PERIOD = 12; private readonly CONTRIBUTION_PERIOD = 12;
private readonly DEFAULT_RETIREMENT_DATE = startOfMonth( private readonly DEFAULT_RETIREMENT_DATE = startOfMonth(
addYears(new Date(), 10) addYears(new Date(), 10)
); );
private readonly chartCanvas =
viewChild.required<ElementRef<HTMLCanvasElement>>('chartCanvas');
public constructor( public constructor(
private changeDetectorRef: ChangeDetectorRef, private changeDetectorRef: ChangeDetectorRef,
private fireCalculatorService: FireCalculatorService, private fireCalculatorService: FireCalculatorService,

Loading…
Cancel
Save