Skip to content

[FE-26] Admin audit log: frontend (/admin/audit-log page) #1206

Description

@yusuftomilola

Overview

Super admins need a UI to review the audit log, investigate suspicious actions, and verify that admin operations were carried out correctly.

Context

  • Admin members page pattern: frontend/app/admin/members/page.tsx
  • Depends on BE-29 being implemented first
  • Only visible to users with role === 'super_admin'

Tasks

  • Create /admin/audit-log page — data table with columns: Actor (user name), Action, Resource Type, Resource ID, Date/Time, IP Address
  • Filters: resource type dropdown, actor search, date-range picker
  • Expandable row — clicking expands to show the full metadata JSON (before/after state) in a formatted code block
  • Read-only page — no action buttons (audit records are immutable)
  • Hide page from nav if current user is not super_admin
  • Create useGetAuditLog React Query hook

Files to Modify / Create

  • New: frontend/app/admin/audit-log/page.tsx
  • New: frontend/lib/react-query/hooks/admin/audit/useGetAuditLog.ts

Metadata

Metadata

Assignees

Labels

Type

No type

Fields

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