@extends('layouts.admin', [ 'title' => 'Appointments', 'pageTitle' => 'Appointments', 'active' => 'appointments', ]) @php $statusVariants = [ 'pending' => 'warning', 'confirmed' => 'primary', 'checked_in' => 'purple', 'completed' => 'success', 'cancelled' => 'danger', 'no_show' => 'muted', ]; $sortOptions = [ 'upcoming' => 'Upcoming', 'newest' => 'Newest', 'oldest' => 'Oldest', ]; $hasActiveFilters = collect($filters ?? []) ->filter(fn ($value, $key) => filled($value) && ! ($key === 'sort' && $value === 'upcoming')) ->isNotEmpty(); $summary = [ ['label' => 'Today', 'value' => $stats['today'], 'note' => $stats['remaining_today'] . ' remaining', 'icon' => 'calendar-days', 'class' => 'bg-blue-50 text-booklio-primary'], ['label' => 'Confirmed', 'value' => $stats['confirmed_week'], 'note' => 'This week', 'icon' => 'check', 'class' => 'bg-emerald-50 text-emerald-600'], ['label' => 'Pending', 'value' => $stats['pending'], 'note' => 'Needs review', 'icon' => 'clock', 'class' => 'bg-amber-50 text-amber-600'], ['label' => 'No Show', 'value' => $stats['no_show_7_days'], 'note' => 'Last 7 days', 'icon' => 'x', 'class' => 'bg-red-50 text-red-600'], ]; @endphp @section('content')
Manage bookings, status updates, and customer check-ins.
{{ $item['label'] }}
{{ $item['value'] }}
{{ $item['note'] }}
{{ $item->customer?->name ?? 'Customer removed' }}
{{ $item->service?->name ?? 'Service removed' }}
Date
{{ $item->starts_at?->format('M d, Y') }}
Time
{{ $item->starts_at?->format('g:i A') }}
Staff
{{ $item->staffProfile?->name ?? 'Unassigned' }}
Amount
${{ number_format((float) $item->price, 2) }}
{{ $hasActiveFilters ? 'No appointments match the current filters.' : 'Create the first appointment for this business.' }}