@extends('student.layouts.app') @section('title', app()->getLocale() === 'ar' ? 'الحضور' : 'Attendance') @section('content') @php $isArabic = app()->getLocale() === 'ar'; $presentCount = 0; $absentCount = 0; foreach ($attendanceRecords as $attendance) { $isAbsent = in_array(auth()->id(), $attendance->absentStudents->pluck('student_id')->toArray(), true); $isAbsent ? $absentCount++ : $presentCount++; } @endphp
@include('student.courses.inc.overview', ['course' => $course]) @include('student.courses.inc.tabs', ['course' => $course])
{{ $isArabic ? 'إجمالي السجلات' : 'Total records' }}
{{ $attendanceRecords->count() }}
{{ $isArabic ? 'حضور' : 'Present' }}
{{ $presentCount }}
{{ $isArabic ? 'غياب' : 'Absent' }}
{{ $absentCount }}

{{ $isArabic ? 'سجل الحضور' : 'Attendance record' }}

{{ $isArabic ? 'جدول زمني واضح لحالات الحضور والغياب داخل هذه المادة.' : 'A clear timeline of your attendance in this course.' }}

@foreach($attendanceRecords as $attendance) @php $isAbsent = in_array(auth()->id(), $attendance->absentStudents->pluck('student_id')->toArray(), true); @endphp @endforeach @if(($attendanceRecords)->isEmpty()) @endif
{{ $isArabic ? 'التاريخ' : 'Date' }} {{ $isArabic ? 'النوع' : 'Type' }} {{ $isArabic ? 'الحالة' : 'Status' }} {{ $isArabic ? 'تاريخ النشر' : 'Published' }}
{{ $attendance->date }} {{ $attendance->type }} {{ $isAbsent ? __('dashboard.Absent') : __('dashboard.Present') }} {{ $attendance->created_at?->format('Y-m-d H:i') }}
{{ $isArabic ? 'لم يتم تسجيل أي حضور أو غياب بعد.' : 'No attendance records yet.' }}
@endsection