@extends('layouts.app') @section('title', 'Guest Details') @section('page-title', 'Guest Details') @section('content')
Guest Information
Full Name: {{ $guest->first_name }} {{ $guest->last_name }}
Email: {{ $guest->email ?? 'Not provided' }}
Phone: {{ $guest->phone ?? 'Not provided' }}
Address: {{ $guest->address ?? 'Not provided' }}
Nationality: {{ $guest->nationality ?? 'Nigerian' }}
Status: @if($guest->status === 'vip') VIP @elseif($guest->status === 'blacklisted') Blacklisted @else Active @endif
@if($guest->id_type)
ID Type: {{ str_replace('_', ' ', ucfirst($guest->id_type)) }}
ID Number: {{ $guest->id_number }}
@endif @if($guest->blacklist_reason)
Blacklist Reason: {{ $guest->blacklist_reason }}
@endif
Statistics
Total Stays: {{ $guest->bookings->count() }}
Total Spent: ₦{{ number_format($guest->bookings->sum(function($b) { return $b->invoice->total ?? 0; }), 2) }}
Last Visit: {{ $guest->bookings->sortByDesc('created_at')->first()?->created_at->format('d M Y') ?? 'Never' }}
Booking History
@if($guest->bookings->count() > 0) @foreach($guest->bookings as $booking) @endforeach
Booking RefRoomCheck InCheck OutTotalStatus
{{ $booking->booking_reference }} {{ $booking->room->room_number ?? 'N/A' }} - {{ $booking->room->roomType->name ?? 'N/A' }} {{ $booking->check_in_date->format('d M Y') }} {{ $booking->check_out_date->format('d M Y') }} ₦{{ number_format($booking->invoice->total ?? 0, 2) }} {{ ucfirst($booking->status) }} View
@else

No booking history for this guest.

@endif
@endsection