Pipeline Throughput Trends {{-- Tab nav --}}
{{-- ── Weekly ── --}}
@foreach($weeklyData['labels'] as $label) @endforeach @foreach($weeklyData['metrics'] as $metric => $values) @php $count = count($values); $current = $values[$count - 1] ?? 0; $previous = $values[$count - 2] ?? 0; if ($previous == 0) { $changeText = $current > 0 ? 'New' : '—'; $changeClass = $current > 0 ? 'text-success' : 'text-muted'; } else { $pct = round((($current - $previous) / $previous) * 100, 1); $changeText = ($pct >= 0 ? '+' : '') . $pct . '%'; $changeClass = $pct >= 0 ? 'text-success' : 'text-danger'; } @endphp @foreach($values as $value) @endforeach @endforeach
Metric{{ $label }}vs prev
{{ $metric }}{{ $value > 0 ? number_format($value) : '—' }}{{ $changeText }}
{{-- ── Monthly ── --}}
@foreach($monthlyData['labels'] as $label) @endforeach @foreach($monthlyData['metrics'] as $metric => $values) @php $count = count($values); $current = $values[$count - 1] ?? 0; $previous = $values[$count - 2] ?? 0; if ($previous == 0) { $changeText = $current > 0 ? 'New' : '—'; $changeClass = $current > 0 ? 'text-success' : 'text-muted'; } else { $pct = round((($current - $previous) / $previous) * 100, 1); $changeText = ($pct >= 0 ? '+' : '') . $pct . '%'; $changeClass = $pct >= 0 ? 'text-success' : 'text-danger'; } @endphp @foreach($values as $value) @endforeach @endforeach
Metric{{ $label }}vs prev
{{ $metric }}{{ $value > 0 ? number_format($value) : '—' }}{{ $changeText }}
@assets @endassets @script @endscript