Skip to content

[FE-35] Build /admin/documents page — platform-wide document table with risk and status filters #847

Description

@mftee

Overview

Administrators need to see all documents across the platform — not just their own. This is essential for oversight, detecting suspicious patterns, and resolving disputes that involve documents from different users.

Background

File to create: frontend/app/(protected)/admin/documents/page.tsx

Access: Admin role only

Features:

  • Paginated document table fetched from GET /api/admin/documents (BE-71)
  • Columns: Document name, Owner name/email, Status badge, Risk score (colour-coded), Uploaded date, Flags
  • Filters: Status, Risk score range (slider), Date range, Owner (search by email)
  • Click a row → navigates to the document's detail page (/documents/:id)
  • "Download" button per row → calls GET /api/documents/:id/export/pdf

Acceptance Criteria

  • Table fetches from the admin endpoint (not the user-scoped endpoint)
  • Owner email visible per row
  • Risk score colour coding: green/yellow/red
  • All filters combinable — applied as query params
  • Empty state shown when no documents match the filter criteria

Metadata

Metadata

Assignees

No one assigned

    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