@if(isset($reportType) && $reportType === 'scans_history') Checkpoint Scan History Detail @else Operational Shift Report @endif
Schedule Information
Duty Number: #{{ $report->duty_number }} Status: {{ ucfirst($report->status) }}
Date: {{ \Carbon\Carbon::parse($report->schedule_date)->format('F d, Y') }} Site: {{ $report->site_name }}
Scheduled Time: {{ \Carbon\Carbon::parse($report->from_datetime)->format('H:i') }} - {{ \Carbon\Carbon::parse($report->to_datetime)->format('H:i') }} Location: {{ $report->site_address ?? 'N/A' }}
Operative Details
Employee Name: {{ $report->first_name }} {{ $report->last_name }}
Employee ID: {{ $report->employee_id }}
Role: {{ $report->job_role ?? 'Security Officer' }}
Attendance & Timestamps
Actual Start: @if($report->actual_start_at) {{ \Carbon\Carbon::parse($report->actual_start_at)->format('M d, Y H:i:s') }} @else -- @endif Check-in Location: {{ $report->checkin_coordinates ?? 'GPS Not Recorded' }}
Actual End: @if($report->actual_end_at) {{ \Carbon\Carbon::parse($report->actual_end_at)->format('M d, Y H:i:s') }} @else -- @endif Checkout Location: {{ $report->checkout_coordinates ?? 'GPS Not Recorded' }}
Total Duration: @if($report->actual_start_at && $report->actual_end_at) {{ round(\Carbon\Carbon::parse($report->actual_start_at)->diffInMinutes($report->actual_end_at) / 60, 2) }} Hours @else -- @endif
@if(isset($reportType) && $reportType === 'scans_history')
Scan History
@if(isset($scans) && count($scans) > 0) @foreach($scans as $scan) @endforeach
TIME / DATE MISSION / SITE CHECKPOINT METHOD SCAN PROTOCOL DATA
{{ \Carbon\Carbon::parse($scan->scanned_at)->format('H:i:s') }}
{{ \Carbon\Carbon::parse($scan->scanned_at)->format('M d, Y') }}
{{ $report->site_name }}
Duty #{{ $report->duty_number }}
{{ $scan->checkpoint_name }}
@if($scan->tour_route_name)
Route: {{ $scan->tour_route_name }}
@endif
{{ $scan->is_manual ? 'MANUAL' : 'SCAN' }}
@if($scan->employee_message)
OBSERVATION:
{{ $scan->employee_message }}
@endif @php $scanImages = json_decode($scan->additional_photos ?? '[]', true); @endphp @if(!empty($scanImages))
@foreach($scanImages as $img) @endforeach
@endif @if(empty($scan->employee_message) && empty($scanImages))
Verified Log Only
@endif
@else
No checkpoint scans recorded for this schedule.
@endif
@else
Check-in Evidence
@php $checkinImages = json_decode($report->checkin_images, true); $webpSupported = function_exists('imagecreatefromwebp'); @endphp @if(!empty($checkinImages)) @foreach($checkinImages as $img) @if(($loop->index + 1) % 3 == 0 && !$loop->last) @endif @endforeach
@php $path = storage_path('app/public/' . $img); $ext = strtolower(pathinfo($path, PATHINFO_EXTENSION)); $isWebP = $ext === 'webp'; $fileOk = file_exists($path); @endphp @if($fileOk) @if($isWebP && !$webpSupported)
Image format (WebP) not supported by server.
Please contact admin to enable php_gd webp support.
@else @endif @else
Image Not Found
@endif
@else
No check-in evidence photos recorded.
@endif
Checkout Evidence
@php $checkoutImages = json_decode($report->checkout_evidence, true); @endphp @if(!empty($checkoutImages)) @foreach($checkoutImages as $img) @if(($loop->index + 1) % 3 == 0 && !$loop->last) @endif @endforeach
@php $path = storage_path('app/public/' . $img); $ext = strtolower(pathinfo($path, PATHINFO_EXTENSION)); $isWebP = $ext === 'webp'; $fileOk = file_exists($path); @endphp @if($fileOk) @if($isWebP && !$webpSupported)
Image format (WebP) not supported by server.
Please contact admin to enable php_gd webp support.
@else @endif @else
Image Not Found
@endif
@else
No checkout evidence photos recorded.
@endif
@endif