diff --git a/app/admin/matches/[id]/page.tsx b/app/admin/matches/[id]/page.tsx index e7ebf65..1fda6cb 100644 --- a/app/admin/matches/[id]/page.tsx +++ b/app/admin/matches/[id]/page.tsx @@ -11,6 +11,7 @@ import { LEVEL_LABELS } from '@/lib/utils/request' import { ReassignTutorForm, EditMatchForm, GenerateSessionsForm, DeleteSessionsForm, AdminNotesForm } from './MatchActions' import { CopyMessageButton } from '@/components/CopyMessageButton' import { WhatsAppLink } from '@/components/WhatsAppLink' +import { AdminBreadcrumbs } from '@/components/admin/AdminBreadcrumbs' import { templates } from '@/lib/whatsapp/templates' const DAY_NAMES = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'] @@ -163,6 +164,14 @@ export default async function AdminMatchDetailPage({ return (
+ + {assigned === '1' && (

Tutor assigned successfully.

@@ -210,7 +219,23 @@ export default async function AdminMatchDetailPage({
Student
-
{studentName}
+
+ {studentProfile?.display_name ? ( + + {studentProfile.display_name} + + ) : ( + studentName + )} + {request?.requester_role === 'parent' && request?.for_student_name && ( + + (Student: {request.for_student_name}) + + )} +
{studentProfile?.whatsapp_number && (
๐Ÿ“ฑ {studentProfile.whatsapp_number} @@ -225,6 +250,14 @@ export default async function AdminMatchDetailPage({ {tutorUserProfile?.display_name ?? 'โ€”'}
{tutorProfile?.timezone}
+
+ + View tutor profile + +
{tutorUserProfile?.whatsapp_number && (
๐Ÿ“ฑ {tutorUserProfile.whatsapp_number} diff --git a/app/admin/payments/page.tsx b/app/admin/payments/page.tsx index 42a4e5d..88d2303 100644 --- a/app/admin/payments/page.tsx +++ b/app/admin/payments/page.tsx @@ -11,6 +11,7 @@ import { PaymentQuickActions } from './PaymentQuickActions' import Link from 'next/link' import { templates } from '@/lib/whatsapp/templates' import { PAYMENT_INSTRUCTIONS } from '@/lib/config/pricing' +import { formatPkr } from '@/lib/utils/currency' import { AdminPagination, PAGE_SIZE } from '@/components/AdminPagination' const STATUS_COLOURS: Record = { @@ -149,7 +150,7 @@ export default async function AdminPaymentsPage({ {subjectName} ยท {level} ยท {pkg?.tier_sessions ?? '?'} sessions/month

- Amount: PKR {payment.amount_pkr.toLocaleString()} + Amount: {formatPkr(payment.amount_pkr)}

Submitted: {submittedDate}

{payment.reference && ( diff --git a/app/admin/requests/RequestFilters.tsx b/app/admin/requests/RequestFilters.tsx index a8a578a..0a4bd80 100644 --- a/app/admin/requests/RequestFilters.tsx +++ b/app/admin/requests/RequestFilters.tsx @@ -10,6 +10,7 @@ type RequestFiltersProps = { activeStatus: string activeSubject: string | undefined activeLevel: string | undefined + activeSearch: string | undefined } export function RequestFilters({ @@ -17,12 +18,14 @@ export function RequestFilters({ activeStatus, activeSubject, activeLevel, + activeSearch, }: RequestFiltersProps) { function buildHref(params: Record): string { const merged: Record = { status: activeStatus !== 'all' ? activeStatus : undefined, subject: activeSubject, level: activeLevel, + q: activeSearch, ...params, } const qs = Object.entries(merged) @@ -34,6 +37,34 @@ export function RequestFilters({ return (
+
+ {activeStatus !== 'all' && } + {activeSubject && } + {activeLevel && } + + + {activeSearch && ( + + Clear + + )} +
+ {/* Subject filter */}