Reimbursement Admin Repository
Component Detail
Data Layer
medium complexity
Shared Component
backend
0
Dependencies
1
Dependents
4
Entities
0
Integrations
Description
Data access layer optimized for the admin oversight use case, providing complex filtered and paginated queries that join reimbursements, expenses, receipts, and users tables. Implements role-scoped WHERE clauses ensuring coordinators are limited to their local association's data. Distinct from the peer mentor-facing reimbursement repository in that it supports multi-record bulk updates and aggregated status counts for the dashboard.
reimbursement-admin-repository
Responsibilities
- Execute paginated, filtered queries joining reimbursements to expenses, receipts, and peer mentor user records
- Apply organization and local-association scoping at the SQL query level
- Perform transactional bulk status updates for batch approval or rejection
- Provide aggregated counts of pending, approved, and rejected reimbursements per organization
- Support cursor-based or offset pagination for large result sets
Interfaces
findReimbursements(filters, pagination, scope)
findById(id, scope)
updateStatus(id, status, approverId, reason)
bulkUpdateStatus(ids[], status, approverId, reason)
countByStatus(scope)
findExpensesForReimbursement(reimbursementId)
findReceiptsForExpense(expenseId)
Relationships
Related Data Entities (4)
Data entities managed by this component