@extends('schoolLayout.app') @section('content') @if (session('error'))
Roll No: #{{ $student->latestAdmission->roll_number }}
Class: {{ $student->classes->first()->name }}-{{ $student->sections->first()->name }}
Present Days
{{ $presentCount }}
{{ $presentPercent }}%
Absent Days
{{ $absentCount }}
{{ $absentPercent }}%
Leaves
{{ $leaveCount }}
{{ $leavePercent }}%
Half Days
{{ $halfDayCount }}
{{ $halfDayPercent }}%
| Date | Status | Remarks |
|---|---|---|
| {{ \Carbon\Carbon::parse($record->date)->format('M d, Y') }} | @php $status = strtolower($record->status); $statusDisplay = ucfirst(str_replace('_', ' ', $status)); // Assign styles based on status $badgeStyles = match ($status) { 'present' => ['bg' => '#DCFCE7', 'text' => '#166534'], 'absent' => ['bg' => '#FEE2E2', 'text' => '#991B1B'], 'leave' => ['bg' => '#DBEAFE', 'text' => '#1E40AF'], 'half_day' => ['bg' => '#FEF9C3', 'text' => '#854D0E'], default => ['bg' => '#E5E7EB', 'text' => '#374151'], }; @endphp {{ $statusDisplay }} | {{ $record->remarks ?? '-' }} |