@extends('layouts.admin')
@section('title', 'Overview')
@section('heading', 'Overview')
@section('subheading', 'Live registration and check-in numbers for '.config('event.short_name'))
@php
$maxDay = max(1, (int) $registrationsPerDay->max());
$approvedShare = $capacityTarget > 0 ? min(100, round($totals['approved'] / $capacityTarget * 100)) : 0;
$tz = config('event.timezone');
@endphp
@section('content')
@if ($failedNotifications > 0)
{{ $failedNotifications }} notification{{ $failedNotifications === 1 ? '' : 's' }} failed to send. Open a registration to review delivery history.
@endif
{{-- KPI row --}}
@foreach ([
['label' => 'Registrations', 'value' => $totals['registrations'], 'tone' => 'text-navy-900', 'href' => route('admin.registrations.index')],
['label' => 'Pending review', 'value' => $totals['pending_review'], 'tone' => 'text-amber-600', 'href' => route('admin.registrations.index', ['status' => 'pending_review'])],
['label' => 'Approved', 'value' => $totals['approved'], 'tone' => 'text-emerald-600', 'href' => route('admin.registrations.index', ['status' => 'approved'])],
['label' => 'Waitlisted', 'value' => $totals['waitlisted'], 'tone' => 'text-sky-600', 'href' => route('admin.registrations.index', ['status' => 'waitlisted'])],
['label' => 'Rejected', 'value' => $totals['rejected'], 'tone' => 'text-coral-600', 'href' => route('admin.registrations.index', ['status' => 'rejected'])],
] as $kpi)
{{ $kpi['label'] }}
{{ number_format($kpi['value']) }}
@endforeach
{{-- Registrations per day --}}
Registrations — last 14 days
{{ $registrationsPerDay->sum() }} total
@foreach ($registrationsPerDay as $day => $count)
@endforeach
{{ \Illuminate\Support\Carbon::parse($registrationsPerDay->keys()->first())->format('j M') }}
{{ \Illuminate\Support\Carbon::parse($registrationsPerDay->keys()->last())->format('j M') }}
{{-- Capacity + status breakdown --}}
Overall capacity
{{ number_format($totals['approved']) }} approved of {{ number_format($capacityTarget) }} target
{{ $approvedShare }}%
By status
@foreach ($statusCounts as $value => $count)
-
{{ number_format($count) }}
@endforeach
{{-- Categories --}}
Categories
@if (auth()->user()->isSuperAdmin() || auth()->user()->hasAnyRole([\App\Enums\UserRole::EventManager, \App\Enums\UserRole::Auditor]))
Details
@endif
{{-- Check-in --}}
Check-in today
@if (Route::has('admin.checkin.index') && (auth()->user()->isSuperAdmin() || auth()->user()->hasAnyRole([\App\Enums\UserRole::EventManager, \App\Enums\UserRole::CheckinOfficer])))
Open scanner
@endif
{{ \Illuminate\Support\Carbon::parse($today)->format('l, j F Y') }}
- {{ $checkinToday['total_unique'] }}
- Checked in
- {{ $checkinToday['checked_out'] }}
- Left
- {{ $checkinToday['duplicates'] }}
- Duplicate
@if ($checkinDays->isNotEmpty())
By event day
@foreach ($checkinDays as $day => $stats)
-
{{ \Illuminate\Support\Carbon::parse($day)->format('D j M') }}
{{ $stats['total_unique'] }} in · {{ $stats['checked_out'] }} out
@endforeach
@endif
Latest registrations
@forelse ($recentRegistrations as $registration)
-
@empty
- No registrations yet.
@endforelse
Latest check-ins
@forelse ($recentCheckins as $checkin)
-
{{ $checkin->registration?->full_name ?? 'Unknown' }}
{{ $checkin->registration?->category?->name }} · {{ $checkin->registration?->reference }}
{{ $checkin->checked_in_at->timezone($tz)->format('H:i') }}
@empty
- No check-ins yet.
@endforelse
@endsection