Mileage Reimbursement Entry
Feature Detail
Description
Allows peer mentors to log kilometers driven for an activity, with the app calculating the reimbursement amount based on the current national rate. The entry form captures origin, destination (optional for privacy), and distance, with a default value pre-filled based on prior entries to minimize input friction for recurring routes. The total payout is shown in real time as distance is entered. A threshold rule (50 km by default, configurable per organization) determines whether the claim is auto-approved or routed to a coordinator for manual attestation. Claims below the threshold with no additional expenses are submitted silently without requiring any coordinator action, matching HLF's stated requirement that 60–70 % of registrations should be frictionless.
Analysis
Directly addresses HLF's observation that a single peer mentor logged 380 individual registrations in one year. Auto-approval below threshold eliminates coordinator bottlenecks for the majority of low-value claims, while preserving oversight for higher-value ones.
Store the per-km rate and auto-approval threshold in org-level configuration (Supabase). Real-time calculation in widget layer, not BLoC, to keep UI responsive. On submit, evaluate threshold synchronously and set claim status to 'approved' or 'pending_review' before writing to database. Consider caching the last-used distance per user for the default prefill.
Components (209)
Shared Components
These components are reused across multiple features
User Interface (59)
Service Layer (52)
Data Layer (33)
Infrastructure (54)
User Stories (12)
As a As a Peer Mentor (Likeperson)
I want the app to suggest a pre-filled distance when I enter a known from/to route that I have used before
So that I can submit recurring mileage claims faster without retyping the same route and distance every time
- Given I have previously submitted a claim for a route from address A to address B, When I next enter the same from/to combination in the route input fields, Then the distance field is pre-populated with the previously used distance
- Given the distance field is pre-populated from cache, When I review the value, Then it is clearly indicated as a suggestion (e.g., prefilled label) and I can edit it freely
- Given no cached route exists for my input, When the prefill service finds no match, Then the distance field remains empty and no incorrect suggestion is displayed
- +2 more
As a As a Peer Mentor (Likeperson)
I want to see the current status of my submitted mileage claims (pending, approved, rejected) and a timeline of status changes
So that I know whether my reimbursement has been processed and do not need to contact my coordinator for status updates
- Given I have submitted a mileage claim, When I view my claims list, Then each claim displays a claim status badge reflecting its current state (pending, auto-approved, approved, rejected)
- Given a claim has been manually reviewed, When I open the claim detail, Then a claim status timeline shows each status transition with timestamps and, if applicable, the coordinator's comment
- Given a claim was auto-approved, When I view its detail, Then the timeline shows a single 'Auto-approved' entry with the timestamp and the threshold rule that triggered it
- +2 more
As a As a Coordinator
I want the app to suggest a pre-filled distance when I enter a known from/to route that I have used before
So that I can submit recurring mileage claims faster without retyping the same route and distance every time
- Given I have previously submitted a claim for a route from address A to address B, When I next enter the same from/to combination in the route input fields, Then the distance field is pre-populated with the previously used distance
- Given the distance field is pre-populated from cache, When I review the value, Then it is clearly indicated as a suggestion (e.g., prefilled label) and I can edit it freely
- Given no cached route exists for my input, When the prefill service finds no match, Then the distance field remains empty and no incorrect suggestion is displayed
- +2 more
As a As a Coordinator
I want to see the current status of my submitted mileage claims (pending, approved, rejected) and a timeline of status changes
So that I know whether my reimbursement has been processed and do not need to contact my coordinator for status updates
- Given I have submitted a mileage claim, When I view my claims list, Then each claim displays a claim status badge reflecting its current state (pending, auto-approved, approved, rejected)
- Given a claim has been manually reviewed, When I open the claim detail, Then a claim status timeline shows each status transition with timestamps and, if applicable, the coordinator's comment
- Given a claim was auto-approved, When I view its detail, Then the timeline shows a single 'Auto-approved' entry with the timestamp and the threshold rule that triggered it
- +2 more
As a As a Peer Mentor (Likeperson)
I want to see the calculated reimbursement amount update live as I type in the distance or route
So that I can verify the claim is correct before submitting and avoid disputes or correction requests later
- Given I am on the mileage entry form and the org rate has been loaded, When I type or adjust the distance value, Then the reimbursement amount updates in real time without requiring a separate action
- Given the organization uses a custom per-km rate configured in the org rate config repository, When the calculation runs, Then the displayed amount reflects that organization's specific rate, not a hardcoded default
- Given the distance field is empty or contains an invalid value, When the calculation would produce NaN or a negative result, Then the reimbursement display shows zero or a clear placeholder rather than an error
- +2 more
As a As a Peer Mentor (Likeperson)
I want to attach a photo of a receipt to my mileage or travel expense claim when the amount exceeds the organization's receipt threshold
So that my claim meets compliance requirements and is not rejected due to missing documentation
- Given my mileage claim amount exceeds the configured receipt threshold for my organization, When I attempt to proceed to submission, Then I am prompted to attach a receipt before I can submit
- Given I am prompted to attach a receipt, When I tap the attachment button, Then the receipt camera sheet opens and I can photograph the receipt or select from my gallery
- Given I have captured a receipt image, When the image is processed, Then it is compressed by the receipt image compressor before being uploaded to the receipt storage repository
- +3 more
As a As a Peer Mentor (Likeperson)
I want to be prevented from selecting incompatible expense types together (e.g., mileage reimbursement and a public transit ticket for the same trip)
So that I cannot accidentally submit a fraudulent or inconsistent claim that would be rejected or require coordinator correction
- Given I select 'mileage reimbursement' as my expense type, When the mutual exclusion rule engine evaluates the selection, Then all public transit ticket options are disabled and visually indicated as unavailable for that trip
- Given I have mileage selected and attempt to also select a transit expense, When the UI renders, Then the conflicting option is either greyed out with an explanatory tooltip or automatically deselected with a notification
- Given I switch from mileage to a public transit expense type, When the selection changes, Then the mileage-specific fields (route input, distance field) are hidden or cleared and replaced with transit-relevant fields
- +2 more
As a As a Coordinator
I want to see the calculated reimbursement amount update live as I type in the distance or route
So that I can verify the claim is correct before submitting and avoid disputes or correction requests later
- Given I am on the mileage entry form and the org rate has been loaded, When I type or adjust the distance value, Then the reimbursement amount updates in real time without requiring a separate action
- Given the organization uses a custom per-km rate configured in the org rate config repository, When the calculation runs, Then the displayed amount reflects that organization's specific rate, not a hardcoded default
- Given the distance field is empty or contains an invalid value, When the calculation would produce NaN or a negative result, Then the reimbursement display shows zero or a clear placeholder rather than an error
- +2 more
As a As a Coordinator
I want to attach a photo of a receipt to my mileage or travel expense claim when the amount exceeds the organization's receipt threshold
So that my claim meets compliance requirements and is not rejected due to missing documentation
- Given my mileage claim amount exceeds the configured receipt threshold for my organization, When I attempt to proceed to submission, Then I am prompted to attach a receipt before I can submit
- Given I am prompted to attach a receipt, When I tap the attachment button, Then the receipt camera sheet opens and I can photograph the receipt or select from my gallery
- Given I have captured a receipt image, When the image is processed, Then it is compressed by the receipt image compressor before being uploaded to the receipt storage repository
- +3 more
As a As a Coordinator
I want to be prevented from selecting incompatible expense types together (e.g., mileage reimbursement and a public transit ticket for the same trip)
So that I cannot accidentally submit a fraudulent or inconsistent claim that would be rejected or require coordinator correction
- Given I select 'mileage reimbursement' as my expense type, When the mutual exclusion rule engine evaluates the selection, Then all public transit ticket options are disabled and visually indicated as unavailable for that trip
- Given I have mileage selected and attempt to also select a transit expense, When the UI renders, Then the conflicting option is either greyed out with an explanatory tooltip or automatically deselected with a notification
- Given I switch from mileage to a public transit expense type, When the selection changes, Then the mileage-specific fields (route input, distance field) are hidden or cleared and replaced with transit-relevant fields
- +2 more
As a As a Peer Mentor (Likeperson)
I want to enter my travel distance and route when submitting a mileage reimbursement claim after a peer support visit
So that I can be reimbursed for my travel expenses accurately and without needing to calculate the amount myself
- Given I open the mileage entry form, When the form loads, Then today's date is pre-filled and the distance field is focused
- Given I enter a from-address and a to-address in the route input fields, When both fields are populated, Then the system attempts to prefill the distance using the distance prefill service and displays an estimated km value
- Given I have entered or confirmed a distance in kilometers, When I view the reimbursement display, Then the calculated reimbursement amount updates in real time based on the organization's configured rate per km
- +4 more
As a As a Coordinator
I want to enter my travel distance and route when submitting a mileage reimbursement claim after a peer support visit
So that I can be reimbursed for my travel expenses accurately and without needing to calculate the amount myself
- Given I open the mileage entry form, When the form loads, Then today's date is pre-filled and the distance field is focused
- Given I enter a from-address and a to-address in the route input fields, When both fields are populated, Then the system attempts to prefill the distance using the distance prefill service and displays an estimated km value
- Given I have entered or confirmed a distance in kilometers, When I view the reimbursement display, Then the calculated reimbursement amount updates in real time based on the organization's configured rate per km
- +4 more