@php $formatLogValue = function ($value) { if (is_bool($value)) { return $value ? 'Yes' : 'No'; } return filled($value) ? $value : '-'; }; $agentNames = collect($usersSelect ?? []) ->mapWithKeys(fn($staff) => [$staff->user_id => $staff->user?->full_name]) ->filter(); $programNames = collect($programs ?? [])->pluck('name_en', 'id'); $planTypeNames = collect($getPricingPlanType ?? [])->pluck('name', 'id'); $trackTypeNames = collect($trackTypesSelect ?? []); $workflowNames = collect($workflows ?? [])->pluck('name', 'id'); @endphp
Lead Update Logs
{{ $leadUpdateLogs->count() }}
@forelse ($leadUpdateLogs as $log) @php $description = json_decode($log->description, true) ?: []; $data = $description['data'] ?? []; $loggedAt = $description['updated_at'] ?? $log->created_at?->setTimezone('Africa/Cairo')->format('Y-m-d H:i:s'); $fullName = trim(($data['first_name'] ?? '') . ' ' . ($data['last_name'] ?? '')); @endphp @empty @endforelse
Updated At Updated By Name Email Phone Assigned To Workflow Program Plan Type Track Type Source Flag
{{ $loggedAt }} {{ $log->user?->full_name ?? '-' }} {{ $formatLogValue($fullName) }} {{ $formatLogValue($data['email'] ?? null) }} {{ $formatLogValue($data['phone'] ?? null) }} {{ $formatLogValue($agentNames[$data['assigned_to'] ?? null] ?? ($data['assigned_to'] ?? null)) }} {{ $formatLogValue($workflowNames[$data['workflow_id'] ?? null] ?? ($data['workflow_id'] ?? null)) }} {{ $formatLogValue($programNames[$data['program_id'] ?? null] ?? ($data['program_id'] ?? null)) }} {{ $formatLogValue($planTypeNames[$data['plan_type_id'] ?? null] ?? ($data['plan_type_id'] ?? null)) }} {{ $formatLogValue($trackTypeNames[$data['track_type_id'] ?? null] ?? ($data['track_type_id'] ?? null)) }} {{ $formatLogValue($data['source'] ?? null) }} {{ $formatLogValue($data['flag'] ?? null) }}
No lead update logs yet.