@php $cockpitData = $this->cockpitData; $maxHourlyLoad = max(1, (int) collect($cockpitData->hourlyLoad)->max('sessionsCount')); $maxPaymentRevenue = max(1, (int) collect($cockpitData->paymentMethodSplit)->max('revenue_minor')); @endphp
@include('filament.v2.partials.shell-header', [ 'pageHeading' => 'Day Operations Cockpit', 'pageDescription' => 'Live operational cockpit for daily planning, booking load, access control, and commercial activity.', ])
{{-- Session type filter --}}

Session Filter

Filter timeline and planning KPIs by session type.

{{-- KPI Row 1: Booking & sales headline numbers --}}

Bookings Today

{{ $cockpitData->plannedSessionsToday }}

Planned sessions for selected day

Upcoming (Next 2h)

{{ $cockpitData->upcomingSessionsNextHours }}

Sessions starting within 2 hours

Check-ins / Access

{{ $cockpitData->checkInsAccessCount }}

Granted access entries today

Sales Snapshot

{{ $this->formatMinorAmount($cockpitData->salesAmountMinor, $cockpitData->salesCurrency) }}

{{ $cockpitData->salesOrdersCount }} paid order(s)

{{-- KPI Row 2: Operational health metrics --}}

Occupancy Rate By Time Block

{{ number_format($cockpitData->occupancyRateByTimeBlock, 1) }}%

Average slot fill rate across the day

Coach Utilization

{{ number_format($cockpitData->coachUtilizationRate, 1) }}%

Coach capacity in use today

Attendance Gap

{{ $cockpitData->attendanceGap }}

Booked but not yet attended

Pending Customer Actions

{{ $cockpitData->pendingCustomerActions }}

Unseen bookings + unpaid orders

Commercial Pulse (Today)

{{ $this->formatMinorAmount($cockpitData->salesAmountMinor, $cockpitData->salesCurrency) }}

Revenue from paid orders today

Orders Today

{{ $cockpitData->salesOrdersCount }}

Completed paid orders

{{-- Charts row --}}

Occupancy Histogram (By Hour)

Session load per hour block for the selected day.

@forelse ($cockpitData->hourlyLoad as $hourlyLoadEntry) @php $width = $maxHourlyLoad > 0 ? max(2, (int) round(($hourlyLoadEntry->sessionsCount / $maxHourlyLoad) * 100)) : 0; @endphp
{{ $hourlyLoadEntry->hourLabel }}
{{ $hourlyLoadEntry->sessionsCount }}
@empty

No bookings for this date.

@endforelse

Payment Method Split

Revenue split by payment channel for paid orders.

@forelse ($cockpitData->paymentMethodSplit as $paymentSplitEntry) @php $width = $maxPaymentRevenue > 0 ? max(2, (int) round(($paymentSplitEntry['revenue_minor'] / $maxPaymentRevenue) * 100)) : 0; @endphp
{{ $paymentSplitEntry['label'] }} {{ $paymentSplitEntry['count'] }} order(s)

{{ $this->formatMinorAmount((int) $paymentSplitEntry['revenue_minor'], $cockpitData->salesCurrency) }}

@empty

No paid orders for this date.

@endforelse
{{-- Coach & timeline drilldown --}}

Coach Utilization Drilldown

Session distribution by coach for the current filter.

@forelse ($cockpitData->coachUtilization as $coachUtilizationEntry)

{{ $coachUtilizationEntry->coachName }}

{{ $coachUtilizationEntry->sessionsCount }} session(s)

@empty

No coach-linked sessions on this date.

@endforelse

Day Timeline

Chronological session timeline for operations follow-up.

@forelse ($cockpitData->timelineEntries as $timelineEntry)

{{ $timelineEntry->startTime }} – {{ $timelineEntry->endTime }}

{{ $timelineEntry->sessionType }}

{{ $timelineEntry->attendeeName }}

Coach: {{ $timelineEntry->coachName ?? 'N/A' }} · Seen: {{ $timelineEntry->seen ? 'yes' : 'no' }} · Attended: {{ $timelineEntry->hasAttended === null ? 'n/a' : ($timelineEntry->hasAttended ? 'yes' : 'no') }}

@empty

No timeline entries for this filter.

@endforelse