@extends('layouts.app') @section('title', 'Lead Details — ' . $lead->name) @section('header', 'Lead Details') @section('content')
← Back to Leads List

{{ $lead->name }} @php $statusClass = match(strtolower($lead->status)) { 'new' => 'badge-active', 'contacted' => 'badge-manager', 'qualified' => 'badge-admin', 'won' => 'badge-sales', 'lost' => 'badge-inactive', default => 'badge-secondary' }; @endphp {{ ucfirst($lead->status) }}

@if(auth()->user()?->hasPermission('leads.edit')) Edit Lead
@csrf
@endif @if(auth()->user()?->hasPermission('leads.delete'))
@csrf @method('DELETE')
@endif

Lead Information

{{ $lead->lead_code ?? 'LD-#'.$lead->id }}
{{ $lead->assignee->name ?? 'Unassigned' }}
@if($lead->phone) {{ $lead->phone }} @else Not provided @endif
@if($lead->email) {{ $lead->email }} @else Not provided @endif
{{ $lead->source }}
{{ $lead->expected_value ? format_inr($lead->expected_value) : '—' }}
{{ $lead->campaign ?: '—' }}
{{ $lead->meta_lead_id ?: '—' }}
@if($lead->notes)
{{ $lead->notes }}
@endif
@if($lead->phone) 💬 Open WhatsApp Chat @endif @if(Route::has('leads.activity')) 📜 View Activity Timeline @endif @if(Route::has('exports.leads')) 📥 Export Leads CSV @endif
@include('followups._form', ['lead' => $lead]) @if(isset($lead->followUps) && count($lead->followUps) > 0)

Follow-up History

@foreach($lead->followUps as $followup)
{{ $followup->type }} — {{ $followup->subject }} {{ $followup->due_at ? \Carbon\Carbon::parse($followup->due_at)->format('M d, Y h:i A') : '' }}
@if($followup->notes)

{{ $followup->notes }}

@endif
@endforeach
@endif
@endsection