@extends('layouts.admin') @section('title', 'Attendance Statistics') @section('page-title', 'Attendance Statistics') @section('page-subtitle', 'Attendance overview for ' . now()->format('F Y')) @section('content')

Today ({{ now()->format('M d') }})

{{ $todayStats['total'] }}

check-ins today

This Week

{{ $weekStats['total'] }}

attendees

This Month

{{ $monthStats['total'] }}

attendees

Total Members

{{ $totalMembers }}

active members

Top Services

@forelse($topServices as $service)

{{ $service->name }}

{{ $service->attendances_count }} total attendance

{{ $service->latest_attendance ?? 0 }}

last service

@empty

No service data yet

@endforelse

Most Consistent Attendees

@forelse($topAttendees as $attendee) @php $daysInMonth = now()->daysInMonth; $attendancesCount = $attendee->attendances_count ?? 0; $attendanceRate = $daysInMonth > 0 ? ($attendancesCount / $daysInMonth) * 100 : 0; @endphp
@if($attendee->profile_photo) {{ $attendee->full_name }} @else
{{ substr($attendee->full_name, 0, 1) }}{{ substr(explode(' ', $attendee->full_name)[1] ?? '', 0, 1) }}
@endif

{{ $attendee->full_name }}

{{ $attendancesCount }} attendances this month

{{ round($attendanceRate, 1) }}%
@empty

No attendee data yet

@endforelse

Upcoming Services

@forelse($upcomingServices as $service)

{{ $service->name }}

{{ $service->formatted_date }}

{{ $service->formatted_time }}

@empty
No upcoming services
@endforelse
@endsection