Documentation

PersonalTab Documentation

The PersonalTab component is a key part of the financial planning application that handles personal information and superannuation settings. It allows users to input and manage:

  • Main person's current age and life expectancy
  • Partner inclusion, partner's age, and partner's life expectancy
  • Superannuation settings including eligibility age and income rates

This information is used in financial calculations to project retirement outcomes and superannuation benefits.

Inputs

Personal Information

  • Main Person's Current Age (starting_age)

    • Type: Number
    • Range: 0-110
    • Controls: Starting point for all financial projections
    • Validation: Must be less than life expectancy
    • Auto-adjusts life expectancy if needed
  • Main Person's Life Expectancy (ending_age)

    • Type: Number
    • Range: 0-110
    • Controls: End point for financial projections
    • Validation: Must be greater than current age (validated on blur)
    • Input Method: Arrow keys only (keyboard typing disabled)
    • Auto-adjusts to current age + 1 if invalid
  • Include Partner (includePartner)

    • Type: Boolean
    • Controls: Whether to include a partner in financial calculations
    • When enabled, shows partner's age and life expectancy inputs
  • Partner's Current Age (partner_starting_age)

    • Type: Number
    • Range: 0-110
    • Controls: Starting point for partner's financial projections
    • Only visible when partner is included
    • Validation: Must be less than partner's life expectancy
  • Partner's Life Expectancy (partner_ending_age)

    • Type: Number
    • Range: 0-110
    • Default: 95 (if not set)
    • Controls: End point for partner's financial projections
    • Only visible when partner is included
    • Input Method: Arrow keys only (keyboard typing disabled)
    • Validation: Must be greater than partner's current age (validated on blur)
    • Auto-adjusts to partner's current age + 1 if invalid

Superannuation Settings

  • Include Superannuation (superannuation)

    • Type: Boolean
    • Controls: Whether to include NZ Superannuation in calculations
  • Override Super Incomes (override_super_incomes)

    • Type: Boolean
    • Controls: Whether to use custom superannuation income rates
    • Only visible when superannuation is included
  • Eligibility Age (super_eligibility_age)

    • Type: Number
    • Default: 65
    • Controls: Age at which superannuation benefits begin
  • Single Rate (Annual) (single_super_rate)

    • Type: Number
    • Default: $32,611.28 (as of April 2025)
    • Controls: Annual superannuation income for single person (Nominal)
  • Couple - One Qualifying (Annual) (couple_one_super_rate)

    • Type: Number
    • Default: $24,776.44 (as of April 2025)
    • Controls: Annual superannuation income when one partner qualifies (Nominal)
  • Couple - Both Qualifying (Annual) (couple_both_super_rate)

    • Type: Number
    • Default: $49,552.88 (as of April 2025)
    • Controls: Annual superannuation income when both partners qualify (Nominal)
    • Only visible when partner is included

Calculations

Superannuation Income Calculation

The superannuation income is calculated based on the user's relationship status and eligibility age.

Formula:

  • If Current Age >= Eligibility Age:
    • Single: Single Rate
    • Couple (One Eligible): Couple - One Qualifying Rate
    • Couple (Both Eligible): Couple - Both Qualifying Rate
  • Otherwise, the superannuation income is $0.

Example Calculation

For a single person aged 67:

  • Eligibility Age: 65
  • Single Rate: $32,611.28
  • Calculation: $32,611.28 (since 67 >= 65)

For a couple where both are eligible:

  • Eligibility Age: 65
  • Both Qualifying Rate: $49,552.88
  • Calculation: $49,552.88

Age Validation

The component ensures valid age ranges:

Main Person:

  • Current Age must be less than Life Expectancy
  • When Current Age is changed and becomes >= Life Expectancy, Life Expectancy is automatically adjusted to Current Age + 1
  • When Life Expectancy is changed (via arrow keys), it's validated on blur and adjusted if <= Current Age

Partner (when included):

  • Partner's Current Age must be less than Partner's Life Expectancy
  • When Partner's Current Age is changed and becomes >= Partner's Life Expectancy, Partner's Life Expectancy is automatically adjusted to Partner's Current Age + 1
  • When Partner's Life Expectancy is changed (via arrow keys), it's validated on blur and adjusted if <= Partner's Current Age
  • If Partner's Life Expectancy is not set, it defaults to 95

UI Features

Layout Modes

The component supports two layout modes controlled by isSidebarView:

  • Normal View: Horizontal layout with multiple columns for age inputs
  • Sidebar View: Vertical stack layout optimized for narrow sidebars

Input Restrictions

  • Life expectancy fields use arrow-key-only input to prevent invalid manual entry
  • Visual hint "(use ↕ controls)" appears on life expectancy labels
  • User select disabled on life expectancy inputs to prevent text selection
  • Numeric validation on all age inputs with 0-110 range clamping