@extends('layouts.admin') @section('title', $ticketCategory->name . ' - Category Details') @section('content')

{{ $ticketCategory->name }}

{{ $ticketCategory->is_active ? 'Active' : 'Inactive' }}
@if(session('success')) @endif

{{ $ticketCategory->ticketTypes->count() }}

Ticket Types
@php $totalTickets = $ticketCategory->ticketTypes->sum('total_quantity'); @endphp

{{ number_format($totalTickets) }}

Total Tickets
@php $avgPrice = $ticketCategory->ticketTypes->avg('base_price'); @endphp

${{ number_format($avgPrice, 2) }}

Avg Price
Ticket Types in this Category
Add Ticket Type
@if($ticketCategory->ticketTypes->count() > 0)
@foreach($ticketCategory->ticketTypes as $ticketType) @endforeach
Name Event Price Inventory Status Actions
{{ $ticketType->name }} @if($ticketType->description) {{ Str::limit($ticketType->description, 50) }} @endif
{{ $ticketType->event->name }} ${{ number_format($ticketType->base_price, 2) }}
{{ $ticketType->available_quantity }}/{{ $ticketType->total_quantity }} @php $percentage = $ticketType->total_quantity > 0 ? ($ticketType->available_quantity / $ticketType->total_quantity) * 100 : 0; $colorClass = $percentage > 50 ? 'success' : ($percentage > 20 ? 'warning' : 'danger'); @endphp
{{ $ticketType->is_active ? 'Active' : 'Inactive' }} @if($ticketType->available_quantity == 0) Sold Out @endif
@else
No Ticket Types

This category doesn't have any ticket types yet.

Create First Ticket Type
@endif
Category Details
Name:
{{ $ticketCategory->name }}
Slug:
{{ $ticketCategory->slug }}
Color:
{{ $ticketCategory->color }}
@if($ticketCategory->description)
Description:
{!! Str::words(strip_tags($ticketCategory->description), 10, '...') !!}
@endif
Sort Order:
{{ $ticketCategory->sort_order }}
Status:
{{ $ticketCategory->is_active ? 'Active' : 'Inactive' }}
Created:
{{ $ticketCategory->created_at->format('M j, Y g:i A') }}
Last Updated:
{{ $ticketCategory->updated_at->format('M j, Y g:i A') }}
{{--
Quick Actions
Add Ticket Type @if($ticketCategory->is_active)
@csrf @method('PUT')
@else
@csrf @method('PUT')
@endif @if($ticketCategory->ticketTypes->count() == 0) @endif
--}}
@endsection @push('scripts') @endpush