{{-- FLASH MESSAGES --}} @if(session('success'))
{{ session('success') }}
@endif @if(session('error'))
{{ session('error') }}
@endif {{-- PAGE TITLE & FILTERS --}}

Report Cards

Generate, approve, and publish student report cards

{{-- BULK ACTIONS --}} @if($selectedClassId && $selectedYearId)
@csrf
@if(!empty($stats) && $stats['draft'] > 0)
@csrf
@endif @if(!empty($stats) && $stats['approved'] > 0)
@csrf
@endif
@endif
@if($selectedClassId && $selectedYearId) {{-- STATS --}} @if(!empty($stats) && $stats['total'] > 0)

Total Generated

{{ $stats['total'] }}

Published

{{ $stats['published'] }}

Avg GPA

{{ $stats['avg_gpa'] ?? '—' }}

Pass Rate

{{ $stats['pass_rate'] ?? '—' }}

@endif {{-- REPORT CARDS TABLE --}} @if($reportCards->isNotEmpty())

Report Cards Directory

@foreach($reportCards as $card) @endforeach
Student Rank GPA Grade Attendance Promotion Status Actions
{{ strtoupper(substr($card->student->name ?? 'S', 0, 1)) }}

{{ $card->student->name ?? 'Unknown' }}

{{ $card->student->email ?? '' }}

{{ $card->class_rank ? '#'.$card->class_rank : '—' }} {{ $card->gpa ? number_format($card->gpa, 2) : '—' }} @if($card->overall_grade_letter) @php $g = $card->overall_grade_letter; $gc = match(true) { in_array($g, ['A+','A']) => 'bg-emerald-100 text-emerald-700', in_array($g, ['B+','B']) => 'bg-blue-100 text-blue-700', in_array($g, ['C+','C']) => 'bg-amber-100 text-amber-700', in_array($g, ['D+','D']) => 'bg-orange-100 text-orange-700', default => 'bg-rose-100 text-rose-700', }; @endphp {{ $g }} @else @endif {{ $card->overall_attendance_percentage ? number_format($card->overall_attendance_percentage, 0).'%' : '—' }} {{ $card->promotion_label }} {{ $card->status_label }} View
@else

No report cards yet

Click "Generate All" above to create report cards using the latest gradebook data.

@endif @else

Select a class and year

Choose an academic year and class from the filters above to manage report cards.

@endif