Files
kevin-asprec 34f87476ff feat(phase-6): rich super admin dashboard UI
Full DashboardPage rewrite with:
- 5-KPI row (total/active schools, expiring licenses, open tickets, SMS today)
- 30-day SMS volume bar chart (reuses SmsPage chart pattern)
- Revenue snapshot: MRR, paid this month, outstanding + overdue invoices
- School health table: status, tier, credit balance with LOW badge, license
  expiry countdown, last-seen relative time — sortable + search + status filter
- Quick actions panel with open-ticket badge counter
- Mini stats: SMS queue depth, suspended school count
- Refresh button with last-updated timestamp
- api.ts: getDashboardSchoolHealth + getDashboardRevenue
2026-03-16 12:38:38 +08:00

1.3 KiB

Phase 06: Super Admin Dashboard UI

Status: Complete Completed: 2026-03-16

Goal

Replace the minimal DashboardPage skeleton with a rich, data-driven super admin dashboard.

What was built

Backend (already existed from Phase 1/4 scaffolding)

  • GET /api/dashboard/summary — KPI counts
  • GET /api/dashboard/school-health — school list with license/credit health
  • GET /api/dashboard/revenue — MRR, outstanding, overdue, paid this month

Frontend — DashboardPage.vue (full rewrite)

  1. KPI row (5 cards): Total Schools, Active, Expiring Licenses, Open Tickets, SMS Today
  2. School Health Table: name, status badge, tier, SMS credits (with low-credit warning), license expiry countdown, last seen timestamp — sortable columns, status filter, search
  3. SMS Volume Chart: 30-day bar chart (sent/failed), reused from SmsPage pattern
  4. Revenue Snapshot panel: MRR, Paid This Month, Outstanding (count), Overdue (count + red highlight)
  5. Quick Actions: Add School (→ /schools), SMS Gateway (→ /sms), Billing (→ /billing)
  6. Refresh button with last-updated timestamp

api.ts additions

  • getDashboardSchoolHealth(params) — calls /dashboard/school-health
  • getDashboardRevenue() — calls /dashboard/revenue
  • getDashboardSmsChart() — calls /sms/stats?days=30 (reuse existing)