@extends('layouts.app') @section('title', 'Create Inspection') @section('content')
Back

Create Inspection

Scan QR Code
@csrf

Basic Information

@error('title')

{{ $message }}

@enderror
@error('inspection_date')

{{ $message }}

@enderror
@error('location')

{{ $message }}

@enderror
@error('overall_status')

{{ $message }}

@enderror

Checklist Responses

@if($selectedChecklist || $selectedSchedule) Pre-filled from QR scan @endif
@if(!$selectedChecklist)

Select a checklist above to load items, or add items manually.

@endif
@if($selectedChecklist && $selectedChecklist->items) @php $initialResponses = []; foreach($selectedChecklist->items as $index => $item) { $key = 'item_' . $index; $initialResponses[$key] = [ 'item' => $item['item'] ?? $item['name'] ?? 'Item ' . ($index + 1), 'type' => $item['type'] ?? 'yes_no', 'status' => 'pending', 'notes' => '' ]; } $initialResponsesJson = json_encode($initialResponses); @endphp @foreach($selectedChecklist->items as $index => $item)

{{ $index + 1 }}. {{ $item['item'] ?? $item['name'] ?? 'Item' }}

Type: {{ ucfirst(str_replace('_', ' ', $item['type'] ?? 'yes_no')) }}

@endforeach @endif

Findings & Recommendations

Follow-up

Cancel
@push('scripts') @endpush @endsection