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

Dashboard PressGO

Overview data absensi dan peserta secara real-time

{{ now()->format('H:i:s') }}

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

Total Peserta

{{ $stats['new_this_week'] ?? 0 }} baru minggu ini

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

Total Absensi

Rata-rata: {{ $stats['avg_daily_attendance'] ?? 0 }}/hari

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

Absensi Hari Ini

{{ abs($stats['attendance_trend']) }}% dari kemarin

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

Rata-rata Harian

Berdasarkan {{ $stats['total_days'] ?? 0 }} hari
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 $index => $participant)
{{ $index + 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->nama_lengkap ?? '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('styles') @endsection @section('scripts') @endsection