Skip to content

[FE-21] Build StatusBadge component #518

@mftee

Description

@mftee

Problem

Document statuses (PENDING, ANALYZING, VERIFIED, FLAGGED, REJECTED) and dispute statuses appear in multiple places across the app. Without a shared component each page styles these differently, creating an inconsistent UI.

Proposed Solution

Create a reusable StatusBadge component inside frontend/module/components/status-badge/ that applies consistent styling for all status values used across the platform.

Acceptance Criteria

  • Accepts a status prop (string) and an optional size prop (sm, md)
  • Renders a pill-shaped badge with a colored background and white or dark text
  • Color mapping: PENDING=grey, ANALYZING=blue, VERIFIED=green, FLAGGED=orange, REJECTED=red, OPEN=blue, UNDER_REVIEW=amber, RESOLVED=green
  • Converts status strings to title case for display (e.g. UNDER_REVIEW becomes Under Review)
  • For unrecognised status values renders a neutral grey badge with the raw string
  • Includes aria-label for screen readers
  • All component files live inside frontend/module/components/status-badge/

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions