@extends('layouts.app')
@section('title', 'My Bookings — CareerPath')
@push('styles')
@endpush
@section('content')
{{-- PAGE HERO --}}
{{-- STATS ROW --}}
@php
$total = $bookings->total();
$pending = $bookings->getCollection()->where('status','pending')->count();
$confirmed = $bookings->getCollection()->where('status','confirmed')->count();
$completed = $bookings->getCollection()->where('status','completed')->count();
@endphp
📋
{{ $total }}
Total Sessions
✅
{{ $confirmed }}
Confirmed
🎓
{{ $completed }}
Completed
{{-- FILTER BAR --}}
All
@foreach(['pending' => '⏳ Pending', 'confirmed' => '✅ Confirmed', 'completed' => '🎓 Completed', 'cancelled' => '❌ Cancelled'] as $val => $label)
{{ $label }}
@endforeach
{{-- BOOKING LIST --}}
@forelse($bookings as $b)
{{-- AVATAR --}}
{{ substr($b->counselor->user->name ?? 'C', 0, 1) }}
{{-- INFO --}}
{{ $b->counselor->user->name ?? 'Counselor' }}
{{ $b->counselor->specialization ?? 'Career Counselor' }}
{{ optional($b->booking_date)->format('d M Y') ?? '—' }}
{{ $b->booking_time ?? '—' }}
{{ ucfirst($b->meeting_type ?? 'Online') }}
PKR {{ number_format($b->fee ?? 0) }}
{{-- STATUS + ACTIONS --}}
{{ ucfirst($b->status) }}
@if($b->status == 'pending')
@endif
@if($b->status == 'confirmed')
View Counselor
@endif
{{-- EXPANDABLE DETAILS --}}
@if($b->student_message)
Your Message
{{ $b->student_message }}
@endif
@empty
📭
No bookings found
@if(request('status'))
No {{ request('status') }} bookings. Try a different filter.
@else
You haven't booked any sessions yet.
@endif
@if(request('status'))
View All
@endif
Find a Counselor
@endforelse
{{-- PAGINATION --}}
@if($bookings->hasPages())
{{ $bookings->appends(request()->query())->links() }}
@endif
@endsection