From 6d3e16a6fb931404d39c9c4919e70fcd184d77e6 Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Fri, 2 Jan 2026 11:15:17 +0100 Subject: [PATCH] Bugfix/initialize input properties in fire calculator (#6122) * Initialize input properties * Update changelog --- CHANGELOG.md | 4 ++++ .../fire-calculator/fire-calculator.component.stories.ts | 4 +++- .../src/lib/fire-calculator/fire-calculator.component.ts | 8 ++++---- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ee1be4c1..d9028e21c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased +### Changed + +- Initialized the input properties in the _FIRE_ calculator + ### Fixed - Fixed the import of `jsonpath` to support REST APIs (`JSON`) via the scraper configuration diff --git a/libs/ui/src/lib/fire-calculator/fire-calculator.component.stories.ts b/libs/ui/src/lib/fire-calculator/fire-calculator.component.stories.ts index e4cfa18ea..0872c2aac 100644 --- a/libs/ui/src/lib/fire-calculator/fire-calculator.component.stories.ts +++ b/libs/ui/src/lib/fire-calculator/fire-calculator.component.stories.ts @@ -44,8 +44,10 @@ type Story = StoryObj; export const Simple: Story = { args: { + annualInterestRate: 5, currency: 'USD', fireWealth: 50000, - locale: locale + locale: locale, + savingsRate: 1000 } }; diff --git a/libs/ui/src/lib/fire-calculator/fire-calculator.component.ts b/libs/ui/src/lib/fire-calculator/fire-calculator.component.ts index 655798b3d..6b0bc8dcb 100644 --- a/libs/ui/src/lib/fire-calculator/fire-calculator.component.ts +++ b/libs/ui/src/lib/fire-calculator/fire-calculator.component.ts @@ -77,16 +77,16 @@ import { FireCalculatorService } from './fire-calculator.service'; templateUrl: './fire-calculator.component.html' }) export class GfFireCalculatorComponent implements OnChanges, OnDestroy { - @Input() annualInterestRate: number; + @Input() annualInterestRate = 0; @Input() colorScheme: ColorScheme; @Input() currency: string; @Input() deviceType: string; - @Input() fireWealth: number; + @Input() fireWealth = 0; @Input() hasPermissionToUpdateUserSettings: boolean; @Input() locale = getLocale(); - @Input() projectedTotalAmount: number; + @Input() projectedTotalAmount = 0; @Input() retirementDate: Date; - @Input() savingsRate: number; + @Input() savingsRate = 0; @Output() annualInterestRateChanged = new EventEmitter(); @Output() calculationCompleted =