import Link from 'next/link' import { prisma } from '@/lib/prisma' import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card' import { Button } from '@/components/ui/button' import { Badge } from '@/components/ui/badge' import { Plus, Settings } from 'lucide-react' export default async function ClientsPage() { const clients = await prisma.client.findMany({ orderBy: { createdAt: 'desc' }, include: { _count: { select: { smsQueue: true, smsLogs: true } }, }, }) return (

Clients

Manage schools and organizations

{clients.length === 0 ? (

No clients yet

) : (
{clients.map(client => (

{client.name}

{client.isActive ? 'Active' : 'Inactive'} {client.semaphoreKey ? ( SMS Configured ) : ( ⚠ No SMS Key )}

API Key:{' '} {client.apiKey}

Sender: {client.senderName || 'NFC-HUB'} ·{' '} SMS sent: {client._count.smsLogs}

))}
)}
) }