{{-- Left rail --}} {{-- Main --}}
{{ __('Integrations') }} / {{ __('Appointments') }}
@if ($isConnected)

{{ __('Upcoming') }} {{ __('bookings') }}

{{ __('Calendar:') }} {{ $settings['google_oauth']['calendar_name'] ?? '—' }} · {{ $upcoming->count() }} {{ __('upcoming') }}

Settings
@else

{{ __('Connect') }} {{ __('Google Calendar') }}

{{ __("Let customers book appointments inside WhatsApp. :app reads your calendar's availability and writes confirmed bookings back as events.", ['app' => \App\Models\SystemSetting::get('app_name', config('app.name', 'WaDesk'))]) }}

@endif
@if (session('success'))
{{ session('success') }}
@endif @if (session('error'))
{{ session('error') }}
@endif @if (!$isConnected)

{{ __('Set up booking') }}

{{ __('Connect a Google Calendar, pick your availability windows, and drop a "Book Appointment" node into any flow. Customers pick a slot from a WhatsApp list message — :app writes it to your calendar.', ['app' => \App\Models\SystemSetting::get('app_name', config('app.name', 'WaDesk'))]) }}

Set up booking
@else

{{ __('Upcoming') }} {{ $upcoming->count() }}

@if ($upcoming->isEmpty())
{{ __('No upcoming bookings') }}

{{ __('Add a') }} {{ __('Book appointment') }} node to any flow — customers will be able to book from here.

@else
@foreach ($upcoming as $a) @php $statusCss = match ($a->status) { 'confirmed' => 'bg-wa-green/15 text-wa-deep', 'pending' => 'bg-accent-amber/20 text-accent-amber', default => 'bg-paper-100 text-ink-700', }; @endphp @endforeach
{{ __('When') }} {{ __('Customer') }} {{ __('Title') }} {{ __('Status') }}
{{ $a->starts_at?->setTimezone($a->timezone)->format('D j M') }}
{{ $a->starts_at?->setTimezone($a->timezone)->format('g:i A') }} – {{ $a->ends_at?->setTimezone($a->timezone)->format('g:i A') }} {{ $a->timezone }}
{{ $a->meta['customer_name'] ?? '—' }}
{{ $a->meta['customer_phone'] ?? '' }}
{{ $a->title }} {{ $a->status }} @if (in_array($a->status, ['pending', 'confirmed']))
@csrf
@endif
@endif
@if ($past->isNotEmpty())

{{ __('Recent past') }} {{ $past->count() }}

@foreach ($past->take(10) as $p) @endforeach
{{ $p->starts_at?->setTimezone($p->timezone)->format('D j M, g:i A') }} {{ $p->meta['customer_name'] ?? '—' }} {{ $p->title }} {{ $p->status }}
@endif @endif