@php $stageDef = $stageColumns[$stage] ?? []; // Gradient hero por stage $gradients = [ 'unsent' => 'linear-gradient(135deg, #94a3b8 0%, #64748b 100%)', 'presented' => 'linear-gradient(135deg, #818cf8 0%, #4338ca 100%)', 'contacted' => 'linear-gradient(135deg, #38bdf8 0%, #0284c7 100%)', 'interested' => 'linear-gradient(135deg, #fb923c 0%, #ea580c 100%)', 'followup' => 'linear-gradient(135deg, #f87171 0%, #dc2626 100%)', 'closed' => $missile->isClosedWon() ? 'linear-gradient(135deg, #34d399 0%, #059669 100%)' : 'linear-gradient(135deg, #475569 0%, #1e293b 100%)', ]; $gradient = $gradients[$stage] ?? $gradients['unsent']; // WhatsApp link $whatsAppHref = $missile->prospect_phone ? 'https://wa.me/' . preg_replace('/\D/', '', $missile->prospect_phone) : null; // Producto label $marketplaceLabels = [ 'foundations-ong' => 'Foundation / NGO', 'creative-video-editor' => 'Portfolio Editor de Video', 'corporative' => 'Sitio Web Corporativo', 'construction' => 'Constructoras', 'art-design' => 'Creativos & Diseño', 'law-firm-digital' => 'Estudios Jurídicos', 'real-estate' => 'Inmobiliarias', 'restaurant-bar' => 'Restaurantes & Bares', 'personal-brand' => 'Personal Brand', 'medical' => 'Centros Médicos & Clínicas', 'supplements-shop' => 'Tienda de Suplementos', 'business-catalogue' => 'Catálogo B2B', 'urban-development' => 'Desarrollo Urbano', ]; $productLabel = $missile->product_slug ? ($marketplaceLabels[$missile->product_slug] ?? ucwords(str_replace('-', ' ', $missile->product_slug))) : null; $initial = strtoupper(mb_substr($missile->prospect_name ?? $missile->project_name ?? '?', 0, 1)); // Demo URL si está launched $demoUrl = $missile->launchedProject && $missile->launchedProject->domain ? 'https://' . $missile->launchedProject->domain : ($missile->subdomain ? "https://{$missile->subdomain}.bewpro.com" : null); @endphp
@if(session('success'))
{{ session('success') }}
@endif @if($errors->any())
Revisá los datos:
    @foreach($errors->all() as $e)
  • {{ $e }}
  • @endforeach
@endif {{-- ═══════════════════════════════════════════════════════════════ HERO — gradient color-coded + avatar + datos prospect ═══════════════════════════════════════════════════════════════ --}}
{{-- Stage badge flotante --}}
{{-- Avatar grande --}}
{{ $initial }}

{{ $missile->prospect_name ?: $missile->project_name ?: 'Sin nombre' }}

