@extends('layouts.admin') @section('title', 'User Profile') @section('content')

User Profile

{{ substr($user->name, 0, 1) }}

{{ $user->name }}

{{ $user->email }}

@if($user->hasRole('admin')) Administrator @else Customer @endif

Phone

{{ $user->phone ?? 'Not provided' }}

Address

{{ $user->address ?? 'Not provided' }}

Joined Date

{{ $user->created_at->format('F d, Y') }}

Total Bookings

{{ $user->bookings->count() }}

Booking History

@if($user->bookings->count() > 0)
@foreach($user->bookings as $booking)
@if($booking->package->main_image) {{ $booking->package->title }} @else
@endif

{{ $booking->package->title }}

Ref: {{ $booking->booking_reference }} • {{ $booking->total_people }} Pax

{{ $booking->formatted_total_amount }}

@php $statusClasses = [ 'pending' => 'text-yellow-600', 'confirmed' => 'text-green-600', 'cancelled' => 'text-red-600', ]; $class = $statusClasses[$booking->status] ?? 'text-gray-500'; @endphp

{{ ucfirst($booking->status) }}

@endforeach
@else

This user hasn't made any bookings yet.

@endif
@endsection