@extends('layouts.sidebar') @section('content')

Dashboard Laporan & Statistik

Analisis data absensi dan peserta secara keseluruhan

{{ $stats['total_participants'] ?? 0 }}

Total Peserta

{{ $stats['total_attendance'] ?? 0 }}

Total Absensi

{{ $stats['today_attendance'] ?? 0 }}

Absensi Hari Ini

{{ $stats['avg_daily_attendance'] ?? 0 }}

Rata-rata Harian

Ringkasan Hari Ini

{{ $stats['present_today'] ?? 0 }}

Tepat Waktu

{{ $stats['late_today'] ?? 0 }}

Terlambat

{{ $stats['magang_count'] ?? 0 }}

Magang

{{ $stats['pkl_count'] ?? 0 }}

PKL
Distribusi Program
@php $magangCount = $participantStats['by_program']['Magang'] ?? 0; $pklCount = $participantStats['by_program']['PKL'] ?? 0; $total = $magangCount + $pklCount; $magangPercent = $total > 0 ? round(($magangCount / $total) * 100, 1) : 0; $pklPercent = $total > 0 ? round(($pklCount / $total) * 100, 1) : 0; @endphp
Magang {{ $magangCount }} ({{ $magangPercent }}%)
PKL {{ $pklCount }} ({{ $pklPercent }}%)
Top 5 Peserta Aktif
@forelse($participantStats['top_attenders'] ?? [] as $participant)
{{ substr($participant->nama_lengkap, 0, 1) }}
{{ $participant->nama_lengkap }}
{{ $participant->attendances_count ?? 0 }} absensi
{{ $participant->program_type ?? 'N/A' }}
@empty

Belum ada data absensi

@endforelse
Absensi Terbaru
@forelse($recentAttendances as $attendance) @empty @endforelse
Nama Tanggal Check In Status
{{ $attendance->participant ? substr($attendance->participant->nama_lengkap, 0, 1) : '?' }}
{{ $attendance->participant->name ?? 'Peserta Tidak Ditemukan' }}
{{ $attendance->participant->program_type ?? 'N/A' }}
{{ \Carbon\Carbon::parse($attendance->date)->format('d/m/Y') }} {{ $attendance->check_in ?? '-' }} @if($attendance->status === 'present') Tepat Waktu @elseif($attendance->status === 'late') Terlambat @else {{ $attendance->status }} @endif
Tidak ada data absensi terbaru
Statistik Bulanan ({{ date('Y') }})
@endsection @section('scripts') @endsection