@extends('admin.admin_dashboard') @section('customcss') @endsection @section('admin')
{{-- Breadcrumb --}} {{-- Top Context & Mode Switch Bar --}}
{{ $session->name }} Class: {{ $class->name }} {{ $studentsData->count() }} Students
Edit Mode
{{-- Main Table Card --}}
{{-- Table Toolbar: Search & Bulk Action --}}
{{-- Table Content --}}
@php $categories = [ 'behaviour' => 'Behaviour', 'dress_up' => 'Dress Up', 'performance' => 'Performance', 'co_curriculum' => 'Co-Curricular', ]; $ratings = ['Ex.', 'V.G', 'Good', 'Avg.']; @endphp @forelse($studentsData as $key => $s) @php $gpaVal = is_numeric($s->gpa) ? (float)$s->gpa : 0.0; $gpaClass = 'gpa-pass'; if ($gpaVal >= 5.0) { $gpaClass = 'gpa-a-plus'; } elseif ($gpaVal <= 0.0 || $s->grade === 'F') { $gpaClass = 'gpa-fail'; } $studentName = optional($s->student)->student_name_english ?? optional($s->student)->student_name_bangla ?? optional($s->student)->name ?? ('ID: ' . $s->student_id); @endphp {{-- SL --}} {{-- Roll --}} {{-- Student info --}} {{-- Total Marks --}} {{-- GPA --}} {{-- Row Toggle All to Ex --}} {{-- 4 Performance Rating Columns --}} @foreach($categories as $fieldName => $label) @php $existingValue = optional($s->performance)?->$fieldName; @endphp @endforeach {{-- Position Input --}} @empty @endforelse
SL Roll Student Name Total Avg GPA Behaviour Dress Up Performance Co-Curricular Position
#{{ $key + 1 }} {{ $s->class_roll }}
{{ $studentName }} @if(!empty($s->suggested_position)) @endif
Section: {{ $s->section_name }} • Roll: {{ $s->class_roll }}
{{ is_numeric($s->total_mark) ? round((float)$s->total_mark, 2) : $s->total_mark }} {{ is_numeric($s->gpa) ? number_format((float)$s->gpa, 2) : $s->gpa }}
@foreach($ratings as $rate) @php if ($existingValue) { $isChecked = ($existingValue == $rate); } else { $isChecked = ($rate === 'Ex.'); } $pillId = 'pill_' . $s->student_id . '_' . $fieldName . '_' . str_replace('.', '', $rate); @endphp
@endforeach

No approved students found for this class in this session.

{{-- Bottom Save Bar --}} @if($studentsData->isNotEmpty())
Changes will be instantly reflected on report cards and progress sheets.
@endif
@endsection @section('customjs') @endsection