@extends('layouts.app') @section('title', 'Detail: ' . $anak->nama) @section('page-title', 'Detail Anak Yatim') @section('breadcrumb', 'Beranda / Anak Yatim / Detail') @section('content')
{{-- Left: Profile card --}}
{{ strtoupper(substr($anak->nama, 0, 1)) }}
{{ $anak->nama }}
{{ $anak->kode }} @if($anak->scanLogs()->whereDate('scanned_at', today())->exists())
✓ Hadir Hari Ini
@else
Belum Hadir
@endif
@php $rows = [ ['Tanggal Lahir', \Carbon\Carbon::parse($anak->tanggal_lahir)->translatedFormat('d F Y') . ' (' . \Carbon\Carbon::parse($anak->tanggal_lahir)->age . ' th)'], ['Mushola', $anak->mushola], ['Sekolah', $anak->sekolah ?? '—'], ['Keterangan', $anak->keterangan ?? '—'], ]; @endphp @foreach($rows as $row)
{{ $row[0] }}
{{ $row[1] }}
@endforeach
{{-- Right: Scan history --}}
Riwayat Kehadiran {{ $anak->scanLogs->count() }} scan
@forelse($anak->scanLogs()->latest()->paginate(15) as $log) @empty @endforelse
Tanggal & Waktu Discan oleh Keterangan
{{ $log->scanned_at->format('d M Y') }}
{{ $log->scanned_at->format('H:i:s') }}
{{ $log->panitia->nama ?? '—' }} {{ $log->keterangan ?? '—' }}
Belum pernah scan
@endsection