{{--
--}}
@if (session('success'))
@endif
@if (session('failed'))
@endif
@php
$totalTableCount = 0;
$availableTableCount = 0;
$reservationTableCount = 0;
$occupiedTableCount = 0;
@endphp
@if (count($tables) != 0)
@foreach ($tables as $table)
@php
$totalTableCount++;
$occupied = false;
$reserved = false;
foreach ($occupiedTables as $occupiedTable) {
if ($table['table_id'] == $occupiedTable['table_id']) {
$occupied = true;
$occupiedTableCount++;
break;
}
}
foreach ($reservationTables as $reservationTable) {
if ($table['table_id'] == $reservationTable['table_id']) {
$reserved = true;
$reservationTableCount++;
break;
}
}
$backgroundColor = $occupied ? 'red' : ($reserved ? 'orange' : 'white');
$textColor = $occupied ? 'white' : ($reserved ? 'white' : 'black');
@endphp
@endforeach
@php
$availableTableCount =
$totalTableCount - ($occupiedTableCount + $reservationTableCount);
@endphp
@endif
{{-- @for ($i = 1; $i <= 40; $i++)
@if ($i == 2)
@elseif ($i == 9)
@else
@endif
@endfor --}}
{{--
--}}