@php $idTypeLabels = [ 'passport' => __('hotel::modules.guest.passport'), 'aadhaar' => __('hotel::modules.guest.aadhaar'), 'driving_license' => __('hotel::modules.guest.drivingLicense'), 'national_id' => __('hotel::modules.guest.nationalId'), 'other' => __('hotel::modules.guest.other'), ]; $idTypeLabel = $guest->id_type ? ($idTypeLabels[$guest->id_type] ?? ucfirst(str_replace('_', ' ', $guest->id_type))) : null; $initials = collect(explode(' ', $guest->full_name)) ->map(fn ($w) => strtoupper($w[0] ?? ''))->take(2)->join(''); $docPath = $guest->id_proof_file; $docUrl = $docPath ? asset_url_local_s3('guest-id-proof/' . $docPath) : null; $docExt = $docPath ? strtolower(pathinfo($docPath, PATHINFO_EXTENSION)) : ''; $isPdf = $docExt === 'pdf'; $dobFormatted = $guest->date_of_birth ? $guest->date_of_birth->format(config('app.date_format', 'Y-m-d')) : null; $hasAddress = collect([$guest->address, $guest->city, $guest->state, $guest->country, $guest->postal_code]) ->filter(fn ($v) => $v !== null && $v !== '') ->isNotEmpty(); @endphp
{{-- Identity header: light, compact (PMS / travel-app style) --}}
{{ $initials ?: '?' }}

{{ $guest->full_name }}

{{ __('hotel::modules.guest.guestProfileSubtitle') }}

@if($guest->customer)

{{ __('hotel::modules.guest.linkedCustomer') }}: {{ $guest->customer->name }}

@endif
@if(filled($guest->phone)) {{ $guest->phone }} @endif @if(filled($guest->email)) {{ $guest->email }} @endif
{{-- Single definition list: neutral, scannable --}}

{{ __('hotel::modules.guest.profileDetails') }}

@foreach([ [__('hotel::modules.guest.email'), $guest->email], [__('hotel::modules.guest.phone'), $guest->phone], [__('hotel::modules.guest.idType'), $idTypeLabel], [__('hotel::modules.guest.idNumber'), $guest->id_number], ] as [$label, $val])
{{ $label }}
{{ ($val !== null && $val !== '') ? $val : '—' }}
@endforeach
{{-- ID: compact preview + actions (no oversized image) --}}

{{ __('hotel::modules.guest.idVerification') }}

@if($docUrl) @endif
@if($docUrl) @if($isPdf)

{{ basename($docPath) }}

{{ __('hotel::modules.guest.pdfPreviewHint') }}

@else
{{ __('hotel::modules.guest.idProof') }}

{{ basename($docPath) }}

@endif @else

{{ __('hotel::modules.guest.noIdDocument') }}

@endif
{{-- Address: only full card when there is data; otherwise one line --}} @if($hasAddress)

{{ __('hotel::modules.guest.sectionAddress') }}

@if(filled($guest->address))

{{ __('hotel::modules.guest.address') }}

{{ $guest->address }}

@endif
@foreach([ [__('hotel::modules.guest.city'), $guest->city], [__('hotel::modules.guest.state'), $guest->state], [__('hotel::modules.guest.country'), $guest->country], [__('hotel::modules.guest.postalCode'), $guest->postal_code], ] as [$label, $val]) @if(filled($val))

{{ $label }}

{{ $val }}

@endif @endforeach
@else

{{ __('hotel::modules.guest.noAddressOnFile') }}

@endif @if($guest->notes)

{{ __('hotel::modules.guest.notes') }}

{{ $guest->notes }}

@endif