@extends('admin.layouts.app') @section('title', 'Detail Absensi') @push('styles') @endpush @section('content') @php use Illuminate\Support\Str; $photo = null; if (!empty($user->url_photo)) { $photo = Str::startsWith($user->url_photo, ['http://', 'https://']) ? $user->url_photo : asset('storage/' . ltrim($user->url_photo, '/')); } $initials = strtoupper( collect(preg_split('/\s+/', trim((string) $user->name))) ->filter() ->take(2) ->map(fn($w) => Str::substr($w, 0, 1)) ->join(''), ); $selectedPeriod = sprintf('%04d-%02d', (int) $year, (int) $month); @endphp
@if (session('success'))
{{ session('success') }}
@endif @if ($errors->any())
    @foreach ($errors->all() as $error)
  • {{ $error }}
  • @endforeach
@endif {{-- Top filter actions --}}
Periode:
Unduh Rekap
{{-- Profile + rekap sejajar --}}
@if ($photo)
{{ $user->name }}
@else
{{ $initials }}
@endif
Anggota
{{ $user->name }}
{{ $user->jabatan ?? '-' }}
{{ (int) $presentPercent }}%
{{ $summary['hadir'] }}
Hadir
{{ $summary['izin'] }}
Izin
{{ $summary['sakit'] }}
Sakit
{{ $summary['alpha'] }}
Alpha
{{-- Table detail --}}
@forelse($items as $it) @php $status = $it->status ?? '-'; $badge = match ($status) { 'hadir' => 'st-hadir', 'izin' => 'st-izin', 'sakit' => 'st-sakit', 'alpha' => 'st-alpha', default => 'st-izin', }; @endphp @empty @endforelse
Tanggal Datang Pulang Durasi Status Keterangan Aksi
{{ $it->date_label }} {{ $it->check_in_label }} {{ $it->check_out_label }} {{ $it->duration_label }} {{ ucfirst($status) }} {{ $it->notes_label }}
@if ($it->status == 'hadir' && $it->osm_url) @endif
Tidak ada riwayat absensi pada periode ini.
@foreach ($items as $it) @endforeach
@endsection @push('scripts') @endpush