'use client'; import Link from 'next/link'; import { FileText, Calendar, ListChecks, AlertTriangle, } from 'lucide-react'; import { Badge } from '@kit/ui/badge'; import { Card, CardContent, CardHeader, CardTitle } from '@kit/ui/card'; import { MEETING_TYPE_LABELS } from '../lib/meetings-constants'; interface DashboardStats { totalProtocols: number; thisYearProtocols: number; openTasks: number; overdueTasks: number; } interface RecentProtocol { id: string; title: string; meeting_date: string; meeting_type: string; is_published: boolean; } interface OverdueTask { id: string; title: string; responsible_person: string | null; due_date: string | null; status: string; meeting_protocols: { id: string; title: string; }; } interface MeetingsDashboardProps { stats: DashboardStats; recentProtocols: RecentProtocol[]; overdueTasks: OverdueTask[]; account: string; } export function MeetingsDashboard({ stats, recentProtocols, overdueTasks, account, }: MeetingsDashboardProps) { return (
Protokolle, Tagesordnungspunkte und Aufgaben verwalten
Protokolle gesamt
{stats.totalProtocols}
Protokolle dieses Jahr
{stats.thisYearProtocols}
Offene Aufgaben
{stats.openTasks}
Überfällige Aufgaben
{stats.overdueTasks}
Noch keine Protokolle vorhanden.
) : ({protocol.title}
{new Date(protocol.meeting_date).toLocaleDateString('de-DE')} {' · '} {MEETING_TYPE_LABELS[protocol.meeting_type] ?? protocol.meeting_type}
Keine überfälligen Aufgaben.
) : ({task.title}
Protokoll: {task.meeting_protocols.title}