@extends('layouts.app') @section('title', 'Room ' . $room['no']) @section('page_title', 'Room ' . $room['no'] . ' — ' . $room['name']) @section('page_subtitle', $room['type'] . ' · Floor ' . $room['floor'] . ', Wing ' . $room['wing']) @section('nav_rooms', 'bg-teal-50 text-teal-700 font-semibold') @section('content') @php $statusConfig = [ 'available' => ['label' => 'Available', 'badge' => 'bg-teal-50 text-teal-700 border-teal-200', 'dot' => 'bg-teal-500'], 'occupied' => ['label' => 'Occupied', 'badge' => 'bg-teal-100 text-teal-800 border-teal-300', 'dot' => 'bg-teal-600'], 'dirty' => ['label' => 'Dirty', 'badge' => 'bg-amber-50 text-amber-700 border-amber-200', 'dot' => 'bg-amber-500'], 'clean' => ['label' => 'Clean', 'badge' => 'bg-green-50 text-green-700 border-green-200', 'dot' => 'bg-green-500'], 'maintenance' => ['label' => 'Maintenance', 'badge' => 'bg-orange-50 text-orange-700 border-orange-200', 'dot' => 'bg-orange-500'], 'out_of_order' => ['label' => 'Out of Order', 'badge' => 'bg-red-50 text-red-600 border-red-200', 'dot' => 'bg-red-500'], ]; $cfg = $statusConfig[$room['status']]; @endphp
@if (session('success'))
{{ session('success') }}
@endif {{-- Back + Actions --}}
Back to Rooms
@if ($room['status'] === 'dirty') @endif @if ($room['status'] === 'clean') @endif @if (in_array($room['status'], ['available', 'clean'])) @endif Edit Room
{{-- LEFT: Room Overview (2/3) --}}
{{-- Room Card --}}
{{-- Header band --}}

Room {{ $room['no'] }}

{{ $room['name'] }}

{{ $room['type'] }} — Floor {{ $room['floor'] }}, Wing {{ $room['wing'] }}

{{ $cfg['label'] }}
{{-- Decorative circles --}}
{{-- Room specs --}}

Room Size

{{ $room['sqm'] }} m²

Bed Type

{{ $room['beds'] }}

Max Occupancy

{{ $room['max_pax'] }} pax

Rate / Night

₱{{ number_format($room['rate'], 0) }}

{{-- Amenities --}}

Room Amenities @if ($room['amenities']) ({{ count($room['amenities']) }}) @endif

@if (!empty($room['amenities']))
@foreach ($room['amenities'] as $amenity)
{{ $amenity }}
@endforeach
@else

No amenities listed for this room.

@endif
{{-- Maintenance notes (if applicable) --}} @if ($room['notes'] && in_array($room['status'], ['maintenance', 'out_of_order', 'dirty']))

Note

{{ $room['notes'] }}

@endif
{{-- RIGHT: Guest / Activity (1/3) --}}
{{-- Current Guest --}}

Current Status

@if ($room['status'] === 'occupied' && $currentReservation)
{{ strtoupper(substr($currentReservation['guest'], 0, 1)) }}{{ strtoupper(substr(explode(' ', $currentReservation['guest'])[1] ?? 'X', 0, 1)) }}

{{ $currentReservation['guest'] }}

In-house guest

Check-in {{ \Carbon\Carbon::parse($currentReservation['check_in'])->format('M j, Y') }}
Check-out {{ \Carbon\Carbon::parse($currentReservation['check_out'])->format('M j, Y') }}
Nights {{ \Carbon\Carbon::parse($currentReservation['check_in'])->diffInDays(\Carbon\Carbon::parse($currentReservation['check_out'])) }}N
@else

No current guest

@if (in_array($room['status'], ['available', 'clean'])) + Create Reservation @endif
@endif
{{-- Quick Actions --}}

Quick Actions

Edit Room Details
@endsection