@extends('layouts.customer-dashboard') @section('title', 'My Tour Bookings') {{-- Breadcrumb --}} @section('breadcrumb')
@endsection {{-- Dashboard Content --}} @section('dashboard-content') @php $upcoming = $bookings->filter(fn($b) => $b->status === 'confirmed' && \Carbon\Carbon::parse($b->travel_start_date)->isFuture()); $past = $bookings->filter(fn($b) => $b->status === 'confirmed' && \Carbon\Carbon::parse($b->travel_start_date)->isPast()); $cancelled = $bookings->filter(fn($b) => $b->status === 'cancelled'); @endphpTotal Bookings: {{ $bookings->count() }} | Upcoming: {{ $upcoming->count() }} | Past: {{ $past->count() }} | Cancelled: {{ $cancelled->count() }}
Upcoming Tours
Past Tours
Cancelled
| Booking ID | Tour & Type | Travellers | Duration | Package Price | Travel Date | Trip Status | Booking Status | |
|---|---|---|---|---|---|---|---|---|
| #BK-{{ $booking->id }} | {{-- Tour & Type --}}{{-- Travellers --}} | {{ $booking->adults }} Adults @if($booking->children > 0) {{ $booking->children }} Children @endif @if(($booking->infants ?? 0) > 0) {{ $booking->infants }} Infants @endif | {{-- Duration --}}{{ $numDays }} Days {{ $numDays > 0 ? ($numDays - 1) . ' Nights' : '—' }} | {{-- Price --}}₹ {{ number_format($pkgPrice) }} | {{-- Travel Date --}}{{ $startDate->format('d M Y') }} @if($endDate) to {{ $endDate->format('d M Y') }} @endif | {{-- Trip Status (upcoming / ongoing / completed) --}}@if($tripStatus === 'upcoming') Upcoming @elseif($tripStatus === 'ongoing') Ongoing @elseif($tripStatus === 'completed') Completed @elseif($tripStatus === 'cancelled') Cancelled @endif | {{-- Booking Status (confirmed / cancelled / pending) --}}@if($booking->status === 'pending') Pending @elseif($booking->status === 'confirmed') Confirmed @elseif($booking->status === 'cancelled') Cancelled @endif | {{-- View --}}|
| No tour bookings found. Explore tours | ||||||||