Skip to content

[GF-FE-07] Build admin hub settings page /admin/settings #1102

Description

@yusuftomilola

Problem

There is no settings page for admins to configure hub-wide settings (name, hours, timezone, tax rate). Without this UI, hub operators must hard-code configuration or contact developers to make basic customisations.

Proposed Solution

Create frontend/app/admin/settings/page.tsx as a settings form that reads from and writes to the GET/PATCH /hub-settings endpoints (implemented in GF-BE-03).

Page sections:

  1. Basic Info — Hub Name, Description, Contact Email, Contact Phone, Logo (image upload via existing Cloudinary integration)
  2. Business Hours — A per-day grid (Monday–Sunday) with a toggle (open/closed) and time inputs (open time, close time) for each day
  3. Address — Full address text field
  4. Tax & Currency — Tax Rate (percentage input), Currency (read-only display showing "NGN")
  5. Timezone — Dropdown of common African/global timezones

Each section has its own Save button (or one global Save at the bottom). Show a success toast on save and display validation errors inline.

Acceptance Criteria

  • frontend/app/admin/settings/page.tsx created and accessible via /admin/settings
  • Page is protected (admin/super_admin only)
  • Page fetches current settings from GET /hub-settings on load and pre-populates the form
  • Save calls PATCH /hub-settings and shows a success or error toast
  • Business hours grid correctly renders toggles and time inputs for all 7 days
  • Logo upload uses the existing Cloudinary image upload component
  • Page is linked from the admin sidebar navigation

Depends on: [GF-BE-03] Build hub settings backend module (name, hours, timezone, tax rate)

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