{{ __('Lead Review') }}

{{ $leads->count() }} {{ Str::plural('Lead', $leads->count()) }}
{{-- Flash Messages --}} @if (session('success'))

{{ session('success') }}

@endif @if (session('error'))

{{ session('error') }}

@endif {{-- Filter Buttons --}} {{-- Leads Table --}}

Leads

@if($leads->count() > 0) @foreach($leads as $lead) @endforeach
Name Contact Salesperson Status Priority Updates Last Contacted
{{ $lead->name }} @if($lead->email) {{ $lead->email }} @endif @if($lead->phone) {{ $lead->phone }} @endif {{ $lead->salesPerson->name ?? '—' }} @if($lead->status === 'contacted') Contacted @else Not Contacted @endif @php $priorityStyles = [ 'urgent' => 'bg-red-100 text-red-800', 'high' => 'bg-orange-100 text-orange-800', 'medium' => 'bg-blue-100 text-blue-800', 'low' => 'bg-gray-100 text-gray-600', ]; $pStyle = $priorityStyles[$lead->priority] ?? 'bg-gray-100 text-gray-600'; @endphp {{ ucfirst($lead->priority) }} @php $updateCount = $lead->updates->count(); $todayUpdates = $lead->updates->where('created_at', '>=', \Carbon\Carbon::today())->count(); @endphp {{ $updateCount }} total @if($todayUpdates > 0) ({{ $todayUpdates }} today) @endif {{ $lead->last_contacted_at ? \Carbon\Carbon::parse($lead->last_contacted_at)->format('M d, Y H:i') : '—' }}
@else

No leads found

No leads match the selected filter.

@endif