@extends('admin.adminLayout') @section('admin_page_title') Lead #{{ $lead->id }} Details @endsection @section('admin_content') @php $lastContactStatusLabel = optional( $statuses->firstWhere('status_slug', $lead->last_contact_result) )->status_name ?? ($lead->last_contact_result ?: '—'); @endphp
{{-- TOP NAVIGATION BAR --}}
Lead Navigation
Quickly move between leads and control save behavior
Mode
Sequence Order
Options
{{-- LEFT MAIN COLUMN --}}

{{ trim($lead->first_name.' '.$lead->last_name) ?: 'Unnamed Lead' }} #{{ $lead->id }} • {{ $lead->lead_code }}

{{ $lead->status }} @if($lead->source) Source: {{ $lead->source }} @endif @if($lead->leadCampaign) Campaign: {{ $lead->leadCampaign->name }} @endif @if($lead->assignedUser) Assigned: {{ $lead->assignedUser->name }} @endif
@if($canViewPhone && $displayPhone !== '') @endif @if($clickToCallEnabled && $canViewPhone && $displayPhone !== '') Call @endif
@csrf
@if($clickToCallEnabled && $canViewPhone && $displayPhone !== '') @endif @if($canViewPhone && $displayPhone !== '') @endif
@if(!$canEditPhone) {{ $canViewPhone ? 'Phone can be edited only by Super Admin / Main Parent.' : 'Your role sees a masked phone number.' }} @endif
@php $currentAssignedId = $lead->assigned_to; $currentAssignedName = optional($lead->assignedUser)->name ?? 'Unassigned'; $canReassign = true; @endphp
@if($canReassign) @endif
Current owner is preserved unless you explicitly change it.
{{-- COMMENTS CARD --}}
Lead Comments
{{ $lead->comments->count() }} comment(s)
@csrf
@forelse($lead->comments as $c)
{{ strtoupper(mb_substr($c->user->name ?? 'U', 0, 1)) }}
{{ $c->user->name ?? 'User' }}
{{ $c->created_at->format('Y-m-d H:i') }} • {{ $c->created_at->diffForHumans() }}
{{ $c->comment }}
@if($c->user_id === $currentUserId) @endif
@empty

No comments yet. Be the first to add one.

@endforelse
{{-- IMAGES --}}
Upload any images, as proof of work

@forelse($lead->images as $img)
Lead Image Open
{{ $img->description }}
@empty
No images posted yet.
@endforelse
@if(!$lead->images->isEmpty())
No images posted yet.
@endif
{{-- RIGHT COLUMN --}}
Lead Summary

Lead Code: {{ $lead->lead_code }}

Full Name: {{ trim($lead->first_name.' '.$lead->last_name) }}

Email: {{ $lead->email ?? '—' }}

Phone: {{ $displayPhone !== '' ? $displayPhone : '—' }}

Country: {{ $lead->country ?? '—' }}
City: {{ $lead->city ?? '—' }}

Status: {{ $lead->status }}

Assigned To: {{ optional($lead->assignedUser)->name ?? '—' }}

Created At: {{ $lead->created_at }}

Last Update: {{ $lead->updated_at }}

Campaign: {{ $lead->leadCampaign->name ?? '—' }}

Next Action & Follow-up
Pipeline control
Next Step

{{ $lead->next_action_type ? ucfirst($lead->next_action_type) : 'Not set' }} @if($lead->next_action_note) — {{ $lead->next_action_note }} @else No details @endif

When: {{ $lead->next_action_at ? $lead->next_action_at->format('Y-m-d H:i') : 'Not scheduled' }}


Last Contact

Time: {{ $lead->last_contact_at ? $lead->last_contact_at->format('Y-m-d H:i') : 'No contact logged' }}

Result: {{ $lastContactStatusLabel }}


@csrf
{{-- WhatsApp Modal --}} @endsection @section('script') @endsection @section('style') @endsection