@php $tablesAlpineConfig = [ 'payload' => $tablesPayload, 'areasList' => $areasList, 'authUserId' => $authUserId, 'isRestaurantAdmin' => $isRestaurantAdmin, 'isWaiterRole' => $isWaiterRole, 'waiters' => $waiters, 'canCreateTable' => $canCreateTable, 'canUpdateTable' => $canUpdateTable, 'canShowOrder' => (bool) $canShowOrder, 'canCreateOrder' => (bool) $canCreateOrder, 'i18n' => $tablesUi, ]; @endphp @once @push('before-livewire-scripts') @endpush @endonce
{{-- wire:key must NOT be on the Livewire root: changing it breaks morph and can blank the page. --}}

@if ($canCreateTable)
{{ __('modules.table.addTable') }}
@endif
{{-- Add Table: JS modal --}} @if ($activeTable) {{ __("modules.table.editTable") }} @livewire('forms.editTable', ['activeTable' => $activeTable], key(str()->random(50))) {{ __('app.close') }} @endif @if($selectedTable) {{ __('modules.table.assignWaiter') }} - {{ $selectedTable->table_code ?? '' }} @endif @if($selectedTable)
@livewire('forms.assign-waiter-to-table-form', ['tableId' => $selectedTableId], key('assign-waiter-' . $selectedTableId))
@endif
{{ __('app.close') }} {{ __('app.save') }}
@if($selectedTable) {{ __('modules.table.updateWaiterAssignment') }} - {{ $selectedTable->table_code ?? '' }} @endif @if($selectedTable)
@livewire('forms.update-waiter-to-table-form', ['tableId' => $selectedTableId], key('update-waiter-' . $selectedTableId))
@endif
{{ __('app.close') }} {{ __('app.update') }}
{{ __('app.update') }} {{ __('modules.table.assignWaiter') }}? @if($currentWaiter && $this->currentWaiterUser)

{{ __('modules.table.currentWaiter') }}: {{ $this->currentWaiterUser->name }}

{{ __('messages.waiterAssignmentUpdateConfirmation') }}

@else

{{ __('messages.waiterAssignmentUpdateConfirmation') }}

@endif
{{ __('app.cancel') }} {{ __('app.update') }}