@if (! empty($studentPhoto)) photo @endif
@if (! empty($schoolLogo)) @endif

{{ $schoolName }}

@if (! empty($schoolMotto))
{{ $schoolMotto }}
@endif
@if ($schoolAddress) {{ $schoolAddress }} @endif @if ($schoolPhone) · {{ $schoolPhone }} @endif @if ($schoolEmail) · {{ $schoolEmail }} @endif

{{ $termTitle ?: 'Report Card' }}

Student{{ $studentName }} Reg No.{{ $regNo }}
Class{{ $className }} Position{{ $position ?: '—' }}
@if (! empty($componentLabels)) @foreach ($componentLabels as $cl) @endforeach @else @endif @forelse ($subjects as $s) @php $total = (float) ($s['total'] ?? 0); $scoreColor = $total >= 80 ? '#059669' : ($total >= 60 ? '#2563eb' : ($total >= 50 ? '#d97706' : '#dc2626')); $gradeLetter = strtoupper(substr((string) ($s['grade'] ?? ''), 0, 1)); $gradeColor = match ($gradeLetter) { 'A' => '#059669', 'B' => '#2563eb', 'C' => '#d97706', 'D', 'E' => '#ea580c', '' => '#111', default => '#dc2626', }; @endphp @if (! empty($componentLabels)) @foreach ($s['components'] as $comp) @endforeach @else @endif @empty @endforelse
Subject{{ $cl }}CA Mid-Term ExamTotal Grade Position Remark
{{ $s['name'] }}{{ $comp['score'] !== null ? number_format($comp['score'], 1) : '—' }}{{ number_format($s['ca'], 1) }} {{ number_format($s['midTerm'], 1) }} {{ number_format($s['exam'], 1) }}{{ number_format($s['total'], 1) }} {{ $s['grade'] ?? '—' }} {{ $s['position'] ?: '—' }} {{ $s['remark'] }}
No grades recorded for this term.
{{ $noOfSubjects }}Subjects {{ $totalScore }}Total Score {{ $studentAverage }}%Average
@if (count($affectiveSkills ?? []) || count($psychomotorSkills ?? []))
@if (count($affectiveSkills ?? []))

Affective Skills

@foreach ($affectiveSkills as $sk) @endforeach
{{ $sk['name'] }} {!! str_repeat('★', $sk['rating']).str_repeat('☆', max(0, 5 - (int) $sk['rating'])) !!}
@endif @if (count($psychomotorSkills ?? []))

Psychomotor Skills

@foreach ($psychomotorSkills as $sk) @endforeach
{{ $sk['name'] }} {!! str_repeat('★', $sk['rating']).str_repeat('☆', max(0, 5 - (int) $sk['rating'])) !!}
@endif
@endif @if (! empty($promotionStatus))
{{ $promotionStatus === 'promoted' ? '✓ Promoted' : '✕ Repeat' }}
@endif
@if (! empty($formTeacherComment))
Form Teacher's Comment
{{ $formTeacherComment }}
@endif @if (! empty($headTeacherComment))
Head Teacher's Comment{{ $headTeacherName ? " — {$headTeacherName}" : '' }}
{{ $headTeacherComment }}
@endif @if (! empty($resultSummary))
Summary
{{ $resultSummary }}
@endif
@if (! empty($principalSignature)) @if (! empty($schoolStamp)) @endif

{{ $headTeacherName ?: 'Head Teacher' }} — Signature
@endif