@extends('layouts.app') @section('title', $lead->full_name) @section('content')

{{ $lead->full_name }}

{{ $lead->lead_number }} · {{ $lead->status }} · {{ title_case_words($lead->source) }}

@if ($lead->status !== 'converted' && $lead->status !== 'lost') @endif @if ($lead->customer) View customer @endif ← Back
@include('components.kpi', ['label' => 'Status', 'value' => title_case_words($lead->status), 'variant' => $lead->status === 'converted' ? 'good' : ($lead->status === 'lost' ? 'bad' : 'warn'), 'href' => '#']) @include('components.kpi', ['label' => 'Est. value', 'value' => $lead->estimated_value > 0 ? money($lead->estimated_value) : '—', 'variant' => 'info', 'href' => '#']) @include('components.kpi', ['label' => 'Next follow-up', 'value' => $lead->next_follow_up_at?->format('d M') ?? '—', 'variant' => $lead->next_follow_up_at && $lead->next_follow_up_at->isPast() ? 'bad' : '', 'href' => '#']) @include('components.kpi', ['label' => 'Activities', 'value' => $lead->activities()->count(), 'href' => '#activity'])

Lead detail

Lead number
{{ $lead->lead_number }}
Full name
{{ $lead->full_name }}
Company
{{ $lead->company_name ?: '—' }}
Phone
{{ $lead->phone }}
Email
{{ $lead->email ?: '—' }}
Source
{{ title_case_words($lead->source) }}
Campaign
{{ $lead->campaign?->name ?? '—' }}
Owner
{{ $lead->owner?->name ?? 'Unassigned' }}
Created
{{ $lead->created_at->format('d M Y H:i') }}

Service type
{{ $lead->serviceType?->name ?? '—' }}
Plan of interest
{{ $lead->plan?->name ?? 'Not decided' }}
Address
{{ $lead->address }}
City / region
{{ trim(($lead->city ?? '').' '.($lead->region ?? '')) ?: '—' }}
Coordinates
{{ $lead->latitude && $lead->longitude ? $lead->latitude.', '.$lead->longitude : '—' }}
Coverage
@if ($lead->coverage_checked) {{ $lead->in_coverage ? 'In coverage' : 'Out of coverage' }} @if ($lead->coverage_zone)
{{ $lead->coverage_zone->name }}
@endif @else Not checked @endif
@if ($lead->notes)
Notes

{{ $lead->notes }}

@endif

Activity log

{{ $lead->activities()->count() }} entry(s)
@if ($lead->activities->isNotEmpty())
@foreach ($lead->activities as $activity)
{{ $activity->user?->name ?? 'System' }} {{ $activity->type }}
{{ $activity->created_at->format('d M Y H:i') }}
{{ $activity->description }}
@endforeach
@else @include('components.empty-state', ['icon' => '📝', 'title' => 'No activity logged yet']) @endif
@csrf
@endsection