@foreach($groupedItems as $sectionName => $itemsInSection)
@php
$secKey = 'sec_' . md5($sectionName);
$isFirst = $loop->first;
$prevKey = isset($sectionKeys[$loop->index - 1]) ? $sectionKeys[$loop->index - 1] : null;
$nextKey = isset($sectionKeys[$loop->index + 1]) ? $sectionKeys[$loop->index + 1] : null;
@endphp
{{ $sectionName }}
{{ count($itemsInSection) }} Pertanyaan
Daftar butir pertanyaan inspeksi pra-harian pada bagian ini.
@foreach($itemsInSection as $item)
{{ $item->sequence ?? $loop->iteration }}.
{{ $item->title }}
@if(in_array($item->question_type, ['choice', 'condition', 'Multiple choice: only one answer', 'Matrix']))
@elseif(in_array($item->question_type, ['multiple_choice', 'Multiple choice: multiple answers allowed']))
@elseif(in_array($item->question_type, ['number', 'Numerical Value']))
@elseif(in_array($item->question_type, ['date', 'Date']))
@elseif(in_array($item->question_type, ['datetime', 'Datetime']))
@elseif(in_array($item->question_type, ['textarea', 'Multiple Lines Text Box']))
@else
@endif
@endforeach
@if(count($groupedItems) > 1)
@if($prevKey)
@else
@endif
@if($nextKey)
@else
@endif
@endif