@if($missile->subdomain)
{{ $missile->subdomain }}.bewpro.com
@endif {{-- Chips info --}}
@if($productLabel) {{ $productLabel }} @endif @if($missile->tier) {{ $missile->tier }} @endif @if($missile->prospect_email) {{ $missile->prospect_email }} @endif @if($missile->prospect_phone) {{ $missile->prospect_phone }} @endif
{{-- ─── Quick Actions Bar ─── --}}
@if($whatsAppHref) WhatsApp @endif @if($missile->prospect_email) Email @endif @if($missile->prospect_website) Sitio del prospect @endif @if($demoUrl) Ver demo @endif
{{-- ═══════════════════════════════════════════════════════════ COLUMNA IZQUIERDA — Timeline + próximo paso ═══════════════════════════════════════════════════════════ --}}
{{-- ════════════════════════════════════════════════════════════ ACTIVIDAD — quién hizo qué (pool compartido OLA 5) ════════════════════════════════════════════════════════════ --}} @php $userLabel = function ($u) { if (!$u) return null; $name = trim(($u->first_name ?? '') . ' ' . ($u->last_name ?? '')); return $name !== '' ? $name : ($u->email ?? '—'); }; $userInitials = function ($u) { if (!$u) return '?'; $name = trim(($u->first_name ?? '') . ' ' . ($u->last_name ?? '')); if ($name === '') return strtoupper(substr($u->email ?? '?', 0, 1)); $parts = preg_split('/\s+/', $name); return strtoupper(substr($parts[0], 0, 1) . (isset($parts[1]) ? substr($parts[1], 0, 1) : '')); }; $lastAttempt = $missile->outreachAttempts->first(); $activityRows = []; if ($missile->closer) { $activityRows[] = ['icon' => 'bi-person-fill', 'color' => 'primary', 'label' => 'Asignado', 'user' => $missile->closer, 'at' => null]; } if ($missile->decidedBy) { $decision = match($missile->status) { 'ready', 'launched' => 'Aprobó', 'rejected' => 'Descartó', default => 'Decidió', }; $activityRows[] = ['icon' => 'bi-check-circle-fill', 'color' => 'success', 'label' => $decision, 'user' => $missile->decidedBy, 'at' => $missile->decided_at]; } if ($missile->brandedBy) { $activityRows[] = ['icon' => 'bi-palette-fill', 'color' => 'warning', 'label' => 'Aplicó branding', 'user' => $missile->brandedBy, 'at' => $missile->branded_at]; } if ($missile->launchedBy) { $activityRows[] = ['icon' => 'bi-rocket-takeoff-fill', 'color' => 'info', 'label' => 'Lanzó', 'user' => $missile->launchedBy, 'at' => $missile->launched_at]; } if ($lastAttempt && $lastAttempt->attemptedBy) { $activityRows[] = ['icon' => 'bi-chat-dots-fill', 'color' => 'primary', 'label' => 'Último contacto', 'user' => $lastAttempt->attemptedBy, 'at' => $lastAttempt->attempted_at, 'sub' => ucfirst($lastAttempt->channel) . ' · ' . ucfirst(str_replace('_', ' ', $lastAttempt->outcome))]; } if ($missile->closedBy) { $activityRows[] = ['icon' => 'bi-flag-fill', 'color' => 'dark', 'label' => 'Cerró', 'user' => $missile->closedBy, 'at' => $missile->closed_at]; } @endphp @if(!empty($activityRows))

Actividad del misil

Pool compartido · trazabilidad por persona
@foreach($activityRows as $row)
{{ $row['label'] }}
{{ $userLabel($row['user']) }}
@if(!empty($row['sub']))
{{ $row['sub'] }}
@endif @if(!empty($row['at']))
{{ $row['at']->diffForHumans() }}
@endif
@endforeach
@if($missile->outreachAttempts->count() > 1)
{{ $missile->outreachAttempts->count() }} contactos registrados — por:
@php $contactors = $missile->outreachAttempts ->filter(fn($a) => $a->attemptedBy) ->groupBy(fn($a) => $a->attemptedBy->id); @endphp @foreach($contactors as $byUserId => $attempts) @php $by = $attempts->first()->attemptedBy; @endphp {{ $userLabel($by) }} · {{ $attempts->count() }}× @endforeach
@endif
@endif {{-- ════════════════════════════════════════════════════════════ ÚLTIMAS ANOTACIONES — resumen visible sin scroll ════════════════════════════════════════════════════════════ --}} @php $recentAttempts = $missile->outreachAttempts->take(3); @endphp @if($recentAttempts->isNotEmpty())

Últimas anotaciones

{{ $missile->outreachAttempts->count() }} contactos Ver todo
@foreach($recentAttempts as $a) @php [$chLabel, $chIcon, $chColor] = $channelLabels[$a->channel] ?? ['?', 'fa-question', 'text-muted']; [$outLabel, $outClass] = $outcomeLabels[$a->outcome] ?? ['?', 'bg-light']; $byName = $a->attemptedBy ? trim(($a->attemptedBy->first_name ?? '') . ' ' . ($a->attemptedBy->last_name ?? '')) ?: ($a->attemptedBy->email ?? '—') : null; @endphp
{{ $chLabel }} {{ $outLabel }} @if($byName) · {{ $byName }} @endif
{{ $a->attempted_at->diffForHumans() }}
@if($a->notes)

