CRITICAL story-travel-reimbursement-registration-peer-mentor-002 5 pts
5
Story Points
Critical
Priority
Travel Reimbursement Registration
Feature

User Story

As a user
I want to enter a kilometre distance and have the system automatically calculate my reimbursement amount using my organisation's configured per-kilometre rate, with a live preview of the calculated sum before I submit
So that So that I can quickly register mileage claims without needing to know the current rate or perform manual calculations, reducing input errors and increasing claim accuracy

Acceptance Criteria

  • Given the user has selected 'Kilometre allowance' and entered a distance, when the distance field value changes, then the calculated reimbursement amount updates immediately using the organisation's configured per-kilometre rate
  • Given the organisation has a per-kilometre rate of NOK 4.90, when the user enters 25 km, then the preview shows NOK 122.50 before any user action to proceed
  • Given the user enters a distance below the configured minimum or above the configured maximum, when they attempt to advance in the wizard, then a validation error message specifying the allowed range is shown and progression is blocked
  • Given an implausible distance is entered (e.g., 900 km for a local visit), when the distance validation utility flags it, then a warning is displayed prompting the user to confirm the value before proceeding
  • Given the organisation's per-kilometre rate has been updated in Supabase, when the provider fetches the latest rules, then the new rate is used for all subsequent calculations in the session

Business Value

Mileage reimbursement is one of the most frequently submitted expense types for peer mentors who travel to visit members. Automating the rate calculation removes the need for volunteers to look up rates, reduces arithmetic errors, and makes the process fast enough that more mentors will actually claim what they are entitled to. This directly supports volunteer retention and reduces the administrative burden of correcting manually calculated claims.