{{-- 1. HEADER & ACTIONS --}}

Seat Occupancy

Monitor batch capacities, enrollments, and availability.

{{-- 2. KPI CAPACITY CARDS --}}
Total Capacity
{{ number_format($metrics['total_capacity']) }}
Total Booked
{{ number_format($metrics['total_booked']) }}
Available Seats
{{ number_format($metrics['total_available']) }}
Avg Occupancy
{{ number_format($metrics['avg_occupancy'], 1) }}%
{{-- 3. SMART FILTER BAR --}}
{{-- 4. OCCUPANCY GRID TABLE --}}
{{-- Loader Overlay --}}
@forelse($batches as $batch) @php $occ = $batch->percent_full; // Assuming accessor exists, otherwise calculate if (!isset($occ)) { $occ = $batch->total_seats > 0 ? round(($batch->booked_seats / $batch->total_seats) * 100) : 0; } $barColor = $occ >= 90 ? 'bg-danger' : ($occ >= 60 ? 'bg-warning' : 'bg-success'); @endphp @empty @endforelse
Batch Details Schedule Capacity Occupancy Rate Status
{{ $batch->batch_code }} {{ $batch->course->name ?? 'Deleted Course' }}
{{ \Carbon\Carbon::parse($batch->start_date)->format('d M, Y') }} - {{ \Carbon\Carbon::parse($batch->end_date)->format('d M, Y') }}
{{ \Carbon\Carbon::parse($batch->start_time)->format('h:i A') }} to {{ \Carbon\Carbon::parse($batch->end_time)->format('h:i A') }}
Booked
{{ $batch->booked_seats }}
Total
{{ $batch->total_seats }}
Available: {{ max(0, $batch->total_seats - $batch->booked_seats) }} {{ $occ }}%
@php $sClass = match ($batch->status) { 'open' => 'badge-soft-success', 'full' => 'badge-soft-danger', default => 'badge-soft-secondary', // closed }; @endphp {{ ucfirst($batch->status) }}
No Batches Found

Try changing your date filters or course selection.

@if ($batches->hasPages())
@if ($batches->hasPages()) @endif
@endif