Expense Approvals Repository
Component Detail
Data Layer
medium complexity
backend
0
Dependencies
2
Dependents
2
Entities
0
Integrations
Description
Data access layer for the reimbursement_approvals table and related expense query operations. Provides paginated, filterable reads scoped to an organization or local association, and transactional writes for approval decisions.
expense-approvals-repository
Responsibilities
- Query pending and historical expense claims with filter and pagination support
- Scope queries to actor's organization or local association boundary
- Insert or update reimbursement_approvals records with status, actor, timestamp, and reason
- Join expenses, expense_types, expense_receipts, and users for full claim context
Interfaces
findExpensesByOrg(orgId, filters, pagination)
findExpensesByAssociation(associationId, filters, pagination)
findExpenseById(expenseId)
upsertApproval(expenseId, status, actorId, reason?)
getApprovalHistory(expenseId)
Relationships
Dependents (2)
Components that depend on this component
Related Data Entities (2)
Data entities managed by this component