@extends('layouts.app') @section('title', 'Call Details') @section('page-specific-style') @endsection @section('content')
@php $fullName = trim(($call->first_name ?? '') . ' ' . ($call->last_name ?? '')); @endphp

{{ $fullName ?: 'Call Details' }}

Source {{ $call->source_type ?? 'N/A' }} Back to Calls
@php $address = trim(($call->address1 ?? '') . ' ' . ($call->address2 ?? '')); $address = preg_replace('/\s+/', ' ', $address); $displayFields = [ 'First Name' => $call->first_name, 'Last Name' => $call->last_name, 'Phone Number' => $call->primary_phone, 'Email' => $call->email, 'Address' => $address, 'City' => $call->city, 'State' => $call->state, 'Zip Code' => $call->postal_code, 'Country' => $call->country, 'Country Code' => $call->country_code, 'Dob' => $call->date_of_birth, 'Type Of Coverage' => $call->coverage_type, 'Household Size' => $call->household_size, 'Household Income' => $call->household_income, 'Gender' => $call->gender, 'Under 65' => $call->under_65, 'Status' => $statusDisplay ?? $call->status_name, 'Campaign Name' => $call->campaign_name, 'Payout' => $call->payout, 'Cost' => $call->cost, 'Revenue' => $call->revenue, ]; @endphp
@foreach ($displayFields as $label => $value) @php $displayValue = $value; if ($displayValue instanceof \Carbon\Carbon) { $displayValue = $displayValue->format('Y-m-d H:i:s'); } elseif (is_bool($displayValue)) { $displayValue = $displayValue ? 'Yes' : 'No'; } elseif (is_array($displayValue)) { $displayValue = json_encode($displayValue); } if (is_null($displayValue)) { $displayValue = ''; } @endphp
@if (is_string($displayValue) && strlen($displayValue) > 120) @else @endif
@endforeach
@endsection