Service Layer medium complexity mobile
2
Dependencies
1
Dependents
5
Entities
0
Integrations

Description

Business logic layer for travel expense submission and threshold evaluation. Accepts expense payloads from the UI, posts them to the REST API, and interprets the auto-approval or pending-queue response.

Feature: Travel Expense Registration

expense-service

Responsibilities

  • Validate expense payload completeness before API submission
  • POST expense data to REST API endpoint and handle response
  • Interpret auto-approval result versus pending-queue placement
  • Coordinate with Expense Type Service to confirm valid type combinations
  • Surface structured errors back to the UI layer

Interfaces

submitExpense(payload: ExpensePayload): Future<ExpenseSubmitResult>
getExpensesByActivity(activityId: String): Future<List<Expense>>
getExpenseById(expenseId: String): Future<Expense>
fetchAutoApprovalThreshold(): Future<double>

Relationships

Dependencies (2)

Components this component depends on

Dependents (1)

Components that depend on this component