@extends('layouts.app') @section('title', 'Dashboard Utama') @section('page-title', 'Dashboard Presensi') @section('page-subtitle', 'Ringkasan presensi, statistik tim, dan aktivitas kehadiran karyawan secara real-time.') @section('page-actions')
Real-Time Sync
@endsection @push('styles') @endpush @section('content')
{{-- Top 4 Vibrant Materialize Stat Cards --}}
Total Karyawan

{{ $totalEmployees }}

Database Master
Hadir Hari Ini

{{ $presentToday }}

{{ $attendanceRate }}% Kehadiran
Terlambat

{{ $lateToday }}

Tercatat Sistem
Belum Hadir

{{ $absentToday }}

{{ $absentRate }}% Belum Check-in
{{-- Second Row: Circular Radial Attendance Gauge & Wave Spline Chart (Reference Image Style!) --}}
Rasio Kehadiran
Hari Ini
{{-- SVG Circular Progress Meter --}}
@php $circumference = 2 * 3.14159 * 54; $offset = $circumference - ($attendanceRate / 100) * $circumference; @endphp
{{ $attendanceRate }}%
Hadir
Hadir Tepat Waktu {{ $presentToday - $lateToday }} Karyawan
Terlambat {{ $lateToday }} Karyawan
Belum Hadir / Absen {{ $absentToday }} Karyawan
{{-- Wave Spline Trend Chart (Reference Image Style!) --}}
Tren Kehadiran Tim
Statistik pergerakan kehadiran 7 hari terakhir
Hadir Terlambat
{{-- Bottom Section: Recent Activity Table & Pending Leaves --}}
Aktivitas Presensi Hari Ini
{{ now()->translatedFormat('l, d F Y') }}
Lihat Semua
@forelse($recentAttendances as $attendance) @empty @endforelse
Karyawan Departemen Jam Masuk Status Jam Pulang
@if($attendance->employee->photo) Avatar @else {{ strtoupper(substr($attendance->employee->name, 0, 2)) }} @endif
{{ $attendance->employee->name }}
{{ $attendance->employee->nik }}
{{ $attendance->employee->department?->name ?? '-' }} {{ $attendance->check_in ? \Carbon\Carbon::parse($attendance->check_in)->format('H:i') : '-' }} @if($attendance->late_minutes > 0) +{{ $attendance->late_minutes }}m @endif {{ $attendance->status_label }} {{ $attendance->check_out ? \Carbon\Carbon::parse($attendance->check_out)->format('H:i') : '-' }}
Belum ada aktivitas presensi yang tercatat hari ini.
{{-- Pending Leave Approvals Widget --}}
Pengajuan Izin
{{ count($pendingLeaves) }} Pending
@forelse($pendingLeaves as $leave)
{{ $leave->employee->name }}
{{ $leave->type_label }} • {{ \Carbon\Carbon::parse($leave->start_date)->format('d M') }}
@empty
Tidak ada pengajuan izin pending.
@endforelse @if(count($pendingLeaves) > 0) Tinjau Semua Pengajuan @endif
@endsection @push('scripts') @endpush