@extends('layouts.app') @section('title', 'Inspection & Audit Dashboard') @section('content')

Inspection & Audit Dashboard

Overview of inspections, audits, and compliance

Total Inspections

{{ $stats['total_inspections'] }}

Compliant

{{ $stats['compliant_inspections'] }}

Non-Compliant

{{ $stats['non_compliant_inspections'] }}

Open NCRs

{{ $stats['open_ncrs'] }}

Active Audits

{{ $stats['in_progress_audits'] }}

Recent Inspections

@forelse($recentInspections as $inspection)

{{ $inspection->title }}

{{ $inspection->reference_number }}

{{ ucfirst(str_replace('_', ' ', $inspection->overall_status)) }}
{{ $inspection->inspection_date->format('M d, Y') }} {{ $inspection->inspectedBy->name }}
@empty

No recent inspections

@endforelse

Recent Non-Conformance Reports

@forelse($recentNCRs as $ncr)

{{ $ncr->title }}

{{ $ncr->reference_number }}

{{ ucfirst($ncr->severity) }}
{{ $ncr->identified_date->format('M d, Y') }} {{ $ncr->identifiedBy->name }}
@empty

No recent NCRs

@endforelse
@endsection