{{-- resources/views/reports/class-report.blade.php --}} @extends('layouts.base') @section('content')

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

@if($class->grade_level)

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

@endif
{{ $class->students()->count() }}
Total Students
{{ $laptops->where('status', 'available')->count() }}
Available Laptops
{{ $laptops->where('status', 'checked_out')->count() }}
Checked Out
{{ $laptops->whereIn('status', ['maintenance', 'damaged'])->count() }}
Issues

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($laptop->status) }} @if($laptop->currentAssignment) {{ $laptop->currentAssignment->student->full_name }}
{{ $laptop->currentAssignment->student->student_id }} @else - @endif
@if($laptop->currentAssignment) {{ $laptop->currentAssignment->checked_out_at->format('M d, Y H:i') }} @else - @endif {{ $laptop->serial_number }}
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 ?? '-' }}
All students have laptops assigned.
{{ $laptops->links() }}

Report generated on {{ now()->format('F d, Y \a\t H:i') }} by {{ auth()->user()->name }}

Class: {{ $class->name }} | Total Students: {{ $class->students()->count() }} | Total Laptops: {{ $laptops->count() }}

@endsection