{{ \Illuminate\Support\Str::limit($a->notes, 240) }}

@else Sin nota @endif @if($a->next_followup_at)
Follow-up: {{ $a->next_followup_at->diffForHumans() }}
@endif
@endforeach
@endif {{-- ════════════════════════════════════════════════════════════ TENANT TRACKING — visible cuando el misil está launched ════════════════════════════════════════════════════════════ --}} @if($tenantTracking) @php $tt = $tenantTracking; $deliveryColor = match($tt['delivery_status']) { 'in_delivery' => 'warning', 'completed' => 'success', 'on_hold' => 'danger', default => 'secondary', }; $deliveryLabel = match($tt['delivery_status']) { 'in_delivery' => 'En preparación', 'completed' => 'Entregado', 'on_hold' => 'Pausado', default => ucfirst($tt['delivery_status']), }; $pipelineColor = match($tt['pipeline_status']) { 'active' => 'success', 'in_progress' => 'warning', 'paused' => 'secondary', 'cancelled' => 'danger', default => 'secondary', }; @endphp

Tenant Tracking

@if($tt['is_ready_to_show']) ✨ Listo para mostrar al cliente @else 🛠 En preparación @endif
{{-- Funnel de preparación (3 pasos visuales) --}}
1. Provisionado
{{ $tt['launched_at']?->diffForHumans() ?? '—' }}
@if($tt['branding_applied'])
2. Branding ✓
Aplicado
@else
2. Branding
Pendiente
@endif
@if($tt['content_imported'])
3. Contenido ✓
Importado
@else
3. Contenido
Pendiente
@endif
{{-- Estado del tenant + Quick links --}}
Delivery: {{ $deliveryLabel }} Pipeline: {{ ucfirst($tt['pipeline_status']) }} @if($missile->presented_at) Presentado · {{ $missile->presented_at->diffForHumans() }} @endif @if($missile->first_visited_at) Visto · {{ $missile->first_visited_at->diffForHumans() }} @endif
@if($tt['admin_url']) Admin tenant @endif @if($tt['site_url']) Ver sitio @endif
{{-- Botón: marcar como enviado al prospect --}} @if($missile->status === \App\Models\MissileDraft::STATUS_LAUNCHED && !$missile->presented_at)
@csrf
@endif
{{-- ════════════════════════════════════════════════════════════ BRANDING + ASSETS — paridad con /admin/tenants ════════════════════════════════════════════════════════════ --}}

Personalizar el sitio

Cargando paleta actual…
Editor completo del sitio del prospect: logos, paleta, tipografías y contenido (JSON). Los cambios se aplican vía HTTP segura al tenant. Sólo se envía lo que completes — los slots vacíos se mantienen como están.
{{-- Tab Logos --}}
Fondo transparente.
{{-- Tab Colors + Fonts --}}
Paleta
@foreach(['primary' => 'Primario', 'secondary' => 'Secundario', 'tertiary' => 'Terciario', 'quaternary' => 'Cuaternario', 'dark' => 'Oscuro', 'light' => 'Claro'] as $key => $label)
@endforeach
Tipografías (Google Fonts)
{{-- Tab Content --}}
El JSON debe seguir el formato del importador interno del tenant (mismo que /admin/content-import). En modo append agrega sin tocar lo existente; replace reemplaza por completo las secciones presentes.
@push('scripts') @endpush @else {{-- Misil sin tenant todavía — info banner para guiar al Comercial --}}
Aún sin sitio provisionado

Este misil todavía no tiene un sitio activo. Aprobá el misil (decisión arriba) y CD lo provisiona en su cola. Cuando esté listo, vas a poder editar logos, paleta y contenido desde acá.

@endif {{-- ════════════════════════════════════════════════════════════ INTEL BREAKDOWN VISUAL (OLA 7.5) — bars proporcionales ════════════════════════════════════════════════════════════ --}} @if($intelBreakdown['from_hunter'] ?? false) @php $ib = $intelBreakdown; @endphp

Intel Breakdown

