Inspection Checklist
@php
$box = function ($v) {
$v = strtoupper(trim((string) $v));
if ($v === 'PASS') return '☑ PASS';
if ($v === 'NA') return '☒ N/A';
if ($v === 'FAIL') return '☒ FAIL';
return $v !== '' ? $v : '—';
};
$groups = [
'Inspections' => $data['inspections'] ?? [],
'Semi-Annual Inspection' => $data['semi_annual'] ?? [],
'Tests & Maintenance' => $data['tests_and_maintenance'] ?? [],
'Hydrostatic Test' => $data['hydrostatic_test'] ?? [],
];
$hasAny = false;
foreach ($groups as $list) {
if (!empty($list)) { $hasAny = true; break; }
}
@endphp
@if(!$hasAny)
No checklist items found.
@else
@foreach($groups as $title => $list)
@if(!empty($list))
{{ $title }}
| # |
Result |
@foreach($list as $i => $v)
| {{ $i + 1 }} |
{{ $box($v) }} |
@endforeach
@endif
@endforeach
@endif