diff --git a/app/controllers/retirement_controller.rb b/app/controllers/retirement_controller.rb index 76912297f..856c9a9da 100644 --- a/app/controllers/retirement_controller.rb +++ b/app/controllers/retirement_controller.rb @@ -80,17 +80,15 @@ class RetirementController < ApplicationController :country, :pension_system, :birth_year, :retirement_age, :target_monthly_income, :currency, :expected_return_pct, :inflation_pct, :tax_rate_pct, :current_monthly_savings, - :contribution_start_year, :expected_annual_points, :rentenwert + pension_params: {} ) end - # Params are scoped under :pension_entry because the form uses - # form_with url: ..., scope: :pension_entry. Switching to form_with model: - # would change the nesting — update this permit list accordingly. def pension_entry_params params.require(:pension_entry).permit( :recorded_at, :current_points, :current_monthly_pension, - :projected_monthly_pension, :notes + :projected_monthly_pension, :notes, + data: {} ) end end diff --git a/app/javascript/controllers/pension_system_controller.js b/app/javascript/controllers/pension_system_controller.js new file mode 100644 index 000000000..6a27dc959 --- /dev/null +++ b/app/javascript/controllers/pension_system_controller.js @@ -0,0 +1,32 @@ +import { Controller } from "@hotwired/stimulus"; + +// Toggles visibility of country-specific pension field groups +// based on the selected pension system. +// +// Usage: +//
+//