@extends('layouts.app') @section('title', 'Dashboard Peserta') @section('content')
{{--
--}}
Total Kehadiran
{{ $stats['total_attendance'] }}
Hadir Tepat Waktu
{{ $stats['present_count'] }}
Terlambat
{{ $stats['late_count'] }}
Tingkat Kehadiran
{{ $stats['attendance_rate'] }}%
Riwayat Absensi Terbaru
Lihat Semua
@forelse($recentAttendances as $attendance) @empty @endforelse
Tanggal Hari Masuk Keluar Status Durasi
{{ \Carbon\Carbon::parse($attendance->date)->format('d/m/Y') }} {{ \Carbon\Carbon::parse($attendance->date)->translatedFormat('l') }} {{ $attendance->check_in }} @if($attendance->check_out) {{ $attendance->check_out }} @else Belum Check Out @endif @if($attendance->status == 'present') Tepat Waktu @else Terlambat @endif @if($attendance->check_in && $attendance->check_out) @php $checkIn = \Carbon\Carbon::createFromFormat('H:i:s', $attendance->check_in); $checkOut = \Carbon\Carbon::createFromFormat('H:i:s', $attendance->check_out); $duration = $checkIn->diff($checkOut); @endphp {{ $duration->h }}j {{ $duration->i }}m @else - @endif

Belum ada data absensi

Lakukan Absensi Pertama
@if(isset($monthlyData) && count($monthlyData) > 0)
Statistik Kehadiran Bulan Ini
@php $currentMonth = \Carbon\Carbon::now()->month; $monthData = $monthlyData[$currentMonth] ?? null; @endphp @if($monthData)

{{ $monthData['total'] }}

Total Kehadiran

{{ $monthData['present'] }}

Tepat Waktu

{{ $monthData['late'] }}

Terlambat
@else

Belum ada data untuk bulan ini

@endif
@endif
Informasi Peserta
{{ auth()->guard('participant')->user()->nama_lengkap }}
{{ auth()->guard('participant')->user()->nama_lengkap }}

{{ auth()->guard('participant')->user()->nim }}

{{-- --}}
Program {{ auth()->guard('participant')->user()->program_type }}
Institusi {{ auth()->guard('participant')->user()->institusi }}
Department {{ auth()->guard('participant')->user()->department ?? '-' }}
Mulai {{ auth()->guard('participant')->user()->tanggal_bergabung_formatted }}
Selesai @if(auth()->guard('participant')->user()->end_date) {{ \Carbon\Carbon::parse(auth()->guard('participant')->user()->end_date)->format('d/m/Y') }} @else - @endif
Status @if(auth()->guard('participant')->user()->is_active) Aktif @else Tidak Aktif @endif
Status Hari Ini
@php $todayAttendance = $recentAttendances->first(function ($attendance) { return \Carbon\Carbon::parse($attendance->date)->isToday(); }); @endphp @if($todayAttendance)
@if($todayAttendance->check_out)
Absensi Selesai

Masuk: {{ $todayAttendance->check_in }}

Keluar: {{ $todayAttendance->check_out }}

@else
Sudah Masuk

Waktu: {{ $todayAttendance->check_in }}

Status: @if($todayAttendance->status == 'present') Tepat Waktu @else Terlambat @endif

Keluar @endif
@else
Belum Absen

Anda belum melakukan absensi hari ini

Absen Sekarang
@endif
@csrf
@endsection @push('scripts') @endpush @push('styles') @endpush