@extends('layouts.app') @section('title', 'Admin Dashboard') @section('content') @php $header = 'Admin Dashboard'; @endphp Yeni Personel
{{ $stats['total_employees'] }}
Toplam Personel
{{ $stats['active_employees'] }}
Aktif Personel
{{ $stats['pending_leaves'] }}
Bekleyen İzinler
{{ $stats['total_departments'] }}
Departman
Son İzin Başvuruları
Tümünü Gör
@if($recent_leaves->count() > 0)
@foreach($recent_leaves as $leave) @endforeach
Personel İzin Türü Tarih Durum İşlemler
{{ $leave->employee && $leave->employee->user ? $leave->employee->user->name : 'Bilinmeyen Personel' }}
{{ $leave->employee ? $leave->employee->position : 'Pozisyon bilgisi yok' }}
{{ $leave->leaveType->name }}
{{ $leave->start_date->format('d.m.Y') }}
{{ $leave->start_date->diffInDays($leave->end_date) + 1 }} gün
@if($leave->status === 'pending') Bekliyor @elseif($leave->status === 'approved') Onaylandı @elseif($leave->status === 'rejected') Reddedildi @endif
@if($leave->status === 'pending')
@csrf
@endif
@else

Henüz izin başvurusu bulunmuyor.

@endif
Departman İstatistikleri
@foreach($department_stats as $department)
{{ $department->name }}
Müdür atanmamış
{{ $department->employees_count }}
personel
@if(!$loop->last)
@endif @endforeach
Bu Ay Mesai Durumu
@if($monthly_attendance->count() > 0)
@foreach($monthly_attendance as $attendance)
{{ $attendance->count }}
{{ \Carbon\Carbon::parse($attendance->date)->format('d.m') }}
@endforeach
@else

Bu ay için mesai kaydı bulunmuyor.

@endif
@if(isset($recent_leaves) && $recent_leaves->count() > 0) @foreach($recent_leaves as $leave) @endforeach @endif @endsection