@extends('layouts.app') @section('title', $guest->full_name) @section('nav_guests', 'bg-teal-50 text-teal-700 font-semibold') @section('page_title', $guest->full_name) @section('page_subtitle', 'Guest profile & stay history') @section('content') @if (session('success'))

{{ session('success') }}

@endif @php $statusBadge = [ 'pending' => 'bg-amber-50 text-amber-700 border-[0.5px] border-amber-200', 'confirmed' => 'bg-teal-50 text-teal-700 border-[0.5px] border-teal-200', 'checked_in' => 'bg-green-50 text-green-700 border-[0.5px] border-green-200', 'checked_out' => 'bg-gray-50 text-gray-500 border-[0.5px] border-gray-200', 'cancelled' => 'bg-red-50 text-red-600 border-[0.5px] border-red-200', 'no_show' => 'bg-orange-50 text-orange-600 border-[0.5px] border-orange-200', ]; $statusLabel = [ 'pending' => 'Pending', 'confirmed' => 'Confirmed', 'checked_in' => 'Checked In', 'checked_out' => 'Checked Out', 'cancelled' => 'Cancelled', 'no_show' => 'No Show', ]; $totalStays = $reservations->whereIn('status', ['checked_in', 'checked_out'])->count(); $totalSpent = $reservations->whereIn('status', ['checked_in', 'checked_out'])->sum('amount'); $firstStay = $reservations->whereIn('status', ['checked_in', 'checked_out'])->last(); $lastStay = $reservations->whereIn('status', ['checked_in', 'checked_out'])->first(); @endphp {{-- Back + Actions --}}
Back to Guests
New Reservation Edit Profile
{{-- LEFT: Profile (2/3) --}}
{{-- Header card --}}
{{ strtoupper(substr($guest->first_name, 0, 1)) }}{{ strtoupper(substr($guest->last_name, 0, 1)) }}

{{ $guest->full_name }}

@if($guest->vip) VIP @endif @if($guest->blacklisted) BLACKLISTED @endif
@if($guest->company)

{{ $guest->company }}

@endif

Profile #{{ $guest->id }} · Added {{ $guest->created_at->format('M j, Y') }}

{{-- Contact row --}}

Phone

{{ $guest->phone ?? '—' }}

Email

{{ $guest->email ?? '—' }}

Date of Birth

{{ $guest->date_of_birth ? $guest->date_of_birth->format('F j, Y') : '—' }} @if($guest->date_of_birth) ({{ $guest->date_of_birth->age }} yrs) @endif

Nationality

{{ $guest->nationality ?? '—' }}

{{-- ID & Address --}}

Government ID

Type

{{ $guest->id_type ?? '—' }}

Number

{{ $guest->id_number ?? '—' }}

@if($guest->id_image) @endif

Address

@if($guest->address)

{{ $guest->address }}

@endif @if($guest->city || $guest->province)

{{ implode(', ', array_filter([$guest->city, $guest->province])) }}

@endif

{{ $guest->country ?? '—' }}

{{-- Notes --}} @if($guest->notes)

Notes & Preferences

{{ $guest->notes }}

@endif {{-- Stay History --}}

Stay History

@forelse($reservations as $res)

{{ $res->booking_no }}

{{ $statusLabel[$res->status] ?? $res->status }}

Room {{ $res->room_no }} · {{ $res->room_type }} · {{ $res->check_in->format('M j') }}–{{ $res->check_out->format('M j, Y') }} · {{ $res->nights }} night{{ $res->nights > 1 ? 's' : '' }}

₱{{ number_format($res->amount, 0) }}

@php $bal = $res->balanceDue(); @endphp @if($bal > 0)

₱{{ number_format($bal, 0) }} due

@elseif(in_array($res->status, ['checked_in', 'checked_out']))

Settled

@endif
View →
@empty
No reservations linked to this profile.
@endforelse
{{-- RIGHT: Stats (1/3) --}}
{{-- Stay stats --}}

Stay Statistics

Total Stays

{{ $totalStays }}

Total Spent

₱{{ number_format($totalSpent, 0) }}

@if($firstStay)

First Stay

{{ $firstStay->check_in->format('M j, Y') }}

@endif @if($lastStay)

Most Recent Stay

{{ $lastStay->check_in->format('M j, Y') }}

@endif
{{-- Quick actions --}}
@endsection