@php use Illuminate\Support\Carbon; @endphp @extends('admin.layouts.master') @section('title', 'Edit Customer') @section('content')

Customer Details

Name: {{ $customer->name ?? 'N/A'}}

Email: {{ $customer->email ?? 'N/A' }}

Phone: {{ $customer->phone ?? 'N/A' }}

Referral Points: {{ $customer->referral_points ?? 0 }}

Referral Code: {{ $customer->referral_code ?? 'N/A' }}

{{-- Passport Expiry Status --}}

Passport Status: @if(!$customer->passport_uploaded_at) Not Uploaded @else @php $uploaded = Carbon::parse($customer->passport_uploaded_at); $now = Carbon::now(); $alertDate = $uploaded->copy()->addMonths(5); $expiryDate = $uploaded->copy()->addMonths(7); @endphp @if($now->gte($expiryDate)) Expired on {{ $expiryDate->format('Y-m-d') }} @elseif($now->gte($alertDate)) Expiring Soon ({{ $expiryDate->format('Y-m-d') }}) @else Valid until {{ $expiryDate->format('Y-m-d') }} @endif @endif

@if($customer->passport_uploaded_at)

Uploaded On: {{ $uploaded->format('Y-m-d') }}

Expires On: {{ $expiryDate->format('Y-m-d') }}

@endif

Bookings

@if($customer->bookings->isEmpty())

No bookings found.

@else
@foreach($customer->bookings as $booking)
Booking ID: {{ $booking->id }}
{{ $booking->created_at->format('Y-m-d') }}

Package: {{ $booking->package->title ?? 'No package info' }}

@endforeach
@endif

Enquiries

@if($customer->enquiries->isEmpty())

No enquiries found.

@else
@foreach($customer->enquiries as $enquiry)
Enquiry ID: {{ $enquiry->id }}

Message: {{ $enquiry->message ?? 'N/A' }}

@endforeach
@endif

Communications

@if($customer->communications->isEmpty())

No communications found.

@else
@foreach($customer->communications as $communication)
Communication ID: {{ $communication->id }}

Message: {{ \Illuminate\Support\Str::limit($communication->message, 50) }}

@endforeach
@endif ← Go Back
@endsection