@extends('layouts.admin') @section('page-title', 'HRM Dashboard') @push('styles') @endpush @section('content')
{{-- Welcome Banner --}}
Human Resource Management
HRM Dashboard
Manage your workforce efficiently
{{ now()->format('d') }}
{{ now()->format('M Y') }}
{{-- KPI Cards --}}
{{ $totalEmployees }}
Total Employees {{ $activeEmployees }} active
{{ $totalDepartments }}
Departments {{ $totalDesignations }} roles
{{ $presentToday }}
Present Today {{ $attendanceRate }}% attendance
{{ $pendingLeaves }}
Pending Leaves {{ $approvedLeaves }} approved
{{ price($monthlyPayroll, false) }}
Monthly Payroll {{ now()->format('M Y') }}
{{ $openJobs }}
Open Positions {{ $upcomingHolidaysCount }} holidays
{{ $promoterEmployees }}
Promoters Linked to HRM
{{ price($totalReferralEarnings, false) }}
Referral Earnings Total paid
{{-- Charts Row --}}
Department Distribution
Active employees by department
@if($departmentStats->count() > 0) @foreach($departmentStats as $dept) @php $maxCount = $departmentStats->first()->employees_count; $fillPercent = $maxCount > 0 ? ($dept->employees_count / $maxCount * 100) : 0; $colors = ['#4f46e5', '#7c3aed', '#06b6d4', '#10b981', '#f59e0b']; $i = $loop->index; @endphp
{{ $dept->name }} {{ $dept->employees_count }}
@endforeach @else
No departments created
@endif
Leave Overview
Current leave status
{{ $leaveStats['pending'] }}
Pending
{{ $leaveStats['approved'] }}
Approved
{{ $leaveStats['rejected'] }}
Rejected
{{-- Recent Employees --}}
Recent Employees
Newly added team members
View All →
@forelse($recentEmployees as $emp) @empty @endforelse
EmployeeDepartmentStatusJoined
{{ strtoupper(substr($emp->first_name, 0, 1).substr($emp->last_name, 0, 1)) }}
{{ $emp->first_name }} {{ $emp->last_name }}
{{ $emp->designation?->name ?? 'N/A' }}
{{ $emp->department?->name ?? 'N/A' }} {{ ucfirst($emp->status) }} {{ $emp->join_date?->format('M d, Y') ?? 'N/A' }}
No employees yet
Upcoming Holidays
Next scheduled holidays
View All →
@forelse($upcomingHolidays as $holiday) @empty @endforelse
HolidayDateDays Left
{{ $holiday->name }} {{ $holiday->date->format('M d, Y') }} @php $daysLeft = now()->diffInDays($holiday->date, false); $badgeClass = $daysLeft <= 3 ? 'badge-red' : ($daysLeft <= 7 ? 'badge-yellow' : 'badge-blue'); @endphp {{ $daysLeft }} days
No upcoming holidays
{{-- Quick Links --}}
Quick Actions
Navigate to HRM modules
@endsection