@php /** * Renderiza el funnel post-lanzamiento de 6 etapas para un misil launched. * * Variables esperadas: * $m — MissileDraft (con launchedProject cargado) * $steps — opcional, $m->funnelProgress() si no se pasa */ $steps = $steps ?? $m->funnelProgress(); $tp = $m->launchedProject; $tenantUrl = $tp && $tp->domain ? "https://{$tp->domain}" : null; // CTA dinámica: primer paso pendiente (no done) que tenga meta accionable $nextActionStep = null; foreach ($steps as $s) { if (!$s['done'] && !empty($s['meta']) && str_starts_with($s['meta'], '/')) { $nextActionStep = $s; break; } } @endphp
Funnel post-lanzamiento @if($tp) tenant #{{ $tp->id }} @endif
@if($nextActionStep && $tenantUrl) Abrir {{ $nextActionStep['meta'] }} @endif
@foreach($steps as $i => $s) @php $isExpired = ($s['key'] === 'grace') && !empty($s['expired']); $isWarn = ($s['key'] === 'grace') && !$s['done'] && is_string($s['meta']) && str_ends_with($s['meta'], 'd') && (int) rtrim($s['meta'], 'd') <= 3; $bg = $s['done'] ? ($isExpired ? '#f1416c' : '#1bc5bd') : ($isWarn ? '#ffa800' : '#e4e6ef'); $color = $s['done'] || $isWarn ? '#fff' : '#7e8299'; $border = $bg; @endphp
@if($s['done'] && !$isExpired) @elseif($isExpired) @else @endif
{{ $s['label'] }}
@if(!empty($s['meta'])) @if(str_starts_with($s['meta'], '/'))
{{ $s['meta'] }}
@else
{{ $s['meta'] }}
@endif @elseif($s['at'])
{{ $s['at']->format('d/m') }}
@else
@endif {{-- Conector entre steps (línea horizontal) --}} @if($i < count($steps) - 1)
@endif
@endforeach