Override Date and Duration When Registering Retroactively
While the default is today's date and 30 minutes, peer mentors often register activities after the fact — at the end of the day or week. The date step must present a calendar or date picker that defaults to today but allows quick selection of recent dates (last 7 days shown as tappable chips). The duration step must allow entry in minutes via a numeric stepper or free-text field, with common durations (15, 30, 45, 60, 90 min) available as quick-select chips. Both overrides must be lightweight so the flow remains fast for the retroactive case.
User Story
Audience Summaries
This high-priority story directly protects the integrity of organisational reporting and Bufdir funding calculations. HLF data shows a single mentor can generate 380 registrations per year, the majority logged retroactively at the end of a work period. Without a fast retroactive entry path, these registrations are routinely skipped, causing systematic under-reporting that understates programme impact. Accurate activity counts are the primary evidence base for public funding renewals.
Delivering a lightweight date and duration override — defaulting to today with quick access to the last seven days — eliminates the friction that causes mentors to abandon retroactive logging entirely, protecting both data quality and revenue continuity.
This story is high priority and depends on story-quick-activity-registration-peer-mentor-001, making it a second-sprint candidate once the base registration flow is stable. Delivery complexity is moderate: two UI steps (date picker and duration stepper) must each support both a fast-path (chip selection) and a fallback path (full calendar / free-text entry). The 'last selected duration becomes new default' behaviour requires persisting user preference state, which adds a small data layer concern. Acceptance criteria are well-defined and directly testable.
Key risks include date localisation (Norwegian date formats, week start day) and input validation for the custom duration field (1–480 minute bounds). Rollout should be validated with HLF mentors who perform high-volume retroactive entry to confirm the chip quick-select flow meets real-world speed expectations.
The date step requires rendering a horizontal chip row of the current day plus the six preceding days, each chip displaying a localised short date label. Tapping a chip sets the selected date in registration state without opening the full calendar. A 'Pick another date' control must open a date picker component constrained to past dates only (no future selection). The duration step requires a chip row for five preset values (15, 30, 45, 60, 90 minutes) with 30 pre-selected on first use.
Tapping a chip must persist the selected value as the user's default duration preference in local storage or equivalent persistent store, so subsequent sessions pre-select the last-used value. A free-text numeric input must accept manual entry and validate on blur/proceed that the value is an integer between 1 and 480 inclusive, displaying an inline error for out-of-range input. Both steps must update a shared registration state object that is serialised on final submission.
Acceptance Criteria
- Given the date step is open, when I view it, then today's date is selected and the 6 previous days are shown as tappable date chips for quick selection
- Given I tap a date chip for yesterday, when I proceed, then the registration uses that date without requiring me to open a full calendar
- Given I need a date older than 7 days, when I tap 'Pick another date', then a full calendar date picker opens allowing selection of any past date
- Given the duration step is open, when I view it, then chips for 15, 30, 45, 60, and 90 minutes are displayed and 30 min is pre-selected
- Given I tap the 45-minute chip, when I proceed, then the registration uses 45 minutes and this value becomes my new default
- Given I need a custom duration such as 75 minutes, when I tap a free-entry field and type 75, then the registration accepts 75 minutes and validates that the value is between 1 and 480 minutes
Business Value
HLF reported that a single peer mentor had 380 registrations in one year, many of which are logged retroactively at the end of a working period. Without a fast retroactive entry flow, these registrations are skipped entirely, leading to systematic under-reporting that understates the organisation's impact and endangers Bufdir funding calculations.
Components
- Date Selection Step ui
- Duration Selection Step ui
- Activity Registration Cubit service
- Registration Defaults Manager service
- Registration Preferences Store data
- Wizard State Manager service