@extends('layout') @section('title') {{ get_label('lead_information', 'Lead Information') }} - {{ $lead->id }} @endsection @section('content')
{{ substr($lead->first_name, 0, 1) . substr($lead->last_name, 0, 1) }}

{{ ucwords($lead->first_name . ' ' . $lead->last_name) }}

{{ $lead->job_title }}

{{ $lead->company }}

@if ($lead->email) @endif @if ($lead->phone) @endif

{{ get_label('lead_stage','Lead Stage') }} {{ $lead->stage->name }}
{{ get_label('lead_source','Lead Source') }} {{ $lead->source->name ?? 'N/A' }}
{{ get_label('industry','Industry') }} {{ $lead->industry }}
{{ get_label('created','Created') }} {{ format_date($lead->created_at, true) }}
{{ get_label('assigned_to','Assigned To') }} {!! formatUserHtml($lead->assigned_user) !!}
{{ get_label('social_links','Social Links') }}
@if ($lead->website) @endif @if ($lead->linkedin) @endif @if ($lead->facebook) @endif @if ($lead->instagram) @endif @if ($lead->pinterest) @endif
{{ get_label('lead_details','Lead Details') }}
{{ get_label('contact_information','Contact Information') }}
{{ get_label('name','Name') }} {{ ucwords($lead->first_name . ' ' . $lead->last_name) }}
{{ get_label('email','Email') }} {{ $lead->email }}
{{ get_label('phone_number','Phone Number') }} {{ $lead->country_iso_code }} {{ $lead->country_code }} {{ $lead->phone }}
{{ get_label('company_info', 'Company Information') }}
{{ get_label('company','Company') }} {{ $lead->company }}
{{ get_label('job_title','Job Title') }} {{ $lead->job_title }}
{{ get_label('industry','Industry') }} {{ $lead->industry }}
{{ get_label('address_information','Address Information') }}
{{ get_label('city','City') }} {{ $lead->city }}
{{ get_label('state','State') }} {{ $lead->state }}
{{ get_label('zip_code','Zip Code') }} {{ $lead->zip }}
{{ get_label('country','Country') }} {{ $lead->country }}
{{-- @dd($lead) --}} @forelse($lead->follow_ups()->orderBy('follow_up_at', 'desc')->get() as $followUp)
{{ get_label('follow_up_on', 'Follow-up on') }} : {{ format_date($followUp->follow_up_at, true) }}
{{ ucfirst($followUp->type) }} {{ ucfirst($followUp->status) }}
@if ($followUp->note)
{!! $followUp->note !!}
@endif
{{ get_label('assigned_to', 'Assigned To') }}: {{ ucwords($followUp->assignedTo->first_name . ' ' . $followUp->assignedTo->last_name) }}
{{ get_label('created_at', 'Created At') }}: {{ format_date($followUp->created_at, true) }}
@empty
{{ get_label('no_follow_ups_found','No follow-ups found') }}

{{ get_label('create_your_first_follow_up_to_track_interactions_with_this_lead','Create your first follow-up to track interactions with this lead.') }}

@endforelse
{{-- @dd($lead->custom_fields) --}} @if(!empty($lead->custom_fields)) @php $customFields = json_decode($lead->custom_fields, true); @endphp
Additional Info
@foreach($customFields as $label => $field)
@switch($field['type']) @case('textarea')
{{ $field['value'] }}
@break @case('url') {{ $field['value'] }} @break @case('date')
{{ \Carbon\Carbon::parse($field['value'])->format('d M Y') }}
@break @case('checkbox') @php $selected = is_array($field['value']) ? $field['value'] : [$field['value']]; $options = $field['options'] ?? $selected; @endphp @foreach($options as $option)
@endforeach @break @case('select')
{{ $field['value'] }}
@break @case('number')
{{ number_format($field['value'], 0, '.', ',') }}
@break @default
{{ $field['value'] }}
@endswitch
@endforeach
@endif
@endsection