@php if (!isset($pertemuan)) { echo '
Pilih pertemuan terlebih dahulu
'; return; } if (!isset($mahasiswas)) { $mahasiswas = collect(); } if (!isset($absensis)) { $absensis = collect(); } $totalHadir = 0; $totalIzin = 0; $totalAlpha = 0; foreach ($mahasiswas as $mhs) { $absensi = $absensis[$mhs->id] ?? null; $status = $absensi ? $absensi->status : 'alpha'; if ($status == 'hadir') $totalHadir++; elseif ($status == 'izin') $totalIzin++; else $totalAlpha++; } @endphp
Pertemuan ke-{{ $pertemuan->pertemuan_ke }}
{{ \Carbon\Carbon::parse($pertemuan->tanggal)->format('l, d F Y') }} | {{ substr($pertemuan->jam_mulai,0,5) }} - {{ substr($pertemuan->jam_selesai,0,5) }} WIB
Total Mahasiswa: {{ $mahasiswas->count() }} ✅ Hadir: {{ $totalHadir }} 📝 Izin: {{ $totalIzin }} ❌ Alpha: {{ $totalAlpha }}
@forelse($mahasiswas as $i => $mhs) @php $absensi = $absensis[$mhs->id] ?? null; $status = $absensi ? $absensi->status : 'alpha'; $badgeClass = [ 'hadir' => 'success', 'izin' => 'warning', 'alpha' => 'danger' ][$status] ?? 'secondary'; $badgeText = [ 'hadir' => '✅ Hadir', 'izin' => '📝 Izin / Sakit', 'alpha' => '❌ Alpha' ][$status] ?? $status; @endphp @empty @endforelse
No NIM Nama Mahasiswa Status Kehadiran
{{ $loop->iteration }} {{ $mhs->nim_nip ?? '-' }} {{ $mhs->name }} {{ $badgeText }}
Belum ada data mahasiswa.
Absensi dicatat secara otomatis oleh sistem saat mahasiswa melakukan scan QR Code.