@php $timeout = $booking->timeout_at ? \Carbon\Carbon::parse($booking->timeout_at) : null; $isExpired = $timeout ? $timeout->isPast() : false; // Default country code if missing $hostPhone = $booking->detail && $booking->detail->createdBy ? ($booking->detail->createdBy->country_code . $booking->detail->createdBy->contact_no) : ''; $custPhone = $booking->customer ? ($booking->customer->country_code . $booking->customer->contact_no) : ''; @endphp
#{{ $booking->unique_id ?? $booking->id }} @if($timeout) @if($isExpired) انتهت المهلة @else متبقي {{ $timeout->diffForHumans(null, \Carbon\CarbonInterface::DIFF_ABSOLUTE) }} @endif @endif
الزبون
{{ $booking->customer ? (trim($booking->customer->first_name . ' ' . $booking->customer->last_name) ?: $booking->customer->full_name) : 'غير معروف' }}
@if($custPhone) @endif
العقار والمضيف
{{ $booking->detail->title ?? 'غير معروف' }}
{{ $booking->detail && $booking->detail->createdBy ? $booking->detail->createdBy->full_name : 'غير معروف' }}
@if($hostPhone) @endif
Check-in {{ \Carbon\Carbon::parse($booking->start_date)->format('M d') }}
Check-out {{ \Carbon\Carbon::parse($booking->end_date)->format('M d') }}
{{ number_format($booking->total_amount, 2) }} LYD
فتح التفاصيل @if($booking->state_id != 12 && $booking->state_id != 7) @endif