Auto-Approval Config Widget
Component Detail
User Interface
medium complexity
frontend
2
Dependencies
0
Dependents
0
Entities
0
Integrations
Description
Next.js server component presenting threshold rules as structured form inputs for organization administrators. Renders enabled/disabled toggles per rule dimension (distance_km, total_amount, receipt_required, expense_type_allowlist) with type-matched controls and inline validation matching the backend rule schema.
auto-approval-config-widget
Responsibilities
- Render structured rule configuration form with typed inputs per dimension
- Enforce field-level validation matching backend rule schema
- Toggle individual rules on or off without full-page reload
- Submit rule changes with before/after diff to the Threshold Rules Service
Interfaces
getRules(): AutoApprovalRule[]
updateRule(ruleId, patch): Promise<AutoApprovalRule>
toggleRule(ruleId, enabled): Promise<void>
saveRuleset(rules): Promise<void>
Relationships
Dependencies (2)
Components this component depends on