{{-- ================================================================ TABS ================================================================= --}}
{{-- ============================================================ TAB 1 — ATTENDANCE SHEET ============================================================= --}}
{{-- Alerts --}} @if ($successMessage)
{{ $successMessage }}
@endif @if ($errorMessage)
{{ $errorMessage }}
@endif {{-- Filters --}}
@if ($selectedClass && empty($availableDates)) No exam dates found for this class. @endif
{{-- Candidates table --}} @if (!empty($candidates))
{{ $this->getExamClassLabel($selectedClass) }} — {{ \Carbon\Carbon::parse($selectedDate)->format('d-m-Y') }} {{ count($candidates) }}
@foreach ($candidates as $index => $candidate) @php $appId = $candidate['c_appln_id']; $isPresent = $attendance[$appId] ?? false; $isDocDone = $docVerify[$appId] ?? false; $photoUrl = $photoMap[$appId] ?? null; @endphp {{-- Photo --}} {{-- Attendance toggle --}} {{-- Doc verify --}} @endforeach
S.No Photo Roll No Application ID Applicant Name Exam Class Exam Centre Present Documents
{{ $index + 1 }} @if ($photoUrl) Photo @else @endif {{ $candidate['c_roll_no'] ?? '—' }} {{ $appId }} {{ $candidate['user']['auth_person_name'] ?? '—' }} {{ $this->getExamClassLabel($candidate['c_class_exam']) }} {{ $candidate['c_exam_venue'] ?? '—' }}
@if ($isDocDone) Verified @else @endif
Present: {{ collect($attendance)->filter()->count() }} / {{ count($candidates) }}  |  Docs Verified: {{ collect($docVerify)->filter()->count() }} / {{ count($candidates) }} {{ collect($attendance)->filter()->count() }} {{ collect($docVerify)->filter()->count() }}
@elseif ($selectedClass && $selectedDate)
No candidates with issued hall tickets found for {{ $this->getExamClassLabel($selectedClass) }} on {{ \Carbon\Carbon::parse($selectedDate)->format('d-m-Y') }}.
@else
Select an exam class and date above to load the attendance sheet.
@endif
{{-- /attendance tab --}} {{-- ============================================================ TAB 2 — HISTORY APPLICATIONS (status = DECLARED) ============================================================= --}}
@forelse ($historyApplications as $index => $application) @empty @endforelse
S.No Application ID Applicant Name Exam Class Exam Date Roll No Final Result Status
{{ $historyApplications->firstItem() + $index }} {{ $application->c_appln_id }} {{ $application->user?->auth_person_name ?? '—' }} {{ $this->getExamClassLabel($application->c_class_exam ?? '') }} {{ $application->d_exam_dt ? \Carbon\Carbon::parse($application->d_exam_dt)->format('d-m-Y') : '—' }} {{ $application->c_roll_no ?? '—' }} @if ($application->c_final_result === 'Passed') Passed @elseif ($application->c_final_result === 'Failed') Failed @else {{ $application->c_final_result ?? '—' }} @endif {{ $application->statusDetail?->c_status_desc ?? 'Declared' }}
No history applications found.
@if ($historyApplications->hasPages())
{{ $historyApplications->links() }}
@endif
{{-- /history tab --}} {{-- ============================================================ TAB 3 — REJECTED APPLICATIONS (status = REJECTED) ============================================================= --}}
@forelse ($rejectedApplications as $index => $application) {{-- ── Action column: 3 reusable buttons ── --}} @empty @endforelse
S.No Application ID Applicant Name Exam Class Submitted Date Status Rejection Remarks Action
{{ $rejectedApplications->firstItem() + $index }} {{ $application->c_appln_id }} {{ $application->user?->auth_person_name ?? '—' }} {{ $this->getExamClassLabel($application->c_class_exam ?? '') }} {{ $application->d_created_dt ? \Carbon\Carbon::parse($application->d_created_dt)->format('d-m-Y') : '—' }} Rejected @if ($application->c_dotapp_rem) {{ $application->c_dotapp_rem }} @else — @endif
{{-- 1. History --}} {{-- 2. Attachments --}} {{-- 3. Download PDF --}}
No rejected applications found.
@if ($rejectedApplications->hasPages())
{{ $rejectedApplications->links() }}
@endif
{{-- /rejected tab --}}
{{-- /tab-content --}}
{{-- /col --}} {{-- ==================================================================== DOCUMENT VERIFY MODAL ===================================================================== --}} @if ($showDocModal) @endif {{-- ==================================================================== APPLICATION HISTORY MODAL (shared: Rejected + History tabs) Reuses the same x-application-history-modal used across the project ===================================================================== --}}