@php $disabledAllocatedIds = $disabledAllocatedIds ?? []; $isPastDate = $isPastDate ?? false; $type = $type ?? 'coding'; @endphp @foreach($codings as $index => $coding) {{ $serialStart + $index }} {{ Str::limit($coding->title, 100) }} @php $levelColors = [ 'easy' => 'bg-green-500', 'medium' => 'bg-yellow-500', 'hard' => 'bg-red-500' ]; $color = $levelColors[strtolower($coding->level)] ?? 'bg-gray-500'; @endphp {{ ucfirst($coding->level) }} @php $isChecked = in_array((int) $coding->id, $allocatedIds, true); $isDisabled = in_array((int) $coding->id, $disabledAllocatedIds, true); $isSqlQuestion = $type === 'sql'; // Check if this is SQL question @endphp @endforeach @if(count($codings) === 0)
No {{ $type === 'sql' ? 'SQL ' : '' }}coding questions found. @endif