@extends('layouts.app') @section('title', 'Dashboard') @section('content') {{-- Welcome Card --}}

Welcome back, {{ Auth::user()->name }}! 👋

Company: {{ Auth::user()->company->company_name ?? 'N/A' }}

Today is {{ now()->format('l, F d, Y') }}

{{-- Stats Cards Row 1 --}}

Total Employees

{{ $stats['total_employees'] }}

Departments

{{ $stats['total_departments'] }}

Present Today

{{ $stats['present_today'] }}

On Leave

{{ $stats['on_leave_today'] }}

{{-- Stats Cards Row 2 - Pending Items --}}

Pending Leave Requests

{{ $stats['pending_leaves'] }}

View All

Pending Overtime

{{ $stats['pending_overtime'] }}

View All

Draft Payroll

{{ $stats['draft_payroll'] }}

View All
{{-- Charts and Activities --}}
{{-- Attendance Chart --}}
Attendance Overview (Last 7 Days)
{{-- Quick Actions --}}
{{-- Recent Activities --}}
{{-- Recent Attendance --}}
Recent Clock-Ins Today
View All
@forelse($recentAttendance as $attendance)
{{ strtoupper(substr($attendance->employee?->name ?? 'N', 0, 1)) }}
{{ $attendance->employee?->name ?? 'Unknown' }}
{{ $attendance->clock_in?->format('H:i') ?? '-' }} @if($attendance->late_minutes > 0) Late {{ $attendance->late_minutes }} min @endif
@empty

No attendance records today

@endforelse
{{-- Pending Leave Requests --}}
Pending Leave Requests
View All
@forelse($recentLeaves as $leave)
{{ strtoupper(substr($leave->employee?->name ?? 'N', 0, 1)) }}
{{ $leave->employee?->name ?? 'Unknown' }}
{{ $leave->start_date?->format('d M') }} - {{ $leave->end_date?->format('d M') }} {{ $leave->leaveType?->leave_name ?? 'N/A' }}
Pending
@empty

No pending leave requests

@endforelse
{{-- Upcoming Birthdays --}} @if($upcomingBirthdays->count() > 0)
Upcoming Birthdays (Next 7 Days)
@foreach($upcomingBirthdays as $employee)
{{ strtoupper(substr($employee->name ?? 'N', 0, 1)) }}
{{ $employee->name }}
{{ \Carbon\Carbon::parse($employee->date_of_birth)->format('F d') }}
@endforeach
@endif @push('scripts') @endpush @endsection