@extends('layouts.employee') @section('title', 'Operational Reports') @section('content')
@php // Preserve existing query params for tabs $queryParams = request()->except('type'); @endphp Check-in Report Checkout Report Check-IN/OUT Report Checkpoint Scans
@if($reportType === 'scans_history') @else @if($reportType === 'checkout' || $reportType === 'combined' || $reportType === 'scans') @endif @if($reportType === 'scans') @endif @if($reportType === 'scans') @endif @endif @forelse($reports as $item) @if($reportType === 'scans_history') @else @php $item = (object) $item; @endphp @if($reportType === 'checkout' || $reportType === 'combined' || $reportType === 'scans') @endif @if($reportType === 'scans') @endif @if($reportType === 'scans') @endif @endif @empty @endforelse
Time / Date Job / Site Checkpoint Info Scan Data / EvidenceJob / Site Scheduled Start Scheduled End Actual Infiltration (Start)Actual Extraction (End)Total ScansStatusDetailed History
{{ $item->scanned_at->format('H:i:s') }}
{{ $item->scanned_at->format('M d, Y') }}
{{ $item->schedule->site->name ?? 'N/A' }}
#{{ $item->schedule->duty_number ?? 'N/A' }}
{{ $item->checkpoint->name ?? 'Unknown Checkpoint' }}
@if($item->is_manual) MANUAL SCAN @else VERIFIED QR @endif @php $opts = is_string($item->checkpoint->extra_scan_options) ? json_decode($item->checkpoint->extra_scan_options, true) : $item->checkpoint->extra_scan_options; $type = $opts['type'] ?? 'log_only'; @endphp {{ str_replace('_', ' ', $type) }}
@if($type === 'message' && $item->employee_message)

"{{ $item->employee_message }}"

@endif @if($type === 'photo')
@if($item->evidence_image) @endif @if($item->additional_photos) @foreach($item->additional_photos as $photo) @endforeach @endif @if(!$item->evidence_image && empty($item->additional_photos)) No photos attached @endif
@endif @if($type === 'log_only') Protocol: Secure Log Only @endif
{{ $item->site_name }}
#{{ $item->duty_number }} {{ $item->type }}
{{ \Carbon\Carbon::parse($item->from_datetime)->format('M d, Y H:i') }}
{{ \Carbon\Carbon::parse($item->to_datetime)->format('M d, Y H:i') }}
@if($item->actual_start_at)
{{ \Carbon\Carbon::parse($item->actual_start_at)->format('M d, Y H:i') }}
@else Pending @endif
@if($item->actual_end_at)
{{ \Carbon\Carbon::parse($item->actual_end_at)->format('M d, Y H:i') }}
@else In Progress @endif
{{ $item->scans_count }}
@php $statusConfig = [ 'completed' => ['bg' => 'bg-emerald-100', 'text' => 'text-emerald-700', 'label' => 'Completed'], 'active' => ['bg' => 'bg-blue-100', 'text' => 'text-blue-700', 'label' => 'Active'], 'upcoming' => ['bg' => 'bg-amber-100', 'text' => 'text-amber-700', 'label' => 'Upcoming'], 'missed' => ['bg' => 'bg-red-100', 'text' => 'text-red-700', 'label' => 'Missed'], ]; $label = $item->status; $config = $statusConfig[$label] ?? ['bg' => 'bg-gray-100', 'text' => 'text-gray-700', 'label' => ucfirst($label)]; @endphp {{ $config['label'] }} @if($item->type === 'Guard') @else No scans for patroller @endif

No records found for this report type

@if($reports->hasPages())
{{ $reports->links() }}
@endif
@endsection