import { Head, usePage } from '@inertiajs/react'; import EmployeeLayout from '@/layouts/employee-layout'; import { CheckCircle2, Clock, CalendarDays, ClipboardList, Briefcase, CalendarOff } from 'lucide-react'; import React from 'react'; interface Stats { present: number; leave: number; dispensation: number; on_time: number; late: number; } interface PageProps { stats: Stats | null; employee: any; [key: string]: any; } export default function EmployeeIndex({ stats, employee }: PageProps) { const { auth } = usePage().props; const user = auth.user; const statData = stats || { present: 0, leave: 0, dispensation: 0, on_time: 0, late: 0, }; return (

Halo, {user.name.split(' ')[0]}!

Semoga harimu menyenangkan dan produktif.

Logo { e.currentTarget.style.display='none'; }} />
{statData.on_time} Tepat Waktu
{statData.leave} Toleransi/Izin
{statData.late} Terlambat

Statistik Bulan Ini

Jumlah Presensi

Total kehadiran tercatat

{statData.present}

Jumlah Kegiatan

Tugas luar / dispensasi

{statData.dispensation}

Jumlah Cuti/Izin

Absen disetujui

{statData.leave}
); }