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

Description

Settings page in the Admin Web Portal for managing auto-approval rules. Administrators can create, edit, enable/disable, and delete threshold-based rules. Includes a preview function that shows how many existing claims a new rule would match before activation.

Feature: Auto-Approval Rules

auto-approval-rules-page

Sources & reasoning

Line 70 states the exact auto-approval rule HLF needs: under 50 km / no additional expenses triggers automatic approval, otherwise manual. Line 113 repeats the requirement with the phrase "Automatisk godkjenning under terskel". Both are in Phase 2 context (line 342 maps to v1.0). This feature is the policy engine that drives the approval queue's routing logic.

  • Automatisk godkjenning under 50 km / uten utlegg, manuell attestering ellers (HLF).
  • 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 list of existing auto-approval rules with status indicators
  • Provide form UI for creating and editing rules (distance limit, amount ceiling, expense type filters)
  • Trigger and display rule preview results against historical claims
  • Confirm activation and deactivation of rules with clear feedback
  • Show rule version history per rule entry

Interfaces

loadRules(): AutoApprovalRule[]
openRuleEditor(ruleId?: string): void
previewRule(draft: RuleDraft): PreviewResult
saveRule(rule: RuleDraft): AutoApprovalRule
toggleRuleStatus(ruleId: string, active: boolean): void