@push('style') @endpush
Timeline
History
@foreach ($leadLogs->logs as $log) @php $description = json_decode($log->description, true); $logTitle = is_array($description) ? ($description['message'] ?? 'Lead data updated') : json_decode($log->description); @endphp
{{ $log->created_at->setTimezone('Africa/Cairo')->format('h:i a') }}
{{ $logTitle }} @if (is_array($description) && ($description['type'] ?? null) === 'lead_update_data')
Updated at {{ $description['updated_at'] ?? $log->created_at->setTimezone('Africa/Cairo')->format('Y-m-d H:i:s') }}
@endif @if ($log->action) @php $routeName = strtolower(class_basename($log->action_type)) . 's.index'; @endphp @if (Route::has($routeName)) @if ($log->action_type == 'App\Models\Task') {{ $log->action?->title }} @else {{ $log->action?->subject }} @endif @elseif($log->action?->subject) {{ $log->action?->subject }} @elseif($log->related?->assigned_to) {{ $log->related?->first_name }} @endif @endif
@endforeach