Ticket Pipeline Analytics

Blood drive lifecycle progression · registration → review

{{ array_sum(array_column($pipeline_analytics['stages'], 'total')) }} tickets
@foreach ($pipeline_analytics['stages'] as $i => $stage) @php $totals = array_column($pipeline_analytics['stages'], 'total'); $maxTotal = empty($totals) ? 1 : (max($totals) ?: 1); $fill = $maxTotal > 0 ? round(($stage['total'] / $maxTotal) * 100, 1) : 0; $bottleneck = $stage['bottleneck']; $stageColor = $bottleneck ? 'red' : 'blue'; // $convColor = $stage['conversion_rate'] >= 60 ? 'text-emerald-600' : ($stage['conversion_rate'] >= 40 ? 'text-amber-600' : 'text-red-600'); @endphp
@if ($bottleneck)
@endif

{{ $stage['label'] }}

{{ $stage['total'] }}

Tickets In Stage

Avg days {{ $stage['avg_days'] }}d
@if (isset($pipeline_analytics['transitions'][$i]))
{{ $pipeline_analytics['transitions'][$i] }}% flow
@endif
@endforeach
@php $bottlenecks = collect($pipeline_analytics['stages'])->filter(fn($s) => $s['bottleneck']); @endphp @if ($bottlenecks->isNotEmpty())
Bottleneck detected: @foreach ($bottlenecks as $b) {{ $b['label'] }} ({{ $b['avg_days'] }}d avg) @endforeach
@endif