@extends('admin.layouts.master') @section('title', 'إدارة حضور وغياب المعلمين - سجل المعلم') @section('content') @php $teacherProfile = $profile['teacher'] ?? []; $month = $profile['current_month'] ?? []; $all = $profile['all_time'] ?? []; @endphp
@include('admin.partials.page-header', [ 'title' => 'الملف الشامل لحضور المعلم', 'breadcrumbs' => $breadcrumbs, 'actions' => [ [ 'title' => 'تسجيل حضور جديد', 'url' => route('admin.teacher-attendances.create'), 'icon' => 'ti ti-plus', 'class' => 'btn-primary', ], ], ]) @include('admin.partials.alerts')

بيانات المعلم

{{ $teacherProfile['name'] ?? $teacher->name }}

الهاتف: {{ $teacherProfile['phone'] ?? '-' }} الفرع: {{ $teacherProfile['branch'] ?? '-' }} الحالة: {{ $teacherProfile['status'] ?? '-' }} {{ ($profile['is_present_today'] ?? false) ? 'حاضر اليوم' : 'لم يسجل حضور اليوم' }}

آخر دخول للنظام

{{ $teacherProfile['last_login'] ?? '-' }}

حضور هذا الشهر

{{ $month['present'] ?? 0 }}

غياب هذا الشهر

{{ $month['absent'] ?? 0 }}

تأخر هذا الشهر

{{ $month['late'] ?? 0 }}

إجمالي السجلات

{{ $all['total'] ?? 0 }}

أحدث سجلات الحضور
{{ count($profile['recent_attendances'] ?? []) }}
@forelse($profile['recent_attendances'] ?? [] as $attendance) @empty @endforelse
التاريخ الحالة الملاحظات العمليات
{{ $attendance['date'] }} {{ $attendance['status'] }} {{ $attendance['notes'] }} @can('teacher-attendances.update') تعديل @endcan
لا يوجد سجل حضور لهذا المعلم
الحلقات التي يدرّسها
@forelse($profile['teaching_groups'] ?? [] as $group) @empty @endforelse
الحلقة الطلاب
{{ $group['name'] }} {{ $group['students_count'] }}
لا توجد حلقات مرتبطة
آخر مستحق مالي
@if(!empty($profile['latest_payroll']))

الفترة: {{ $profile['latest_payroll']['month_year'] }}

الصافي: {{ $profile['latest_payroll']['final_amount'] }}

الحالة: {{ $profile['latest_payroll']['status'] }}

@else
لا توجد مستحقات مسجلة بعد
@endif
@endsection