Skip to content

[FE-44] Admin membership plans management (/admin/plans) + public /pricing page #1302

Description

@yusuftomilola

Overview

Admins need a UI to create and manage membership tiers — the pricing plans that members subscribe to. Without this page, plans can only be managed via direct database manipulation.

Context

  • Admin pages pattern: frontend/app/admin/members/page.tsx
  • Depends on BE-55 for membership plan CRUD endpoints
  • Member subscriptions are visible in the existing member detail view

Tasks

  • Create /admin/plans page — table listing all membership plans with columns: Name, Price, Billing Cycle, Features count, Active Subscribers, Status (Active/Inactive), Display Order
  • "Create Plan" button opens a form modal:
    • Name, description (textarea)
    • Price (NGN input, converted to kobo on submit)
    • Billing cycle dropdown: Monthly / Quarterly / Yearly
    • Features: add/remove chip list (press Enter to add a feature bullet)
    • Booking hours included (0 = unlimited)
    • Guest passes per month
    • Display order (integer, for controlling sort on the public plans page)
    • Active toggle
  • Row actions: "Edit" (pre-filled modal), "Archive" (sets inactive — shown only if no active subscribers)
  • Subscriber count is a clickable link to /admin/members?plan=:id
  • Create a public-facing /pricing page showing active plans in display-order, with a "Subscribe" CTA for each plan (calls POST /membership-plans/:id/subscribe)
  • Create useGetMembershipPlans, useCreatePlan, useUpdatePlan React Query hooks

Files to Modify / Create

  • New: frontend/app/admin/plans/page.tsx
  • New: frontend/app/pricing/page.tsx
  • New: frontend/lib/react-query/hooks/membership/

Metadata

Metadata

Assignees

No one assigned

    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