{{-- resources/views/rooms/index.blade.php --}} @extends('layouts.app') @section('title', 'Rooms') @section('page_title', 'Rooms') @section('page_subtitle', 'All rooms in your property') @section('content') {{-- Filters --}}
{{-- Rooms table --}}
Rooms {{ $rooms->total() }} total
@if($rooms->isEmpty())

No rooms found

@if(request()->hasAny(['category', 'status'])) No rooms match your filters. Clear filters @else Add your first room to get started. @endif

@if(!request()->hasAny(['category', 'status'])) Add First Room @endif
@else
@foreach($rooms as $room) @php $statusColors = [ 'available' => ['bg' => '#d1fae5', 'color' => '#065f46'], 'occupied' => ['bg' => '#fdf1eb', 'color' => '#C4622D'], 'dirty' => ['bg' => '#fef3c7', 'color' => '#92400e'], 'clean' => ['bg' => '#dbeafe', 'color' => '#1e40af'], 'maintenance' => ['bg' => '#f1f5f9', 'color' => '#475569'], 'out_of_order'=> ['bg' => '#fee2e2', 'color' => '#991b1b'], ]; $sc = $statusColors[$room->status] ?? $statusColors['available']; @endphp @endforeach
Room Category Floor Status Active Actions
Room {{ $room->number }}
@if($room->name)
{{ $room->name }}
@endif
{{ $room->category?->name ?? '—' }} {{ $room->floor !== null ? 'Floor ' . $room->floor : '—' }} {{ ucfirst(str_replace('_', ' ', $room->status)) }} @if($room->is_active) @else @endif
View {{-- Quick status change --}}
@csrf @method('DELETE')
@if($rooms->hasPages())
{{ $rooms->links() }}
@endif @endif
@endsection