@extends('layouts.admin') @section('title', 'Inspections') @section('content')

Inspections

Manage site inspections and track their progress.

@if(request('search') || request('status')) Clear @endif
@forelse($inspections as $inspection) @empty @endforelse
Inspection Site Status Created By Completed Actions

{{ $inspection->title }}

@if($inspection->description)

{{ Str::limit($inspection->description, 50) }}

@endif
{{ $inspection->site->name }}

{{ $inspection->site->client->name ?? 'N/A' }}

@php $statusColors = [ 'pending' => 'bg-amber-100 text-amber-700', 'in_progress' => 'bg-blue-100 text-blue-700', 'done' => 'bg-emerald-100 text-emerald-700', ]; @endphp {{ ucfirst(str_replace('_', ' ', $inspection->status)) }}
{{ strtoupper(substr($inspection->creator->name, 0, 1)) }}
{{ $inspection->creator->name }}
@if($inspection->completed_at)

{{ $inspection->completer->name ?? 'N/A' }}

{{ $inspection->completed_at->format('M d, Y H:i') }}

@else - @endif

No inspections found

@if(request('search') || request('status')) Try adjusting your search criteria @else Get started by adding your first inspection @endif

@if($inspections->hasPages())
{{ $inspections->links() }}
@endif
@push('scripts') @endpush @endsection