@extends('layouts.app') @php $locale = app()->getLocale(); $isRtl = $locale === 'ar'; @endphp @section('title', $isRtl ? 'حضور الموظفين' : 'Employee Attendance') @section('content')

{{ $isRtl ? 'حضور الموظفين' : 'Employee Attendance' }}

{{ $isRtl ? 'تسجيل حضور وانصراف الموظفين' : 'Track employee clock-in/out' }}

{{ $isRtl ? 'الموظفين' : 'Employees' }}

{{ $isRtl ? 'حاضر' : 'Present' }}

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

{{ $isRtl ? 'متأخر' : 'Late' }}

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

{{ $isRtl ? 'غائب' : 'Absent' }}

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

{{ $isRtl ? 'إجازة' : 'On Leave' }}

{{ $stats['on_leave'] ?? 0 }}

@forelse($employees as $employee) @php $att = $attendance[$employee->id] ?? null; $status = $att->status ?? 'absent'; $statusColors = [ 'present' => 'bg-emerald-100 text-emerald-700', 'late' => 'bg-amber-100 text-amber-700', 'leave' => 'bg-blue-100 text-blue-700', 'absent' => 'bg-slate-100 text-slate-700', ]; $statusLabels = [ 'present' => $isRtl ? 'حاضر' : 'Present', 'late' => $isRtl ? 'متأخر' : 'Late', 'leave' => $isRtl ? 'إجازة' : 'Leave', 'absent' => $isRtl ? 'غائب' : 'Absent', ]; @endphp @empty @endforelse
{{ $isRtl ? 'الموظف' : 'Employee' }} {{ $isRtl ? 'الحالة' : 'Status' }} {{ $isRtl ? 'الدخول' : 'Clock In' }} {{ $isRtl ? 'الخروج' : 'Clock Out' }} {{ $isRtl ? 'الساعات' : 'Worked' }} {{ $isRtl ? 'إجراءات' : 'Actions' }}
{{ mb_substr($employee->first_name, 0, 1) }}

{{ $employee->full_name }}

{{ $employee->department }} • {{ $employee->position }}

{{ $statusLabels[$status] ?? $status }} {{ $att?->clock_in ? \Carbon\Carbon::parse($att->clock_in)->format('H:i') : '—' }} {{ $att?->clock_out ? \Carbon\Carbon::parse($att->clock_out)->format('H:i') : '—' }} {{ $att?->worked_hours ?? '—' }}
@if(!$att || !$att->clock_in)
@csrf
@endif @if($att && $att->clock_in && !$att->clock_out)
@csrf
@endif
{{ $isRtl ? 'لا يوجد موظفين' : 'No employees' }}
@endsection