import { UserCircle, Plus } from 'lucide-react'; import { createBookingManagementApi } from '@kit/booking-management/api'; import { getSupabaseServerClient } from '@kit/supabase/server-client'; import { Button } from '@kit/ui/button'; import { Card, CardContent, CardHeader, CardTitle } from '@kit/ui/card'; import { AccountNotFound } from '~/components/account-not-found'; import { CmsPageShell } from '~/components/cms-page-shell'; import { EmptyState } from '~/components/empty-state'; interface PageProps { params: Promise<{ account: string }>; } export default async function GuestsPage({ params }: PageProps) { const { account } = await params; const client = getSupabaseServerClient(); const { data: acct } = await client .from('accounts') .select('id') .eq('slug', account) .single(); if (!acct) { return ( ); } const api = createBookingManagementApi(client); const guests = await api.listGuests(acct.id); return (

Gästeverwaltung

{guests.length === 0 ? ( } title="Keine Gäste vorhanden" description="Legen Sie Ihren ersten Gast an." actionLabel="Neuer Gast" /> ) : ( Alle Gäste ({guests.length})
{guests.map((guest: Record) => ( ))}
Name E-Mail Telefon Stadt Land
{String(guest.last_name ?? '')},{' '} {String(guest.first_name ?? '')} {String(guest.email ?? '—')} {String(guest.phone ?? '—')} {String(guest.city ?? '—')} {String(guest.country ?? '—')}
)}
); }