{{-- Shared: admin view of any student ($panel = admin) and a student's own "My Progress" ($panel = student). --}} @php use App\Support\Money; $tenant = \App\Support\Facades\Tenancy::get(); $brandStyle = $tenant->brand_primary_color ? ":root { --color-brand-600: {$tenant->brand_primary_color}; } .dark { --color-brand-600: {$tenant->brand_primary_color}; }" : null; $isStudent = $panel === 'student'; $navGroups = $isStudent ? \App\Support\Navigation\StudentNav::groups('progress') : \App\Support\Navigation\TenantNav::groups('coaching-tests'); $fmt = fn ($n) => $n === null ? '—' : rtrim(rtrim(number_format((float) $n, 2), '0'), '.'); $guardian = $student->guardians->firstWhere('pivot.is_primary', true) ?? $student->guardians->first(); $maxPercent = max(100, (float) ($trend->max('percent') ?? 0)); @endphp

{{ $tenant->name }} · Progress Report

{{ $student->first_name }} {{ $student->last_name }}

{{ $student->student_code }}{{ $guardian ? ' · Guardian: '.$guardian->first_name.' '.$guardian->last_name.' ('.$guardian->phone.')' : '' }} · Generated {{ now()->format('d M Y') }}

@if($trend->count() > 1)

Score trend

@foreach($trend as $point)
{{ round($point['percent']) }}%
{{ $point['label'] }}
@endforeach
@endif

Test results

@forelse($results as $result) @php $passed = $result->passed(); @endphp @empty @endforelse
DateTestMarks%PositionResult
{{ $result->test->test_date->format('d M Y') }}

{{ $result->test->title }}

{{ $result->test->course?->name }}

{{ $result->is_absent ? 'Absent' : $fmt($result->marks).' / '.$fmt($result->test->total_marks) }} {{ $result->percent() !== null ? $result->percent().'%' : '—' }} {{ $result->merit_position ? $result->merit_position.' / '.($participants[$result->batch_test_id] ?? '?') : '—' }} @if($result->is_absent)Absent @elseif($passed === true)Pass @elseif($passed === false)Below pass @else—@endif
No published test results yet.

Batches

@if($showAttendance)@endif @if($showFees)@endif @forelse($enrollments as $enrollment) @php $att = $attendance->get($enrollment->batch_id); $due = $enrollment->dueCents(); @endphp @if($showAttendance)@endif @if($showFees)@endif @empty @endforelse
BatchInstructorAttendanceFees due

{{ $enrollment->batch?->course?->name }}

{{ $enrollment->batch?->name }} · {{ $enrollment->batch?->daysLabel() }} {{ $enrollment->batch?->timeLabel() }}

{{ $enrollment->batch?->teacher ? $enrollment->batch->teacher->first_name.' '.$enrollment->batch->teacher->last_name : '—' }}{{ $att && $att->total ? round($att->attended / $att->total * 100).'% ('.$att->attended.'/'.$att->total.')' : '—' }}{{ $due ? Money::format($due, $currency) : 'Paid up' }}
No active batches.