Comprehensive Job Log

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

@foreach($schedule->employees as $employee) @php $pivot = $employee->pivot; // Adjust for multiple checkin logic if needed, but existing is pivot based. @endphp
Operative: {{ $employee->first_name }} {{ $employee->last_name }} (#{{ $employee->employee_id }})
Temporal & Geospatial Logs
Scheduled Start {{ $schedule->from_datetime->format('Y-m-d H:i') }}
Scheduled End {{ $schedule->to_datetime->format('Y-m-d H:i') }}
Actual Infiltration {{ $pivot->actual_start_at ? \Carbon\Carbon::parse($pivot->actual_start_at)->format('Y-m-d H:i') : 'N/A' }} @if($pivot->start_lat) at [{{ $pivot->start_lat }}, {{ $pivot->start_lng }}] @elseif($pivot->is_addon) (Manual Entry) @endif
Actual Extraction {{ $pivot->actual_end_at ? \Carbon\Carbon::parse($pivot->actual_end_at)->format('Y-m-d H:i') : 'N/A' }} @if($pivot->end_lat) at [{{ $pivot->end_lat }}, {{ $pivot->end_lng }}] @elseif($pivot->is_addon) (Manual Entry) @endif
Field Intelligence & Tactical Incidents
@php $incidents = $schedule->incidents->where('employee_id', $employee->id); @endphp @forelse($incidents as $incident)
{{ $incident->subject }}
{{ $incident->description }}
@if(!empty($incident->images) && is_array($incident->images))
@foreach($incident->images as $img) @php $isWebP = \Illuminate\Support\Str::endsWith(strtolower($img), '.webp'); @endphp
@if($isPdf && $isWebP)
[WebP Not Supported]
@else @endif
@endforeach
@endif
Filed at: {{ $incident->created_at->format('Y-m-d H:i') }}
@empty

No tactical incidents reported by this operative.

@endforelse
Consolidated Evidence Gallery
@php $inImages = json_decode($pivot->checkin_images, true) ?? []; if ($pivot->start_evidence_path) { array_unshift($inImages, $pivot->start_evidence_path); } $outImages = json_decode($pivot->checkout_images, true) ?? []; if ($pivot->end_evidence_path) { array_unshift($outImages, $pivot->end_evidence_path); } @endphp @if(count($inImages) > 0)
CHECK-IN IMAGES
@foreach($inImages as $img) @php $isWebP = \Illuminate\Support\Str::endsWith(strtolower($img), '.webp'); @endphp
@if($isPdf && $isWebP)
[WebP Not Supported]
@else @endif
@endforeach
@endif @if(count($outImages) > 0)
CHECKOUT IMAGES
@foreach($outImages as $img) @php $isWebP = \Illuminate\Support\Str::endsWith(strtolower($img), '.webp'); @endphp
@if($isPdf && $isWebP)
[WebP Not Supported]
@else @endif
@endforeach
@endif
@endforeach