import { Card, CardContent, CardHeader, CardTitle } from "@/shared/components/ui/card" import { Badge } from "@/shared/components/ui/badge" import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow, } from "@/shared/components/ui/table" import { EmptyState } from "@/shared/components/ui/empty-state" import { CalendarCheck } from "lucide-react" import { AttendanceStatsCard } from "./attendance-stats-card" import { ATTENDANCE_STATUS_COLORS, ATTENDANCE_STATUS_LABELS, type StudentAttendanceSummary, } from "../types" export function StudentAttendanceView({ summary, }: { summary: StudentAttendanceSummary | null }) { if (!summary) { return ( ) } return (
Student

{summary.studentName}

Total Records

{summary.stats.total}

{summary.recentRecords.length === 0 ? ( ) : ( Recent Attendance
Date Class Status Remark {summary.recentRecords.map((r) => ( {r.date} {r.className} {ATTENDANCE_STATUS_LABELS[r.status]} {r.remark ?? "-"} ))}
)}
) }