User Interface medium complexity frontend
1
Dependencies
0
Dependents
2
Entities
0
Integrations

Description

Next.js admin page where Organization Admins create, edit, enable/disable, and delete threshold-based auto-approval rules for their organization. Displays a table of existing rules with inline status toggles and a form for adding or editing rules with fields for expense type, max amount, max distance, and receipt requirement.

Feature: Auto-Approval Rules

auto-approval-config-page

Responsibilities

  • Render list of existing auto-approval rules with status indicators
  • Provide form for creating and editing rules with expense type, amount, distance, and receipt fields
  • Enable/disable individual rules via toggle switches
  • Validate form inputs before submission (non-negative amounts, logical thresholds)
  • Show confirmation dialogs for rule deletion

Interfaces

renderRuleList(rules: AutoApprovalRule[])
openRuleForm(rule?: AutoApprovalRule)
handleRuleSubmit(ruleData: RuleFormData)
handleRuleToggle(ruleId: string, enabled: boolean)
handleRuleDelete(ruleId: string)
showValidationErrors(errors: ValidationError[])
renderExpenseTypeSelector(expenseTypes: ExpenseType[])

Relationships

Dependencies (1)

Components this component depends on

Related Data Entities (2)

Data entities managed by this component