Handoffs

Leads qualifies par Aya, en attente de prise en charge humaine.

@if($handoffs->isEmpty())

Aucun handoff {{ $filter === 'pending' ? 'en attente' : '' }}.

@else
@foreach($handoffs as $handoff) @php $lead = $handoff->lead; $data = $handoff->handoff_data ?? []; $statusBadge = match($handoff->status) { 'pending' => 'bg-amber-100 text-amber-800', 'accepted' => 'bg-blue-100 text-blue-800', 'completed' => 'bg-green-100 text-green-800', default => 'bg-gray-100 text-gray-700', }; $statusLabel = match($handoff->status) { 'pending' => 'En attente', 'accepted' => 'Accepte', 'completed' => 'Termine', default => $handoff->status, }; @endphp
{{-- Lead info --}}
{{ $lead->full_name }} {{ $lead->category }} {{ $statusLabel }}
@if($lead->company)

{{ $lead->company }}

@endif {{-- BANT et canal --}}
Score BANT : {{ $lead->bant_score }}/100 Canal : {{ strtoupper($lead->preferred_channel ?? '-') }} @if($lead->email) {{ $lead->email }} @elseif($lead->phone) {{ $lead->phone }} @endif
{{-- Raison du handoff --}} @if(!empty($data['reason']))

Raison du handoff

{{ $data['reason'] }}

@endif {{-- Dernier message Aya --}} @if(!empty($data['aya_last_message']))

Dernier message d'Aya

{{ $data['aya_last_message'] }}

@endif {{-- Temps + assignation --}}
{{ $handoff->created_at->diffForHumans() }} @if($handoff->assignedTo) - Accepte par {{ $handoff->assignedTo->name }} @endif
{{-- Actions --}}
Voir le lead @if($handoff->status === 'pending') @endif @if(in_array($handoff->status, ['pending', 'accepted'])) @endif
@endforeach
@endif