@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) @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

{{ \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

{{-- 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

@endif

Latest registrations

Latest check-ins

@endsection