@extends('layouts.app') @section('content')

บันทึกตรวจผม

เลือกวันที่และห้องเรียน แล้วบันทึกสถานะรายคนได้ในหน้าเดียว

@if (session('status'))
{{ session('status') }}
@endif @if ($errors->any())
กรุณาตรวจสอบข้อมูลที่กรอกอีกครั้ง
@endif
@if (! $selectedClassroom)

ยังไม่มีห้องเรียนที่บันทึกได้

เมื่อมีข้อมูลห้องเรียนแล้ว หน้านี้จะแสดงรายชื่อนักเรียนให้บันทึกทันที

@else
@foreach ($statuses as $status => $label)
{{ $summary[$status] ?? 0 }} {{ $label }}
@endforeach
@csrf

{{ $selectedClassroom->name }}

{{ $selectedClassroom->students->count() }} คน | ครูที่ปรึกษา {{ $selectedClassroom->advisor_names }}

@forelse ($selectedClassroom->students as $student) @php $check = $checks->get($student->id); $currentStatus = old("checks.{$student->id}.status", $check->status ?? 'normal'); $currentNote = old("checks.{$student->id}.note", $check->note ?? ''); @endphp @empty @endforelse
เลขที่ นักเรียน สถานะ หมายเหตุ
{{ $student->pivot->student_number ?? '-' }}
{{ $student->full_name }}
{{ $student->student_code }}
@foreach ($statuses as $status => $label) @endforeach
ยังไม่มีนักเรียนในห้องนี้
@endif @endsection