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

Description

Admin-facing service layer used by the Expense Type Config Page to orchestrate configuration changes and communicate with the backend Expense Type Service. Handles optimistic UI updates, error mapping, and change-tracking for audit purposes. Thin orchestration layer keeping the admin page free of direct API coupling.

Feature: Expense Types & Requirements

expense-type-config-service

Responsibilities

  • Bridge admin portal UI with backend expense type REST endpoints
  • Track unsaved changes and prompt confirmation before navigation
  • Map API validation errors to form-field-level display errors
  • Trigger catalogue reload on the mobile side after admin changes

Interfaces

loadCatalogue(orgId: string): Promise<ExpenseTypeCatalogue>
submitTypeChange(change: ExpenseTypeChange): Promise<void>
submitExclusivityGroup(group: ExclusivityGroup): Promise<void>
triggerSeed(orgId: string): Promise<void>
hasUnsavedChanges(): boolean
discardChanges(): void

Relationships

Dependencies (1)

Components this component depends on

Dependents (1)

Components that depend on this component

Related Data Entities (1)

Data entities managed by this component