@extends('layouts.app') @section('title', 'Bookings — ' . config('app.name')) @section('header')

{{ __('Bookings') }}

@endsection @section('content')
@if (session('status')) @php $messages = [ 'booking-accepted' => ['success', 'Booking accepted.'], 'booking-rejected' => ['secondary', 'Booking rejected.'], 'booking-completed' => ['success', 'Booking marked completed.'], 'booking-not-actionable' => ['warning', 'That booking has changed (for example, the customer cancelled it), so no action was taken.'], ]; [$variant, $message] = $messages[session('status')] ?? [null, null]; @endphp @if ($message)
{{ $message }}
@endif @endif @if ($bookings->isEmpty())

No bookings yet.

@else
@foreach ($bookings as $booking)
{{ strtoupper(substr($booking->customer->name, 0, 1)) }}

{{ $booking->customer->name }}

{{ str_replace('_', ' ', $booking->status) }}

{{ $booking->service->name }} {{ $booking->booking_type === 'instant' ? '⚡ Insta Help' : '📅 Scheduled' }}

{{ $booking->scheduled_at->format('d M Y, H:i') }} · ₹{{ number_format($booking->amount, 2) }}

@if ($booking->status === 'requested')
@csrf @method('PATCH')
@csrf @method('PATCH')
@elseif ($booking->status === 'accepted')
@csrf @method('PATCH')
@endif
@endforeach
@foreach ($bookings as $booking) @endforeach
Customer Service Type Scheduled Amount Status
{{ strtoupper(substr($booking->customer->name, 0, 1)) }} {{ $booking->customer->name }}
{{ $booking->service->name }} {{ $booking->booking_type === 'instant' ? '⚡ Insta Help' : '📅 Scheduled' }} {{ $booking->scheduled_at->format('d M Y, H:i') }} ₹{{ number_format($booking->amount, 2) }} {{ str_replace('_', ' ', $booking->status) }} @if ($booking->status === 'requested')
@csrf @method('PATCH')
@csrf @method('PATCH')
@elseif ($booking->status === 'accepted')
@csrf @method('PATCH')
@endif
@endif
@endsection