@extends('layouts.app') @section('title', 'Inspection: ' . $inspection->reference_number) @section('content')
Back

{{ $inspection->reference_number }}

{{ $inspection->title }}

Edit

Inspection Information

Title
{{ $inspection->title }}
Inspection Date
{{ $inspection->inspection_date->format('M d, Y') }}
Location
{{ $inspection->location }}
Inspected By
{{ $inspection->inspectedBy->name }}
@if($inspection->department)
Department
{{ $inspection->department->name }}
@endif
Overall Status
{{ ucfirst(str_replace('_', ' ', $inspection->overall_status)) }}
@if($inspection->description)
Description
{{ $inspection->description }}
@endif

Compliance Metrics

{{ $inspection->total_items }}

Total Items

{{ $inspection->compliant_items }}

Compliant

{{ $inspection->non_compliant_items }}

Non-Compliant

{{ $inspection->na_items }}

N/A

@if($inspection->observations || $inspection->recommendations)

Observations & Recommendations

@if($inspection->observations)
Observations
{{ $inspection->observations }}
@endif @if($inspection->recommendations)
Recommendations
{{ $inspection->recommendations }}
@endif
@endif @if($inspection->requires_follow_up)

Follow-up

@if($inspection->followUpAssignedTo)
Assigned To
{{ $inspection->followUpAssignedTo->name }}
@endif @if($inspection->follow_up_date)
Follow-up Date
{{ $inspection->follow_up_date->format('M d, Y') }} @if($inspection->follow_up_date < now() && !$inspection->follow_up_completed) (Overdue) @endif
@endif
Status
{{ $inspection->follow_up_completed ? 'Completed' : 'Pending' }}
@endif @if($inspection->nonConformanceReports->count() > 0)

Related Non-Conformance Reports ({{ $inspection->nonConformanceReports->count() }})

@foreach($inspection->nonConformanceReports as $ncr)

{{ $ncr->title }}

{{ $ncr->reference_number }}

{{ ucfirst($ncr->severity) }}
@endforeach
@endif

QR Code

@php $qrData = \App\Services\QRCodeService::forInspection($inspection->id, $inspection->reference_number); $qrUrl = \App\Services\QRCodeService::generateUrl($qrData, 200); @endphp
QR Code

Scan to view this inspection

Print QR Code

Quick Actions

@endsection