Auto-Approval Rules Page
Component Detail
User Interface
medium complexity
frontendbackend
2
Dependencies
0
Dependents
0
Entities
0
Integrations
Description
Next.js SSR admin page for viewing, creating, editing, and disabling auto-approval rules. Includes a form-driven rule builder with fields for expense type, amount ceiling, distance threshold, and receipt requirement, plus a preview panel showing which recent expense claims would have matched each configured rule.
auto-approval-rules-page
Responsibilities
- Render the list of existing auto-approval rules for the organization with status indicators
- Provide a form-driven rule builder for creating and editing rules with input validation
- Display a preview of recent expense claims that would have matched a selected rule
- Allow toggling rules active or inactive without deletion
Interfaces
renderRulesList(organizationId: string): RuleRow[]
renderRuleForm(ruleId?: string): RuleFormState
renderMatchPreview(ruleId: string): ClaimPreview[]
handleRuleSubmit(form: RuleFormState): void
handleRuleToggle(ruleId: string, isActive: boolean): void
handleRuleDelete(ruleId: string): void
Relationships
Dependencies (2)
Components this component depends on