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

Slot {{ $slot->slot_number }}

{{ $slot->vendingMachine->name }} - {{ $slot->vendingMachine->location }}

Slot-Informationen

{{ $slot->position ?: 'Nicht angegeben' }}

{{ $slot->capacity }} Produkte

@if($slot->is_active) Aktiv @else Inaktiv @endif

@if($slot->products->count() > 0)

Aktuelles Produkt

@foreach($slot->products as $product)
@if($product->image) {{ $product->name }} @else
📦
@endif

{{ $product->name }}

{{ $product->description }}

Bestand: {{ $product->pivot->quantity ?? 0 }} Stück
Preis: {{ number_format($product->pivot->current_price ?? $product->price, 2) }}€
Kategorie: {{ $product->category ?: 'Keine' }}
Status: @if(($product->pivot->quantity ?? 0) > 0) Verfügbar @else Ausverkauft @endif

Bestand verwalten

@csrf @method('PUT')
@csrf @method('DELETE')
@endforeach
@endif

{{ $slot->products->count() > 0 ? 'Produkt wechseln' : 'Produkt hinzufügen' }}

@if($products->count() > 0)
@csrf

Max. {{ $slot->capacity }} Stück

Leer = Standardpreis verwenden

@else

Keine Produkte verfügbar. Erstellen Sie zuerst Produkte.

Neues Produkt erstellen
@endif
@endsection