Service Layer low complexity mobilebackend
0
Dependencies
0
Dependents
1
Entities
0
Integrations

Description

Fetches and caches the organisation-specific expense type definitions from the backend, including mutual exclusion rules that prevent invalid combinations. Provides the list of available types to the UI and enforces selection constraints at the service boundary.

Feature: Travel Expense Registration

expense-type-config-service

Sources & reasoning

Mutual exclusion between expense types must be enforced programmatically, not through UI convention alone. A dedicated service isolates the exclusion-group logic and its caching, keeping the UI component and Expense Service free of type-catalogue details.

No source references — this artifact was included based on reasoning alone (see above).

Responsibilities

  • Fetch expense types for the current organisation from REST API
  • Cache expense types offline in Drift for use without connectivity
  • Expose exclusion-group rules to prevent invalid type combinations
  • Invalidate cache on org configuration change

Interfaces

getExpenseTypes(orgId: String): Future<List<ExpenseType>>
getExclusionGroups(): List<List<String>>
refreshCache(): Future<void>

Related Data Entities (1)

Data entities managed by this component