@extends('layouts.app') @section('title', 'Housekeeping') @section('page_title', 'Housekeeping') @section('page_subtitle', 'Room status & cleaning queue — {{ now()->format(\'F j, Y\') }}') @section('nav_housekeeping', 'bg-teal-50 text-teal-700 font-semibold') @section('content') @if (session('success'))

{{ session('success') }}

@endif {{-- ===== STAT CARDS ===== --}}

Needs Cleaning

{{ $stats['dirty'] }}

Dirty rooms

Priority

{{ $stats['priority'] }}

Arriving today

Clean / Ready

{{ $stats['clean'] }}

Ready for sale

In-House

{{ $stats['occupied'] }}

Stayovers

Available

{{ $stats['available'] }}

Vacant & ready

Maintenance

{{ $stats['maintenance'] }}

Out of service

{{-- ===== PRIORITY: ARRIVING TODAY ===== --}} @if ($priorityRooms->isNotEmpty())

Urgent — Guest Arriving Today

{{ $priorityRooms->count() }}

These rooms must be cleaned before the guest arrives.

@foreach ($priorityRooms as $room)
{{ $room->no }} URGENT

{{ $room->type }}

{{ $room->beds }} · Floor {{ $room->floor }}

@if ($room->notes)

{{ $room->notes }}

@endif
@csrf
@csrf
@endforeach
@endif {{-- ===== NEEDS CLEANING ===== --}} @if ($normalByFloor->isNotEmpty())

Needs Cleaning

{{ $normalByFloor->flatten()->count() }}
@foreach ($normalByFloor as $floor => $rooms)

Floor {{ $floor }}

{{ $rooms->count() }} room{{ $rooms->count() !== 1 ? 's' : '' }}
@foreach ($rooms as $room) @php $isTomorrow = isset($arrivingTomorrow[$room->no]); @endphp
{{ $room->no }} @if ($isTomorrow) Tomorrow @endif

{{ $room->type }}

{{ $room->beds }}

@if ($room->notes)

{{ $room->notes }}

@endif
@csrf
@csrf
@csrf
View Room Details
@endforeach
@endforeach
@endif {{-- Empty state when nothing dirty --}} @if ($priorityRooms->isEmpty() && $normalByFloor->isEmpty())

All rooms are clean!

No rooms need cleaning right now.

@endif {{-- ===== CLEAN ROOMS (READY) ===== --}} @if ($cleanRooms->isNotEmpty())

Clean & Ready

{{ $cleanRooms->count() }}

Cleaned — available for sale

@foreach ($cleanRooms as $room)
{{ $room->no }}

{{ $room->type }}

Floor {{ $room->floor }}

@csrf
@csrf
@endforeach
@endif {{-- ===== MAINTENANCE / OUT OF ORDER ===== --}} @if ($maintenanceRooms->isNotEmpty())

Maintenance & Out of Order

{{ $maintenanceRooms->count() }}
@foreach ($maintenanceRooms as $room)
{{ $room->no }}

{{ $room->type }}

{{ $room->status === 'out_of_order' ? 'Out of Order' : 'Maintenance' }}

{{ $room->beds }} · Floor {{ $room->floor }}

@if ($room->notes)

{{ $room->notes }}

@endif
@csrf
@csrf
Details
@endforeach
@endif @endsection