@extends('layouts.app') @section('content')
@include('partials.header') @include('partials.sidebar')

Room

@if (session('success')) @endif @if (session('error')) @endif
Add Room @hasrole('admin') @endhasrole
{{ $rooms->count() }}
Total Rooms
{{ $rooms->where('status_room', 'checked_in')->count() }}
Checked In
{{ $rooms->where('status_room', 'checked_out')->count() }}
Checked Out
{{ $rooms->whereNotNull('guestname')->where('guestname', '!=', '')->count() }}
With Guests
{{ $rooms->where('status_bg', true)->count() }}
BG Active
{{ $rooms->whereNotNull('qrcode_cast')->where('qrcode_cast', '!=', 'noimage.jpg')->count() }}
With QR Code
@foreach ($rooms as $room) @endforeach
ID Room Room Type Guest Name Guest Image Description WiFi Cast Background Image Background Active Actions
{{ $room->id }}
{{ $room->room }} @if ($room->status_room === 'checked_in') Checked In @elseif ($room->status_room === 'vacant') Vacant @else Checked Out @endif
{{ $room->roomType->name ?? 'No Room Type' }} {{ $room->guestname ?: '-' }} @if ($room->guest_image && $room->guest_image != 'noimage.jpg') {{ $room->guestname }} @else
@endif
@if ($room->description) {{ Str::limit($room->description, 50) }} @else - @endif @if ($room->qrcode_cast && $room->qrcode_cast != 'noimage.jpg')
QR Code {{ Str::limit($room->username_cast, 15) }}
@else
No QR
@endif
@if ($room->background_img && $room->background_img != 'noimage.jpg') Background Image @else
@endif
status_bg ? 'checked' : '' }} value="1" data-id="{{ $room->id }}">
@if ($room->status_room === 'checked_in') @else @endif
@endsection