# Phase 07: School Admin Portal UI **Status:** Complete **Completed:** 2026-03-16 ## Goal Replace the 5 portal page skeletons with fully functional school-admin views. ## What was built ### Backend additions to `school_portal.py` - `GET /portal/sms-stats` — 30-day SMS chart, delivery rate, credit burn rate, monthly breakdown - `POST /portal/credits/request` — school admin submits a credit top-up request (creates a support ticket) ### Frontend pages (full rewrites) **PortalOverviewPage.vue** - Suspension/expired banner (red alert if school is not active) - Credit meter: progress bar showing credits vs. threshold, LOW CREDIT warning - License countdown: days remaining badge, expired warning - 30-day SMS usage mini-chart (same bar pattern as SmsPage) - KPI cards: SMS Credits, SMS This Month, Open Tickets, Pending Invoices - Announcements banner **PortalBillingPage.vue** - Invoice table: number, period, breakdown (subscription + SMS), total, status badge, due date - Credit top-up request form (opens inline, sends request to support ticket) - Subscription info panel (monthly fee, SMS cost/message) **PortalSmsPage.vue** - 30-day SMS volume chart (sent/failed bars) - Delivery rate stat card - Credit burn rate (credits used this month) - Monthly SMS job table with status filter and pagination - Trigger type breakdown **PortalTicketsPage.vue** - Status filter tabs (All / Open / In Progress / Resolved) - Pagination - Better empty state **PortalProfilePage.vue** - School details panel (name, city, contact, tier, status) - Change password form (already existed — preserved)