ExpenseApprovalService
Component Detail
Service Layer
medium complexity
backend
0
Dependencies
0
Dependents
1
Entities
0
Integrations
Description
Backend service that orchestrates the expense approval workflow, enforcing business rules around auto-approval thresholds and routing higher-risk claims to the manual queue. It processes admin decisions, records audit entries with timestamps and actor identity, and triggers push notifications to peer mentors on each decision outcome.
expense-approval-service
Sources & reasoning
Line 70 states directly that claims above the threshold require manual attestation, implying a queue for those cases. Line 342 places reimbursement handling in Phase 2 of the roadmap, which maps to v1.0. The feature is the admin-side counterpart to the mobile expense registration flow and is required for HLF compliance.
-
docs/source/likeperson.md · line 70Automatisk godkjenning under 50 km / uten utlegg, manuell attestering ellers (HLF).
-
docs/source/likeperson.md · line 342Reiserefusjonshåndtering (faste valg, terskelbasert godkjenning)
Responsibilities
- Evaluate submitted claims against auto-approval threshold and route accordingly
- Process approve, reject, and clarification-request decisions from administrators
- Persist timestamped audit records linking each decision to the acting administrator
- Trigger push notifications to the submitting peer mentor on decision events
- Expose filtered queue queries supporting status, date, and expense type predicates
Interfaces
getQueue(filters: QueueFilters): Promise<ExpenseClaim[]>
approveExpense(claimId: string, adminId: string): Promise<AuditRecord>
rejectExpense(claimId: string, adminId: string, reason: string): Promise<AuditRecord>
requestClarification(claimId: string, adminId: string, message: string): Promise<void>
routeIncomingClaim(claim: ExpenseClaim): Promise<void>