@php /** * Helper to handle image rendering in PDF views. * Converts images (including WebP) to base64 JPEGs to ensure compatibility with DomPDF. */ $renderJobImage = function ($img) { $fullPath = public_path('storage/' . $img); if (!file_exists($fullPath)) { return ''; } $extension = strtolower(pathinfo($fullPath, PATHINFO_EXTENSION)); try { if ($extension === 'webp' && function_exists('imagecreatefromwebp')) { $image = @imagecreatefromwebp($fullPath); if ($image) { ob_start(); imagejpeg($image, null, 70); $data = ob_get_clean(); imagedestroy($image); return 'data:image/jpeg;base64,' . base64_encode($data); } } $mime = 'image/' . ($extension === 'jpg' ? 'jpeg' : $extension); return 'data:' . $mime . ';base64,' . base64_encode(file_get_contents($fullPath)); } catch (\Exception $e) { return ''; } }; @endphp

Check-In Evidence Report

Deployment #{{ $schedule->duty_number }} | Site: {{ $schedule->site->name }}

Deployment Context
Operative {{ $employee->first_name }} {{ $employee->last_name }}
Actual Check-In Time {{ $pivot->actual_start_at ? \Carbon\Carbon::parse($pivot->actual_start_at)->format('Y-m-d H:i') : 'N/A' }}
Check-In Location {{ $pivot->start_lat ?? 'N/A' }}, {{ $pivot->start_lng ?? 'N/A' }}
Visual Evidence: Infiltration
@php $images = json_decode($pivot->checkin_images, true) ?? []; @endphp @forelse($images as $image)
Check-in Photo
@empty

No check-in photographs were archived for this job.

@endforelse