@extends('layouts.vending') @section('title', 'Slot-Verwaltung') @section('content')

Slot-Verwaltung

Verwalten Sie Automaten-Slots und Produktzuordnungen

@if(request('machine')) @php $machine = \App\Models\VendingMachine::find(request('machine')) @endphp @if($machine) ← Zurück zu {{ $machine->name }} @endif @endif Neuer Slot
@if(request()->hasAny(['machine', 'status'])) Filter zurücksetzen @endif
@if(session('success'))
{{ session('success') }}
@endif @if($slots->count() > 0)
@foreach($slots as $slot) @endforeach
Slot Automat Produkt Bestand Preis Status Aktionen
{{ $slot->slot_number }}
{{ $slot->vendingMachine->name }}
{{ $slot->vendingMachine->location }}
@if($slot->products->count() > 0) @php $product = $slot->products->first() @endphp
@if($product->image) {{ $product->name }} @else
?
@endif
{{ $product->name }}
{{ number_format($product->price, 2) }}€
@else Kein Produkt zugeordnet @endif
@if($slot->products->count() > 0) {{ $slot->products->first()->pivot->stock_quantity ?? 0 }} Stück @else - @endif @if($slot->products->count() > 0) {{ number_format($slot->products->first()->pivot->price ?? $slot->products->first()->price, 2) }}€ @else - @endif @if($slot->products->count() > 0) @php $stock = $slot->products->first()->pivot->stock_quantity ?? 0 @endphp @if($stock > 5) Verfügbar @elseif($stock > 0) Niedrig @else Leer @endif @else Nicht belegt @endif
Details Bearbeiten
@csrf @method('DELETE')
{{ $slots->appends(request()->query())->links() }}
@else

Keine Slots gefunden

@if(request()->hasAny(['machine', 'status'])) Keine Slots entsprechen den aktuellen Filterkriterien. @else Beginnen Sie mit der Erstellung Ihres ersten Slots. @endif

@endif
@endsection