Service Layer medium complexity mobilebackend
2
Dependencies
1
Dependents
2
Entities
0
Integrations

Description

Business logic layer that fetches the active expense type catalogue scoped to the authenticated user's organisation, applies exclusion rule evaluation, and validates receipt requirements before an expense is submitted. Caches the type list locally to support offline-capable workflows.

Feature: Expense Types & Requirements

expense-type-service

Responsibilities

  • Fetch active expense types from the REST API scoped to the user's organisation
  • Evaluate mutual-exclusion rules for a given selection set
  • Enforce receipt-required constraints and surface validation errors
  • Cache type catalogue locally for offline access
  • Invalidate cache on organisation settings change

Interfaces

getActiveExpenseTypes(String orgId) → Future<List<ExpenseType>>
validateSelection(List<String> selectedTypeIds) → ValidationResult
isReceiptRequired(String typeId) → bool
getExclusionConflicts(String typeId) → List<String>
clearCache() → void

Relationships

Dependencies (2)

Components this component depends on

Dependents (1)

Components that depend on this component

Related Data Entities (2)

Data entities managed by this component