@if($doubts->isEmpty())

All Clear!

@if(($statusFilter ?? 'pending') === 'pending') No pending doubts to answer at the moment. Great job keeping up with students! @elseif(($statusFilter ?? '') === 'answered') No answered doubts found yet. @else No student doubts have been assigned to you yet. @endif

@else @php $avatarGradients = [ 'linear-gradient(135deg, #14b8a6, #0ea5e9)', 'linear-gradient(135deg, #6366f1, #8b5cf6)', 'linear-gradient(135deg, #f59e0b, #f97316)', 'linear-gradient(135deg, #10b981, #06b6d4)', 'linear-gradient(135deg, #ec4899, #8b5cf6)', ]; @endphp @foreach($doubts as $index => $doubt) @php $isPending = trim((string) ($doubt->answer ?? 'Pending')) === 'Pending'; $studentName = $doubt->student_name ?? ('Student #' . $doubt->student_id); $studentRegno = $doubt->student_regno ?? ''; $batchName = $doubt->batch_name ?? ('Batch ' . $doubt->batch); $deptName = $doubt->dept_name ?? ('Dept ' . $doubt->dept); $initial = strtoupper(substr(trim($studentName), 0, 1)); $grad = $avatarGradients[$index % count($avatarGradients)]; $searchText = strtolower($studentName . ' ' . $studentRegno . ' ' . $doubt->question . ' ' . $batchName . ' ' . $deptName); @endphp
{{ $initial }}
{{ $studentName }}
@if($studentRegno) {{ $studentRegno }} @endif
{{ $isPending ? 'Pending' : 'Answered' }}
Student Doubt

{{ \Illuminate\Support\Str::limit($doubt->question, 220) }}

@if(!$isPending)
Your Reply

{{ \Illuminate\Support\Str::limit($doubt->answer, 180) }}

@endif
{{ $deptName }} {{ $batchName }} {{ $doubt->created_at ? $doubt->created_at->format('d M Y, h:i A') : '' }}
@endforeach @endif