{{ $ib['recommendation_emoji'] }} {{ $ib['recommendation_label'] }}
{{-- Score lead --}}
Lead score {{ $ib['score_pct'] }}/100
{{-- Obsolescencia (cuán vieja la web) --}} @if($ib['obsolescence_pct'] > 0)
Obsolescencia de web {{ $ib['obsolescence_pct'] }}/100
@endif
{{-- Reviews (log scaled) --}}
Reviews {{ number_format($ib['reviews_count']) }}
{{-- Rating --}} @if($ib['rating'] > 0)
Rating {{ $ib['rating'] }}★
@endif
{{-- Bottom row: Web signal + Maps + Coaching --}}
{{ $ib['web_signal_label'] }} @if($missile->prospect_website) Ver web del prospect @endif @if($missile->prospect_maps_url) 📍 Google Maps @endif @if(!empty($coachingStats)) 🎯 Cerraste {{ $coachingStats['closed'] }} de tipo {{ $coachingStats['sub'] }} @if($coachingStats['attempts'] > 0) (intentaste {{ $coachingStats['attempts'] }}) @endif @endif
@endif {{-- ════════════════════════════════════════════════════════════ LEADS SIMILARES EN ZONA (OLA 7.5) ════════════════════════════════════════════════════════════ --}} @if($similarLeads && $similarLeads->isNotEmpty()) @endif {{-- Próximo paso sugerido --}} @if($nextAction)
Próximo paso

{{ $nextAction['title'] }}

{{ $nextAction['desc'] }}

@if($nextAction['cta']) @endif
@endif {{-- Scripts sugeridos (Step 13 — NextActionSuggester) --}} @if(!empty($suggestedScripts))
@endif {{-- Timeline de outreach (completo) --}}

Timeline completo de contactos

{{ $missile->outreachAttempts->count() }}
@if($missile->outreachAttempts->isEmpty())
Sin contactos registrados

Registrá el primer contacto para empezar a trackear el avance de este misil.

@else
@foreach($missile->outreachAttempts as $attempt) @php [$chLabel, $chIcon, $chColor] = $channelLabels[$attempt->channel] ?? ['?', 'fa-question', 'text-muted']; [$outLabel, $outClass] = $outcomeLabels[$attempt->outcome] ?? ['?', 'bg-light']; @endphp
{{ $chLabel }} {{ $outLabel }}
{{ $attempt->attempted_at->diffForHumans() }}
@if($attempt->notes)

{{ $attempt->notes }}

@endif @if($attempt->next_followup_at)
Follow-up agendado: {{ $attempt->next_followup_at->diffForHumans() }}
@endif @if($attempt->attemptedBy)
Por {{ $attempt->attemptedBy->first_name ?? $attempt->attemptedBy->email }}
@endif
@endforeach
@endif
{{-- ═══════════════════════════════════════════════════════════ COLUMNA DERECHA — Sidebar info técnica ═══════════════════════════════════════════════════════════ --}}

Información técnica

Estado del misil
@php [$lbl, $cls] = $missile->status_badge; @endphp {{ $lbl }}
Demo / Subdomain
@if($demoUrl) {{ str_replace(['https://', 'http://'], '', $demoUrl) }} @else Aún no provisionado @endif
@if($missile->launched_at)
Lanzado
{{ $missile->launched_at->format('d/m/Y') }} ({{ $missile->launched_at->diffForHumans() }})
@endif @if($missile->prospect_address)
Dirección
{{ $missile->prospect_address }}
@endif @if($missile->prospect_maps_url)
Ubicación
Ver en Maps
@endif
Creado
{{ $missile->created_at->format('d/m/Y') }} ({{ $missile->created_at->diffForHumans() }})
@if($missile->branding_notes || $missile->internal_notes)

Notas

@if($missile->branding_notes)
Branding

{{ $missile->branding_notes }}

@endif @if($missile->internal_notes)
Notas internas

{{ $missile->internal_notes }}

@endif
@endif
{{-- ═══════════════════════════════════════════════════════════════ MODAL — Registrar Contacto ═══════════════════════════════════════════════════════════════ --}} @push('styles') @endpush