Expense Type Store
Component Detail
Data Layer
medium complexity
backend
0
Dependencies
0
Dependents
1
Entities
0
Integrations
Description
Persistence layer for expense types, their requirement rules, and tenant-scoped configuration. Acts as the system of record for the catalogue consumed by both the mobile picker and the admin portal.
expense-type-store
Sources & reasoning
Section 2.1 and 3.3 describe a per-tenant configurable expense-type catalog with exclusion rules and threshold-based auto-approval, distinct from the user-facing registration flow. It sits in Phase 2 (Core Product) alongside the rest of the reimbursement stack.
-
docs/source/likeperson.md · line 40-43Faste valg for utleggstype - ikke fritekst - for å hindre feilkombinasjon (f.eks. både km og bussbillett). ... Automatisk godkjenning under 50 km / uten utlegg, manuell attestering ellers (HLF).
-
docs/source/likeperson.md · line 71Detaljert refusjonsstyring med faste valg som gjør feilkombinasjon teknisk umulig (f.eks. km + bussbillett kan ikke velges samtidig). Automatisk godkjenning under terskel.
Responsibilities
- Persist expense type definitions with tenant scoping
- Store rule metadata (receipt threshold, auto-approval limit, role eligibility)
- Track mutual exclusivity relationships between types
- Provide query access by tenant and role
- Maintain catalogue version stamps for client cache invalidation
Interfaces
findByTenant(tenantId: string): ExpenseType[]
findById(typeId: string): ExpenseType
save(type: ExpenseType): ExpenseType
delete(typeId: string): void
getCatalogueVersion(tenantId: string): string
Related Data Entities (1)
Data entities managed by this component