{{-- resources/views/reports/pdf/class-report.blade.php --}} Class Report - {{ $class->name }}

Class Report: {{ $class->name }}

@if($class->grade_level)

Grade {{ $class->grade_level }} {{ $class->section ? '- ' . $class->section : '' }}

@endif

Generated on: {{ date('F d, Y \a\t H:i') }}

{{ $class->students()->count() }}

Total Students

{{ $laptops->count() }}

Total Laptops

{{ $laptops->where('status', 'available')->count() }}

Available Laptops

{{ $laptops->where('status', 'checked_out')->count() }}

Checked Out

Laptop Assignments

@forelse($laptops as $laptop) @empty @endforelse
Asset Tag Brand/Model Status Current Student Checked Out Serial Number
{{ $laptop->asset_tag }} {{ $laptop->brand }}
{{ $laptop->model }}
{{ ucfirst(str_replace('_', ' ', $laptop->status)) }} @if($laptop->currentAssignment) {{ $laptop->currentAssignment->student->full_name }}
ID: {{ $laptop->currentAssignment->student->student_id }} @else Not assigned @endif
@if($laptop->currentAssignment) {{ $laptop->currentAssignment->checked_out_at->format('M d, Y H:i') }} @else - @endif {{ $laptop->serial_number ?? 'N/A' }}
No laptops assigned to this class.

Students without Laptops

@php $studentsWithoutLaptops = $class->students->filter(function($student) { return !$student->currentAssignment; }); @endphp @forelse($studentsWithoutLaptops as $student) @empty @endforelse
Student ID Name Email
{{ $student->student_id }} {{ $student->full_name }} {{ $student->email ?? 'N/A' }}
All students have laptops assigned.