@extends('layouts.app')
@section('title', 'My Bookings — ' . config('app.name'))
@section('header')
@if (session('status') === 'booking-requested')
Booking request sent to the provider.
@endif
@if (session('status') === 'checkout-complete')
@if (! empty(session('confirmed_services')))
✅ Booking confirmed for: {{ implode(', ', session('confirmed_services')) }}.
@endif
@if (! empty(session('unmatched_services')))
No professionals are available right now for: {{ implode(', ', session('unmatched_services')) }}. Please try again shortly.
@endif
@endif
@if (session('status') === 'payment-recorded')
Marked as paid.
@endif
@if (session('status') === 'booking-cancelled')
Booking request cancelled.
@elseif (session('status') === 'booking-not-cancellable')
That booking can no longer be cancelled — the provider has already responded to it.
@endif
@if ($bookings->isEmpty())
@else
@foreach ($bookings as $booking)
@php($providerName = $booking->providerProfile->business_name ?? $booking->providerProfile->user->name)
{{ strtoupper(substr($providerName, 0, 1)) }}
{{ $providerName }}
{{ $booking->service->name }}
{{ str_replace('_', ' ', $booking->status) }}
{{ $booking->booking_type === 'instant' ? '⚡ Insta Help' : '📅 Scheduled' }}
{{ $booking->scheduled_at->format('d M Y, H:i') }}
₹{{ number_format($booking->amount, 2) }}
{{ $booking->payment_status }}
- Business
- {{ $booking->providerProfile->business_name ?? $booking->providerProfile->user->name }}
- Contact person
- {{ $booking->providerProfile->user->name }}
- Phone
-
@if ($booking->providerPhoneVisible() && $booking->providerProfile->user->phone)
{{ $booking->providerProfile->user->phone }}
@else
Shared once the provider accepts
@endif
- Location
- {{ collect([$booking->providerProfile->address_line, $booking->providerProfile->city])->filter()->implode(', ') ?: '—' }}
- Experience
- {{ $booking->providerProfile->experience_years ?? 0 }} yrs
@if ($booking->isCancellable())
@endif
@if ($booking->status === 'completed' && $booking->payment_status === 'pending')
@endif
@endforeach
@endif
@endsection