Select Expense Types That Are Mutually Exclusive With Mileage
HLF explicitly requires that the app make mutually exclusive expense combinations technically impossible to select. A peer mentor traveling by car claims mileage; one using public transit claims a transit ticket — never both for the same trip. The expense type picker must enforce mutual exclusion rules defined in the expense type config, using the mutual exclusion rule engine to disable or deselect conflicting options when a primary type is chosen. The expense calculation preview updates to reflect only the selected valid combination.
User Story
Acceptance Criteria
- 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
- Given the mutual exclusion rules are defined in the expense type config, When the expense type picker loads, Then it fetches the current rules from the expense type repository and applies them dynamically rather than using hardcoded logic
- Given I have selected a valid, non-conflicting combination of expense types, When I proceed to the calculation preview, Then the expense calculation preview shows the combined total correctly
Business Value
Preventing invalid expense combinations at the UI level eliminates a class of submission errors that currently require coordinator intervention to correct. This directly reduces attestation queue noise, speeds up reimbursement cycles, and enforces HLF's financial compliance policies without relying on user knowledge of reimbursement rules — critical for volunteers with varying familiarity with expense policy.