{{ __('Edit Ticket') }}

{{-- Display validation errors --}} @if ($errors->any())
    @foreach ($errors->all() as $error)
  • {{ $error }}
  • @endforeach
@endif
@csrf @method('put') {{-- Ticket Category --}}
{{-- Image Team 1 --}}
@if ($ticket->image1)
@endif {{-- Name Team 1 --}}
{{-- Image Team 2 --}}
@if ($ticket->image2)
@endif {{-- Name Team 2 --}}
{{-- Date --}}
{{-- Time --}}
{{-- Stadium --}}
{{-- Seat Type Inventory Section --}}

Seat Type Inventory

{{-- Red Ticket A_B --}} @php $redSeat = $ticket->seatTypes()->where('name', 'red_A_B')->first(); $redSold = $redSeat ? $redSeat->max_tickets - $redSeat->available_tickets : 0; @endphp
Tickets sold: {{ $redSold }}
{{-- Blue Ticket C_D --}} @php $blueSeat = $ticket->seatTypes()->where('name', 'blue_C_D')->first(); $blueSold = $blueSeat ? $blueSeat->max_tickets - $blueSeat->available_tickets : 0; @endphp
Tickets sold: {{ $blueSold }}
{{-- VIP ROOM --}} @php $vipRoom = $ticket->seatTypes()->where('name', 'vip_room')->first(); $vipRoomSold = $vipRoom ? $vipRoom->max_tickets - $vipRoom->available_tickets : 0; @endphp
Tickets sold: {{ $vipRoomSold }}
{{-- VIP SEAT --}} @php $vipSeat = $ticket->seatTypes()->where('name', 'vip_seat')->first(); $vipSeatSold = $vipSeat ? $vipSeat->max_tickets - $vipSeat->available_tickets : 0; @endphp
Tickets sold: {{ $vipSeatSold }}
{{-- Overall Inventory (Read-only, computed automatically) --}} @php $overallMax = collect([$vipSeat, $vipRoom, $redSeat, $blueSeat]) ->filter() ->sum(fn($s) => $s->max_tickets); @endphp