{{-- resources/views/rooms/show.blade.php --}} @extends('layouts.app') @section('title', 'Room ' . $room->number) @section('page_title', 'Room ' . $room->number) @section('page_subtitle', $room->category?->name . ($room->name ? ' — ' . $room->name : '')) @section('content')
← Rooms Edit
@php $statusColors = [ 'available' => ['bg' => '#d1fae5', 'color' => '#065f46', 'icon' => 'bi-check-circle'], 'occupied' => ['bg' => '#fdf1eb', 'color' => '#C4622D', 'icon' => 'bi-person-fill'], 'dirty' => ['bg' => '#fef3c7', 'color' => '#92400e', 'icon' => 'bi-exclamation-circle'], 'clean' => ['bg' => '#dbeafe', 'color' => '#1e40af', 'icon' => 'bi-stars'], 'maintenance' => ['bg' => '#f1f5f9', 'color' => '#475569', 'icon' => 'bi-tools'], 'out_of_order'=> ['bg' => '#fee2e2', 'color' => '#991b1b', 'icon' => 'bi-x-circle'], ]; $sc = $statusColors[$room->status] ?? $statusColors['available']; @endphp
{{ $room->number }}
@if($room->name)
{{ $room->name }}
@endif
{{ ucfirst(str_replace('_', ' ', $room->status)) }}
Category {{ $room->category?->name }}
Floor {{ $room->floor ?? '—' }}
Max Occupancy {{ $room->category?->max_occupancy ?? '—' }}
Active {{ $room->is_active ? 'Yes' : 'No' }}
{{-- Quick status buttons --}} @if($room->status !== 'occupied')
Update Status
@foreach(['available','dirty','clean','maintenance'] as $s) @if($s !== $room->status)
@csrf @method('PUT')
@endif @endforeach
@endif
{{-- Current Guest --}} @if($currentReservation)
Currently Occupied
{{ $currentReservation->reservation?->guest?->first_name }} {{ $currentReservation->reservation?->guest?->last_name }}
{{ $currentReservation->reservation?->reference }} · Check out: {{ $currentReservation->reservation?->check_out_date?->format('d M Y') }}
View Reservation
@endif {{-- Notes --}} @if($room->notes)
Notes

{{ $room->notes }}

@endif {{-- Status History --}}
Status History
@if($room->statusLogs->isEmpty())

No status changes recorded yet

@else
@foreach($room->statusLogs as $log) @endforeach
Change By Notes When
{{ $log->from_status ?? '—' }} {{ ucfirst(str_replace('_', ' ', $log->to_status)) }} {{ $log->user?->name ?? 'System' }} {{ $log->notes ?? '—' }} {{ $log->changed_at->format('d M Y H:i') }}
@endif
@endsection