@extends('layouts.app') @section('title', 'Reservations') @section('page_title', 'Reservations') @section('page_subtitle', 'Manage all hotel reservations') @section('nav_reservations', 'bg-teal-50 text-teal-700 font-semibold') @section('content') @if (session('success'))
{{ session('success') }}
{{ session('error') }}
Arrivals Today
{{ $stats['arrivals_today'] }}
Check-ins due
Departures Today
{{ $stats['departures_today'] }}
Check-outs due
In-House
{{ $stats['in_house'] }}
Currently staying
Available Rooms
{{ $stats['available_rooms'] }}
of {{ $stats['total_rooms'] }} total
Occupancy Rate
{{ $stats['occupancy_rate'] }}%
{{ now()->format('F j, Y') }}
| @php $bnDir = ($sort === 'booking_no' && $dir === 'asc') ? 'desc' : 'asc'; @endphp Booking # @if ($sort === 'booking_no') @if ($dir === 'asc') @else @endif @else @endif | Guest | Room | @php $ciDir = ($sort === 'check_in' && $dir === 'asc') ? 'desc' : 'asc'; @endphp Check-in @if ($sort === 'check_in') @if ($dir === 'asc') @else @endif @else @endif | @php $coDir = ($sort === 'check_out' && $dir === 'asc') ? 'desc' : 'asc'; @endphp Check-out @if ($sort === 'check_out') @if ($dir === 'asc') @else @endif @else @endif | Nights | Source | Status | Deposit | Amount | Actions |
|---|---|---|---|---|---|---|---|---|---|---|
| @if($trashed) {{ $res['booking_no'] }} @else {{ $res['booking_no'] }} @endif @if ($res['group_id']) @endif |
{{ strtoupper(substr($res['guest_name'], 0, 1)) }}{{ strtoupper(substr(explode(' ', $res['guest_name'])[1] ?? 'X', 0, 1)) }}
{{ $res['guest_name'] }} {{ $res['pax'] }} pax |
Room {{ $res['room_no'] }} {{ $res['room_type'] }} |
{{ \Carbon\Carbon::parse($res['check_in'])->format('M j, Y') }} @if ($res['check_in'] === now()->format('Y-m-d') && $res['status'] === 'confirmed')Today @endif |
{{ \Carbon\Carbon::parse($res['check_out'])->format('M j, Y') }} @if ($res['check_out'] === now()->format('Y-m-d') && $res['status'] === 'checked_in')Due Today @endif |
{{ $res['nights'] }}N | {{ $res['source'] }} | @php $badges = [ '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', ]; $labels = [ 'pending' => 'Pending', 'confirmed' => 'Confirmed', 'checked_in' => 'Checked In', 'checked_out' => 'Checked Out', 'cancelled' => 'Cancelled', 'no_show' => 'No Show', ]; @endphp @if ($res['status'] === 'checked_in') @endif {{ $labels[$res['status']] ?? $res['status'] }} | @if ($res['deposit_paid']) ₱{{ number_format($res['deposit_amount'], 0) }} @else — @endif |
₱{{ number_format($res['amount'], 2) }} ₱{{ number_format($res['rate'], 0) }}/night |
@if($trashed)
{{-- Trash actions: Restore + Permanent Delete --}}
@if(auth()->user()->isAdmin())
@endif
@else
{{-- Normal actions --}}
@if (in_array($res['status'], ['confirmed', 'pending']))
@endif
@if ($res['status'] === 'checked_in')
@endif
@endif
@if ($res['status'] === 'pending')
@endif
@if ($res['status'] === 'checked_out')
@endif
@if ($res['status'] === 'checked_in')
@endif
@if (in_array($res['status'], ['cancelled', 'no_show']))
@endif
@if (in_array($res['status'], ['checked_out', 'checked_in', 'cancelled', 'no_show']))
@endif
@if (in_array($res['status'], ['confirmed', 'pending']))
@endif
@if (in_array($res['status'], ['pending', 'confirmed', 'checked_in']))
@endif
|
{{ $reservations->total() }} {{ $hasFilters ? 'matching' : 'total' }} reservation{{ $reservations->total() !== 1 ? 's' : '' }} @if($hasFilters) — show all @endif
{{ $reservations->links() }}