@extends('admin.layouts.app') @section('title', $lead->name . ' - Lead Details') @push('styles') @endpush @section('content')
{{ strtoupper(substr($lead->name, 0, 2)) }}

{{ $lead->name }}

@if ($lead->priority === 'hot') 🔥 Hot @elseif($lead->priority === 'warm') Warm @else Cold @endif {{ $lead->score }} pts
{{ $lead->lead_type_label }} {{ $lead->source_label }} {{ $lead->created_at->format('M d, Y') }}
Call WhatsApp @if ($lead->email) Email @endif Edit
@if ($lead->next_follow_up)
{{ $lead->next_follow_up->isPast() ? '⚠️ Overdue:' : '📅 Follow-up:' }} {{ $lead->next_follow_up->format('M d, h:i A') }}
@endif
Lead Information
Source {{ $lead->source_label }}
@if ($lead->source_detail)
Detail {{ $lead->source_detail }}
@endif
Created {{ $lead->created_at->format('M d, Y') }}
@if ($lead->createdBy)
Created By {{ $lead->createdBy->name }}
@endif @if ($lead->last_contacted_at)
Last Contact {{ $lead->last_contacted_at->diffForHumans() }}
@endif
Contact

Phone

{{ $lead->phone }}

@if ($lead->alternate_phone)

Alt. Phone

{{ $lead->alternate_phone }}

@endif @if ($lead->email)

Email

{{ $lead->email }}

@endif @if ($lead->address)

Address

{{ $lead->address }}

@endif
@if ($lead->budget_range || $lead->property_type || $lead->bedrooms || $lead->preferred_locations)
Requirements
@if ($lead->budget_range)

Budget Range

{{ $lead->budget_range }}

@endif
@if ($lead->property_type)

Type

{{ App\Models\Lead::getPropertyTypes()[$lead->property_type] ?? $lead->property_type }}

@endif @if ($lead->bedrooms)

Bedrooms

{{ $lead->bedrooms }} BHK

@endif
@if ($lead->preferred_locations)

Preferred Locations

{{ $lead->preferred_locations }}

@endif
@endif @if ($lead->requirements)
Notes

{{ $lead->requirements }}

@endif
@php $types = ['note'=>'📝 Note','call'=>'📞 Call','email'=>'📧 Email','whatsapp'=>'💬 WhatsApp','meeting'=>'🤝 Meeting','site_visit'=>'🏠 Site Visit']; @endphp @foreach ($types as $type => $label) @endforeach

Activity Timeline

{{ $lead->activities->count() }} entries
@if ($lead->activities->count() > 0) @foreach ($lead->activities as $activity)
@php $colors = [ 'call' => 'bg-green-100 text-green-600', 'email' => 'bg-blue-100 text-blue-600', 'whatsapp' => 'bg-emerald-100 text-emerald-600', 'meeting' => 'bg-purple-100 text-purple-600', 'site_visit' => 'bg-orange-100 text-orange-600', 'status_change' => 'bg-yellow-100 text-yellow-600', 'note' => 'bg-gray-100 text-gray-600', 'system' => 'bg-slate-100 text-slate-600', 'assignment' => 'bg-cyan-100 text-cyan-600', 'follow_up_scheduled' => 'bg-pink-100 text-pink-600', ]; $icons = [ 'call' => 'M3 5a2 2 0 012-2h3.28a1 1 0 01.948.684l1.498 4.493a1 1 0 01-.502 1.21l-2.257 1.13a11.042 11.042 0 005.516 5.516l1.13-2.257a1 1 0 011.21-.502l4.493 1.498a1 1 0 01.684.949V19a2 2 0 01-2 2h-1C9.716 21 3 14.284 3 6V5z', 'email' => 'M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z', 'site_visit' => 'M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6', ]; @endphp
{{ $activity->title }}
@if ($activity->description)
{{ $activity->description }}
@endif
{{ $activity->created_at->diffForHumans() }} @if ($activity->user) • {{ $activity->user->name }} @endif
@endforeach @else

No activity yet. Start by logging a call or note above.

@endif
Quick Actions
Call Now
{{ $lead->phone }}
WhatsApp
Send Message
@if ($lead->email)
Email
{{ $lead->email }}
@endif
Schedule Follow-up
@if ($suggestedProperties->count() > 0)
Matching Properties
@foreach ($suggestedProperties->take(3) as $property) @if ($property->images->first()) @else
@endif
{{ Str::limit($property->title, 25) }}
{{ $property->formatted_price }}
@endforeach @endif
@csrf @method('DELETE')
@endsection @push('scripts') @endpush