Skip to content

Add user-selectable year to standalone household creation #498

@SakshiKekre

Description

@SakshiKekre

Summary

Add year selection UI to the standalone household creation flow (/[country]/households/create) to match the report pathway's year selection capability.

Background

PR #489 fixed the "Configuration Error" in standalone household creation by wrapping PopulationPathwayWrapper with ReportYearProvider using CURRENT_YEAR as the default. This unblocks users from creating households directly.

However, the standalone flow currently hardcodes CURRENT_YEAR = '2025', while the report pathway allows users to select their desired year in ReportLabelView.

Current Behavior

  • Report pathway: User selects year → reportState.year → passed to ReportYearProvider
  • Standalone pathway: Year hardcoded to CURRENT_YEAR ('2025')

Proposed Enhancement

Add a year selector step or dropdown to the standalone household flow, similar to how the report pathway handles it in ReportLabelView.

Implementation Options

  1. Add year field to household builder form - Inline with other household inputs

Related

Files to Modify

  • app/src/pathways/population/PopulationPathwayWrapper.tsx
  • Potentially add new view component for year selection

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions