@php $tenant = \App\Support\Facades\Tenancy::get(); $brandStyle = $tenant->brand_primary_color ? ":root { --color-brand-600: {$tenant->brand_primary_color}; } .dark { --color-brand-600: {$tenant->brand_primary_color}; }" : null; $chaptersForSelectedSubject = $selectedSubjectId ? ($chaptersBySubjectId[$selectedSubjectId] ?? []) : []; $difficultyColor = ['easy' => 'green', 'medium' => 'amber', 'hard' => 'red']; @endphp
{{-- One unified filter bar: Class and Subject narrow the list without leaving the table view; Chapter appears once a subject is picked. --}}
@php $subjectOptionsForFilter = ! is_null($selectedClassId) ? ($subjectsByClass[$selectedClassId] ?? []) : $subjects; @endphp
@if($selectedSubjectId && empty($chaptersForSelectedSubject))

No chapters yet — add one.

@endif
@if($selectedClassId !== null || $selectedSubjectId || $selectedChapterId || $selectedDifficulty || $selectedAuthorId) @endif
@forelse($questions as $question) @empty @endforelse
# Question Class Subject / Chapter Type Difficulty Marks Created By
{{ $loop->iteration }} {{ \Illuminate\Support\Str::limit($question->body, 80) }} @if(! $question->is_active) Inactive @endif {{ $classNameBySubjectId[$question->subject_id] ?? '—' }} {{ $question->subject->name }} @if($question->chapterRef) · {{ $question->chapterRef->name }} @endif {{ str_replace('_', ' ', $question->type) }} {{ ucfirst($question->difficulty) }} {{ $question->marks }} {{ $question->createdBy->name ?? '—' }}

No questions match these filters.

Try clearing a filter, or add a new question to get started.

@csrf

No subjects for this class yet.

No chapters yet for this subject — add one.