@foreach($section->subSection as $subSection)
@foreach($subSection->items as $item)
@php
$detail = $inspection->details->where('inspection_id', $inspection->id)->where('item_id', $item->id);
if ($detail->count() > 0){
$detail = $detail->first();
}else{
$detail = null;
}
// dd($detail);
@endphp
@if ($item->id != 57) {{ $item->id."." }} @endif {{$item->name}}
@php
$out='';
$in='';
$na='';
$no ='';
$cos='';
$r='';
if($detail){
if($detail->out==1){
$out='OUT';
}
if ($detail->in==1) {
$in='IN';
}
if ($detail->no==1) {
$no='NO';
}
if ($detail->na==1) {
$na='NA';
}
if ($detail->cos==1) {
$cos='COS';
}
if ($detail->r==1) {
$r='R';
}
}
// dd($st);
@endphp
@if ($item->is_in == '1')
@endif
@if ($item->is_out == '1')
@endif
@if ($item->is_no == '1')
@endif
@if ($item->is_na == '1')
@endif
@php
$itemCodes = $submittedCodes[$item->id] ?? collect();
// dd($itemCodes);
@endphp
@if($itemCodes->count())
@foreach ($itemCodes as $sc)
{{--
--}}
{{-- @if($sc->looping_id > 1) --}}
{{-- @endif --}}
@endforeach
@else
{{-- --}}
{{--
--}}
@endif
{{--
--}}
@endforeach
@endforeach