{{-- resources/views/agent/leads/partials/assigned.blade.php --}} @php use Illuminate\Support\Facades\Route; // Safe fallback if the controller didn't pass $assignedData $assigned = is_array($assignedData ?? null) ? $assignedData : []; // Tabs we support for ASSIGNED $types = [ 'life' => 'Life', 'mortgage' => 'Mortgage Protection', ]; // If at least one dataset exists, start there; else default to Life $available = array_values(array_filter(array_keys($types), fn($k) => array_key_exists($k, $assigned))); $firstActive = $available[0] ?? 'life'; // Unique IDs so these don’t collide with Purchased tab $paneId = fn($key) => "assigned-{$key}"; $tabId = fn($key) => "assigned-tab-{$key}"; @endphp
First | Last | Phone | City | State | Insurance Type | Status | Last Updated | Action | ||
---|---|---|---|---|---|---|---|---|---|---|
{{ $lead->first_name }} | {{ $lead->last_name }} | {{ $lead->email }} | {{ $lead->phone_number }} | {{ $lead->city }} | {{ $lead->state }} | {{-- Inline Insurance Type --}}{{-- Inline Status --}} | {{-- Last Updated (from updated_at or last_modified_at if present) --}} | @php $last = $lead->last_modified_at ?? ($lead->updated_at ?? null); @endphp {{ $last ? \Illuminate\Support\Carbon::parse($last)->format('Y-m-d H:i') : '' }} | {{-- Convert Button --}}||
No {{ $label }} leads found. |