@if(!empty($schoolInfo?->school_logo)) @else @endif {{-- Screen Action Buttons --}}
@php /* |-------------------------------------------------------------------------- | Resolve Exam Key and Session Heading |-------------------------------------------------------------------------- | Example: "1st MT Exam-2026" */ $examKeyRaw = $batch->exam_group_key ?? ''; $examKeyLabel = $examKeyOptions[$examKeyRaw] ?? ucwords(str_replace('_', ' ', $examKeyRaw)); if (empty($examKeyLabel)) { $examKeyLabel = $batch->exam?->exam_name ?? 'Exam'; } $examTitle = stripos($examKeyLabel, 'exam') !== false ? $examKeyLabel : ($examKeyLabel . ' Exam'); $sessionTitle = $batch->session?->name ?? ''; $examHeading = $sessionTitle ? ($examTitle . '-' . $sessionTitle) : $examTitle; @endphp
{{-- Header matching user design --}}

{{ $schoolInfo?->school_name ?? 'Mascot Innovative School and College' }}

{!! preg_replace('/(\d+)(st|nd|rd|th)/i', '$1$2', e($examHeading)) !!}

Seat Plan

{{-- Summary Table --}} @forelse($roomSummary as $rIndex => $room) @php $sl = str_pad($rIndex + 1, 2, '0', STR_PAD_LEFT); $isFirstRowOfRoom = true; @endphp @foreach($room['classes'] as $classIndex => $class) @php $isFirstRowOfClass = true; @endphp @foreach($class['sections'] as $sectionIndex => $section) {{-- 1. SL Column (Rowspanned for the entire room) --}} @if($isFirstRowOfRoom) {{-- 2. Room Column (Rowspanned for the entire room) --}} @endif {{-- 3. Class Column (Rowspanned for all sections in this class for this room) --}} @if($isFirstRowOfClass) @endif {{-- 4. Section Column --}} {{-- 5. Roll Column (e.g. 1-20 = 15) --}} {{-- 6. Total Student Column (Rowspanned for the entire room) --}} @if($isFirstRowOfRoom) @php $isFirstRowOfRoom = false; @endphp @endif @php $isFirstRowOfClass = false; @endphp @endforeach @endforeach @empty @endforelse
SL Room Class Section Roll Total Student
{{ $sl }} {{ $room['room_name'] }} {{ $class['class_name'] }} {{ $section['section_name'] }} @if(!is_null($section['min_roll']) && !is_null($section['max_roll'])) @if((string)$section['min_roll'] === (string)$section['max_roll']) {{ $section['min_roll'] }} = {{ $section['student_count'] }} @else {{ $section['min_roll'] }}-{{ $section['max_roll'] }} = {{ $section['student_count'] }} @endif @else {{ $section['student_count'] }} @endif {{ $room['total_students'] }}
No seat assignments found for this exam plan.