@foreach ($questions as $index => $coding) @php $isAllocated = in_array($coding->id, $allocatedQuestionIds ?? []); $isDisabled = in_array($coding->id, $disabledQuestionIds ?? []); $isPastAllocated = in_array($coding->id, $pastAllocatedQuestions ?? []); $isPastDate = $isPastDate ?? false; $allocationDate = ''; if ($isDisabled && isset($questionAllocationDates[$coding->id])) { $allocationDate = \Carbon\Carbon::parse($questionAllocationDates[$coding->id])->format('d/m/Y'); } $cardClass = 'question-card'; if ($isPastDate) { $cardClass .= ' is-readonly'; if ($isAllocated) { $cardClass .= ' past-allocated'; } } elseif ($isDisabled) { $cardClass .= ' is-locked'; } elseif ($isAllocated) { $cardClass .= ' is-selected'; } if ($isPastAllocated && !$isPastDate) { $cardClass .= ' past-other-allocated'; } @endphp
{{ str_pad((string) ($serialStart + $index), 2, '0', STR_PAD_LEFT) }}

{{ $coding->title }}

{{ ucfirst($coding->level) }} @if($isPastDate && $isAllocated) Allocated on {{ $allocatedate ? \Carbon\Carbon::parse($allocatedate)->format('d/m/Y') : 'past date' }} @elseif($isAllocated) Currently Allocated @endif @if($isDisabled && !$isPastDate) Allocated on another date @if($allocationDate)({{ $allocationDate }})@endif @endif @if($isPastAllocated && !$isPastDate) Previously allocated @endif
@if($isPastDate) @if($isAllocated) Allocated @else Not Allocated @endif @else @if($isDisabled) Locked @else @endif @endif
@endforeach @if($questions->count() == 0)

No Coding Questions Found

No questions match your current topic or search criteria.

@endif