{{-- resources/views/agent/leads/partials/purchased.blade.php --}} @php use Illuminate\Support\Facades\Route; // Safe fallback if the controller didn't pass $data $purchasedData = is_array($data ?? null) ? $data : []; // Tabs we support $types = [ 'life' => 'Life', 'mortgage' => 'Mortgage Protection', 'health' => 'Health', ]; // 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, $purchasedData))); $firstActive = $available[0] ?? 'life'; // Unique IDs so these don’t collide with Assigned tab $paneId = fn($key) => "purchased-{$key}"; $tabId = fn($key) => "purchased-tab-{$key}"; @endphp
First | Last | Phone | City | State | Insurance Type | Status | Purchase Date | Action | ||
---|---|---|---|---|---|---|---|---|---|---|
{{ $lead->first_name }} | {{ $lead->last_name }} | {{ $lead->email }} | {{ $lead->phone_number }} | {{ $lead->city }} | {{ $lead->state }} | {{ $lead->purchase_date ?? '' }} | {{-- Convert Button --}} | |||
No {{ $label }} leads found. |