@if(!$restaurant->enable_customer_reservation)

@lang('modules.reservation.reservationsDisabled')

@lang('modules.reservation.reservationsDisabledDescription')

@else

@lang('messages.selectBookingDetail')

{{-- Date Selection --}}
@php $dateFormat = $restaurant->date_format ?? 'd-m-Y'; $minDate = now()->timezone(timezone())->format($dateFormat); $maxDate = now()->timezone(timezone())->addDays(6)->format($dateFormat); @endphp @error('date') @enderror
{{-- Guest Selection --}}
    @for ($i = 1; $i <= 30; $i++)
  • @endfor
@error('numberOfGuests') @enderror
{{-- Slot Type Selection --}} @php $slotTypes = \App\Livewire\Shop\BookATable::SLOT_TYPES; $selectedDay = 'Unknown'; try { if (!empty($date) && strtotime($date)) { $selectedDay = \Carbon\Carbon::parse($date)->format('l'); } } catch (\Exception $e) { $selectedDay = 'Unknown'; } @endphp
    @foreach($slotTypes as $type) @php $isSlotTypeDisabled = !isset($availableSlotTypes[$type]) || !in_array($selectedDay, $availableSlotTypes[$type] ?? []); @endphp
  • @endforeach
{{-- Time Slots --}}

@lang('messages.selectTimeSlot')

@if (empty($timeSlots) || !$this->isSlotTypeAvailable()) @lang('messages.noTimeSlot') @endif
    @foreach ($timeSlots as $timeSlot) @php $isDisabled = $this->isTimeSlotDisabled($timeSlot); @endphp
  • @endforeach
@error('availableTimeSlots') @enderror
@if ($branchAreas->isNotEmpty())

@lang('modules.reservation.selectPreferredArea')

@lang('modules.reservation.selectPreferredAreaHelp')

@if (empty($availableTimeSlots))

@lang('modules.reservation.selectTimeForTableAvailability')

@endif
  • @foreach ($branchAreas as $area) @php $areaTables = $area->tables; $hasSelectedTime = filled($availableTimeSlots); $availableAreaTables = $hasSelectedTime ? $areaTables->reject(fn ($table) => in_array($table->id, $reservedTableIds, true)) : $areaTables; $minSeats = $availableAreaTables->min('seating_capacity'); $maxSeats = $availableAreaTables->max('seating_capacity'); $totalSeats = $availableAreaTables->sum('seating_capacity'); $availableTableCount = $availableAreaTables->count(); @endphp
  • @endforeach
@error('selectedAreaId') @enderror {{-- Area image lightbox --}}
@endif {{-- Reservation Form (only shown when slots are available) --}} @if (!empty($timeSlots) && $this->isSlotTypeAvailable())
@if (is_null(customer())) @lang('messages.loginForReservation') @else @if($isRestaurantOpenForReservations) @lang('app.reserveNow') @else
{{ $restaurantClosedMessage }}
@endif @endif
@endif
@endif