Expense Types Configuration Store
Component Detail
Data Layer
low complexity
mobile
0
Dependencies
0
Dependents
1
Entities
0
Integrations
Description
Data store that reads and caches expense type configurations from Supabase, enabling per-organisation customisation of available expense types, their mutual exclusivity rules, and associated metadata. Acts as the single source of truth for what expense types are permitted per organisation.
expense-types-config-store
Responsibilities
- Fetch expense type definitions and mutual exclusivity rules from Supabase config
- Cache expense type data locally for offline and performance resilience
- Provide structured expense type objects to the selector widget and validation service
- Support per-organisation overrides of expense type availability
Interfaces
getExpenseTypes(orgId)
getMutualExclusionRules(orgId)
getExpenseTypeById(typeId)
refreshExpenseTypes(orgId)
isTypeAvailableForOrg(typeId, orgId)