@extends('layouts.admin') @section('header') Attendance Calendar @endsection @section('content')

{{ $currentDate->format('F Y') }}

Track member check-ins by date

{{ $year }}
@foreach(['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'] as $dayName)
{{ substr($dayName, 0, 1) }}
@endforeach
@for($i = 0; $i < $firstDayOfMonth; $i++)
@endfor @for($day = 1; $day <= $daysInMonth; $day++) @php $dateObj = $currentDate->copy()->day($day); $dateStr = $dateObj->format('Y-m-d'); $count = $sessionCounts[$dateStr] ?? 0; $hasNotes = isset($sessionNotes[$dateStr]); $isToday = $dateStr === now()->format('Y-m-d'); @endphp
{{ $day }} @if($hasNotes) @endif
@if($count > 0) @elseif(!$hasNotes)
@endif
@endfor @php $totalCells = $firstDayOfMonth + $daysInMonth; $remainingCells = ceil($totalCells / 7) * 7 - $totalCells; @endphp @for($i = 0; $i < $remainingCells; $i++)
@endfor
@endsection