@extends('layouts.dashboard') @section('title', 'Tafels - ' . $restaurant->name) @section('eyebrow', 'Restaurant') @section('page-title', 'Tafels') @push('styles') @endpush @section('content')
@if(\App\Support\RestaurantAccess::allows(auth()->user(),$restaurant,'settings.manage'))

QR-codes bekijken, downloaden en afdrukken

@endif
Tafelbeheer

Tafels van {{ $restaurant->name }}

Beheer capaciteit, status, volgorde en QR-toegang voor alle tafels van dit restaurant.

@if(\App\Support\RestaurantAccess::allows(auth()->user(),$restaurant,'settings.manage'))@endif
Totaal tafels {{ $statistics['total'] }}
Beschikbaar {{ $statistics['available'] }}
Totale capaciteit {{ $statistics['total_capacity'] }}
Bezet {{ $statistics['occupied'] }}
{{ $tables->count() }} {{ $tables->count() === 1 ? 'tafel' : 'tafels' }}
@if($tables->isEmpty())

Nog geen tafels

Voeg je eerste tafel toe. Daarna kun je capaciteit, status, QR-toegang en toekomstige tafelsessies beheren.

@if(\App\Support\RestaurantAccess::allows(auth()->user(),$restaurant,'settings.manage'))@endif
@else
@foreach($tables as $table) @php $displayStatus = $table->active ? $table->status : 'inactive'; $statusLabel = match($displayStatus) { 'available' => 'Beschikbaar', 'occupied' => 'Bezet', 'reserved' => 'Gereserveerd', 'inactive' => 'Inactief', default => ucfirst($displayStatus), }; @endphp
Tafel

{{ $table->name }}

{{ $statusLabel }}
Capaciteit {{ $table->capacity }} personen
Volgorde {{ $table->sort_order }}
@if($table->currentSession)
Totaal{{ $table->currentSession->currency_code ?? $restaurant->currency }} {{ number_format($table->currentSession->rateGuests->sum('line_total_snapshot')+$table->currentSession->orders->where('status','!=','cancelled')->sum('total_amount'),2,',','.') }}
@if($restaurant->usesAyce())
Rondes{{ $table->currentSession->orders->count() }}
@endif
@endif @if($table->currentSession)
Gasten{{ $table->currentSession->guest_count }}
{{ $table->currentSession->hasExpired() ? 'Verlopen' : 'Gestart' }}{{ $table->currentSession->started_at?->timezone($restaurant->timezone)->format('H:i') }}
@endif
QR-toegang {{ Str::limit($table->qr_token, 18) }}
@if(\App\Support\RestaurantAccess::allows(auth()->user(),$restaurant,'settings.manage'))
@csrf
@endif
@endforeach
@endif
@endsection @push('scripts') @endpush