Skip to content

[GF-FE-24] Build admin access control management page /admin/access-control #1119

Description

@yusuftomilola

Problem

There is no admin interface for managing physical access control devices or viewing access logs. Admins cannot register a door reader, view who entered the hub and when, or grant/revoke a member's physical access. The access control backend (GF-BE-20) provides the API but has no frontend.

Proposed Solution

Create frontend/app/admin/access-control/page.tsx with two tabs.

Tab 1: Devices

  • Table of registered access devices: Name, Type badge (QR Reader / RFID / Smart Lock), Location, Status badge (Online / Offline), Last Seen timestamp, Actions
  • Register Device button → modal/form: Name, Type, Location dropdown, Device Identifier (hardware ID)
  • Edit and delete per device

Tab 2: Access Logs

  • Log table: Timestamp, Member Name (or "Unknown"), Device Name, Method (QR / RFID / Manual), Action badge (Granted / Denied), Deny Reason (if denied)
  • Filters: Date range, Device dropdown, Action (All / Granted / Denied)
  • Real-time feel: auto-refresh every 30 seconds or use a polling hook

Acceptance Criteria

  • frontend/app/admin/access-control/page.tsx created with Devices and Logs tabs
  • Devices tab fetches from GET /access-control/devices
  • Register Device form calls POST /access-control/devices
  • Access logs tab fetches from GET /access-control/logs with filter params
  • Logs table auto-refreshes every 30 seconds
  • Online/Offline status badge reflects device.status from the API
  • Page linked from admin sidebar

Depends on: [GF-BE-20] Build smart lock and access control integration API

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