@extends('layouts.app_layout') @section('content')
Inspection Report Overview
{{ $inspection['overall_status'] ?? 'Under Review' }} @if(isset($inspection['id'])) #{{ $inspection['id'] }} @endif
Center Name:

{{ $inspection['centre_name'] ?? 'N/A' }}

Inspector:

{{ $inspection['inspector_name'] ?? 'N/A' }}

Inspection Date:

{{ $inspection['inspection_date'] ?? 'N/A' }}

Submitted On:

{{ $inspection['created_at'] ?? 'N/A' }}

Checklist Results
@php $totalItems = count($inspection['checklist'] ?? []); $passedItems = collect($inspection['checklist'] ?? [])->sum(); $percentage = $totalItems > 0 ? round(($passedItems / $totalItems) * 100) : 0; @endphp {{ $passedItems }}/{{ $totalItems }} Passed {{ $percentage }}%
@foreach($inspection['checklist'] ?? [] as $key => $isChecked)
@if($isChecked) @else @endif
{{ $loop->iteration }}. {{ $inspection['checklist_items'][$key]['title'] ?? ucfirst(str_replace('_',' ',$key)) }}

{{ $inspection['checklist_items'][$key]['description'] ?? 'No description available.' }}

@if(!empty($inspection['remarks'][$key]))
Remarks:

{{ $inspection['remarks'][$key] }}

@endif
@endforeach
Final Assessment
Overall Status: {{ $inspection['overall_status'] ?? 'Under Review' }}
@if(!empty($inspection['final_remarks']))
Final Remarks:
{{ $inspection['final_remarks'] }}
@endif @if(!empty($inspection['recommendations']))
Recommendations:
{{ $inspection['recommendations'] }}
@endif
@if(isset($inspection['pdf_url'])) Download PDF Report @endif
@endsection @section('pages-scripts') @endsection