{{-- brafa Systems — guest room / check-out (public QR page). Livewire backing: App\Http\Livewire\RoomShow. Bindings preserved: Livewire.emit('checkOut') via confirmCheckOut(), the swal:toast listener, $noBooking / $guestName / $roomDetails / $unitName / $propertyDetails. --}} @php /* beds24 / godo store the last NIGHT as the booking EndDate; the actual checkout is the following day. Add +1 for those APIs so the guest sees the date they actually leave (consistent with the property dashboard). */ $brafaApi = strtolower((string) data_get($propertyDetails, 'API', '')); $brafaCheckoutPlusOne = in_array($brafaApi, ['beds24', 'godo'], true); /* Friendly date formatter. Falls back to the raw value if it can't parse. */ $brafaDate = function ($value, $addDay = false) { if (empty($value)) { return null; } try { $date = \Carbon\Carbon::parse($value); if ($addDay) { $date = $date->copy()->addDay(); } return $date->format('D, d M Y'); } catch (\Throwable $e) { return $value; } }; $brafaCheckIn = $brafaDate($startDate); $brafaCheckOut = $brafaDate($endDate, $brafaCheckoutPlusOne); @endphp
{{ $propertyDetails->PropertyName }}
There are no current bookings for this room.
@else Check-outPlease review your booking details before checking out.
No guest information found.
@endif @endif