@include('whatsappcenter::admin.partials.styles')

Lead Details

{{ $lead->flow_name }} — {{ $lead->phone }}

Back
{{-- Contact sidebar ──────────────────────────────────────────────────── --}}
Contact Info
{{ strtoupper(substr($lead->contact_name ?? '?', 0, 1)) }}
{{ $lead->contact_name ?? 'Unknown' }}
{{ $lead->phone }}
@if($lead->email)
{{ $lead->email }}
@endif
📅 {{ $lead->created_at->format('d M Y, h:i A') }}
🤖 {{ $lead->flow_name }}
View WhatsApp Chat
{{-- Flow answers ─────────────────────────────────────────────────────── --}}
Flow Answers @php $ctx = $lead->context_data ?? []; $steps = $flow?->steps ?? collect(); $answers = collect(); foreach($steps as $step) { if(!$step->save_as) continue; $label = preg_replace('/^Step \d+\s*[-–—:]+\s*/i', '', $step->label); $value = $ctx[$step->save_as] ?? null; $answers->push(['label'=>$label,'save_as'=>$step->save_as,'value'=>$value,'answered'=>$value!==null]); } $covered = $answers->pluck('save_as')->toArray(); $extra = collect($ctx)->filter(fn($v,$k)=>!str_starts_with($k,'_')&&!in_array($k,$covered)); $total = $answers->count(); $done = $answers->where('answered',true)->count(); $pct = $total>0?round(($done/$total)*100):0; @endphp @if($total > 0) {{ $done }}/{{ $total }} answered @endif
@if($answers->isEmpty() && $extra->isEmpty())
📋

No data collected yet.

@else @foreach($answers as $i => $ans) @endforeach @foreach($extra as $key => $value) @endforeach
# Question Answer
{{ $i+1 }}
{{ $ans['label'] }}
{{ $ans['save_as'] }}
@if($ans['answered']) {{ $ans['value'] }} @else Not answered @endif
{{ ucwords(str_replace('_',' ',$key)) }}
{{ $key }}
{{ $value }}
@if($total > 0)
Flow completion {{ $pct }}%
@endif @endif