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

Description

Admin interface for creating, editing, and managing auto-approval rules within an organization. Displays all active rules in a list with conflict and overlap warnings highlighted inline. Provides form controls for configuring rule criteria such as amount thresholds, distance limits, expense types, and receipt requirements.

Feature: Auto-Approval Rules

auto-approval-rules-page

Sources & reasoning

Line 70 gives a concrete HLF rule (under 50 km or no receipts = auto-approve). Line 113 confirms a threshold-based auto-approval pattern for HLF. Both refs point to Phase 2 (v1.0). The feature must live in the admin portal so org admins can configure per-org thresholds without code changes, matching the module-toggle and config-flag architecture described in the source doc.

  • docs/source/likeperson.md · line 70
    Automatisk godkjenning under 50 km / uten utlegg, manuell attestering ellers (HLF).
  • docs/source/likeperson.md · line 113
    Detaljert refusjonsstyring med faste valg som gjør feilkombinasjon teknisk umulig (f.eks. km + bussbillett kan ikke velges samtidig). Automatisk godkjenning under terskel.

Responsibilities

  • Render the list of existing auto-approval rules with status and conflict indicators
  • Provide form UI for creating and editing rules with field validation
  • Display conflict or overlap warnings when rules have ambiguous or contradictory conditions
  • Allow administrators to activate, deactivate, or delete individual rules
  • Communicate rule changes to AutoApprovalRuleService and reflect updated state

Interfaces

loadRules(): AutoApprovalRule[]
createRule(ruleData: RuleFormData): void
updateRule(ruleId: string, ruleData: RuleFormData): void
deleteRule(ruleId: string): void
highlightConflicts(conflicts: RuleConflict[]): void

Related Data Entities (1)

Data entities managed by this component