@if ($registrations->isEmpty())
No draft registrations found.
@else @foreach ($registrations->chunk(3) as $pageIndex => $pageRegistrations)
@foreach ($pageRegistrations->values() as $slipIndex => $registration) @php $serialNumber = $pageIndex * 3 + $slipIndex + 1; $studentSubjects = $subjects->get($registration->reg_no, collect())->values(); $gender = match ((string) $registration->gender) { '1' => 'Male', '2' => 'Female', '3' => 'Other', default => '-', }; $groupCode = $registration->sub_group; $groupName = $groupDescriptions->get($groupCode, $groupCode ?: '-'); $subGroupName = $registration->subject_sub_group ? $subGroupDescriptions->get($groupCode . ':' . $registration->subject_sub_group) : null; $groupLabel = $subGroupName ? $groupName . ' - ' . $subGroupName : $groupName; @endphp
{{-- --}}
Serial No: {{ $serialNumber }}
FEDERAL BOARD OF INTERMEDIATE AND SECONDARY EDUCATION
SSC STUDENT DRAFT SLIP
Inst / Serial / Year: {{ $institutionCode ?? '-' }} / {{ $registration->sr_id ?? $serialNumber }} / {{ $registration->year ?? '-' }}
Student Name: {{ $registration->name ?? '-' }} Father Name: {{ $registration->fname ?? '-' }}
@if ($registration->photo_path && file_exists($registration->photo_path)) Student photo @else Pic @endif
Gender: {{ $gender }} Religion: {{ $religionDescriptions->get($registration->religion, '-') }}
D.O.B: {{ $registration->dob ? \Carbon\Carbon::parse($registration->dob)->format('d-m-Y') : '-' }} Adm. Date: {{ $registration->adm_date ? \Carbon\Carbon::parse($registration->adm_date)->format('d-m-Y') : '-' }}
Group: {{ $groupLabel }} CNIC#: {{ $registration->cnic ?? '-' }}
Subjects
@for ($subjectRowIndex = 0; $subjectRowIndex < 4; $subjectRowIndex++) @for ($subjectColumnIndex = 0; $subjectColumnIndex < 2; $subjectColumnIndex++) @php $subjectNumber = $subjectRowIndex * 2 + $subjectColumnIndex; $subject = $studentSubjects->get($subjectNumber); @endphp @endfor @endfor
{{ $subjectNumber + 1 }}. {{ $subject?->subject_name ?? ($subject?->sub_code ?? '') }}@if ($subject?->subject_name && $subject?->sub_code) ({{ $subject->sub_code }}) @endif
Special Attention: Parents are requested to carefully check the spellings of Name, Father Name, Date of Birth and Subjects to avoid future complications/issues.
Student Signature Parent Signature
-----------------
@endforeach
@endforeach @endif