@canany(['hr_manager_hq', 'admin_home']) @extends('adminlte::page') @section('title', config('adminlte.title') . ' | Admin Dashboard') @section('content_header')

Admin Dashboard

@stop @section('content') {{-- KPI Dashboard Row --}}
Total Headcount {{ $currentHeadcount }} @if($monthChange != 0) {{ abs($monthChange) }} @endif
Turnover Rate {{ $turnoverRate }}% Last 12 months
Avg. Tenure {{ $avgTenureYears }} years {{ $avgTenureMonths }} months
Pending Actions {{ $holidayPending + $totalComplianceIssues }} Requires attention
{{-- Quick Actions --}}
{{-- Main Dashboard Cards --}}
{{-- Employee Overview --}}

Employee Overview

{{ $userCount }}

Current Employees

View All
Today's Birthdays {{ count($todaysBirthdays) }} @if(count($todaysBirthdays) > 0) {{ $todaysBirthdays->pluck('name')->implode(', ') }} @endif
Working from Home {{ $employeeWorkFromHomeCount }}
Employee Trends
Gender Distribution
By Division
{{-- Holiday Management --}}

Holiday Management

{{ $holidayCount }}

On Holiday Today

View Calendar

{{ $holidayPending }}

Pending Approvals

Review Now

{{ $longestHoliday['count'] }}

Longest Holiday (Days)

Holiday Requests
Request Status
Days per Month
{{-- Sickness Tracking --}}

Sickness Tracking

{{ $todaySickness }}

Today's Sickness

View Details

{{ $totalSickness }}

Last 12 Months

View Charts

{{ $longestSick['count'] }}

Longest Sick Days

Last 12 Months
By Category
Sickness Days
{{-- Sidebar: Alerts & Activity --}}
{{-- HR Alerts --}}

Alerts

    @if($probationsEndingSoon > 0)
  • {{ $probationsEndingSoon }} probation(s) ending within 30 days
  • @endif @if($missingInfo > 0)
  • {{ $missingInfo }} employee(s) with missing information @if($missingInfo <= 10)
      @foreach($employeesWithMissingInfo as $emp)
    • {{ $emp['name'] }}
      Missing: {{ implode(', ', $emp['missing_fields']) }}
    • @endforeach
    @else

    Showing first 20 of {{ $missingInfo }} employees:

      @foreach($employeesWithMissingInfo->take(20) as $emp)
    • {{ $emp['name'] }}
      Missing: {{ implode(', ', $emp['missing_fields']) }}
    • @endforeach
    View All Employees
    @endif
  • @endif @if($pendingHolidayCount > 0)
  • {{ $pendingHolidayCount }} pending holiday(s) Review
  • @endif @if($probationsEndingSoon == 0 && $missingInfo == 0 && $pendingHolidayCount == 0)
  • All clear! No urgent items
  • @endif
{{-- Recent Starters --}} @if($recentHires->count() > 0)

Recent Starters

    @foreach($recentHires as $hire)
  • {{ $hire->name }}
    {{ $hire->jobtitle }} - {{ \Carbon\Carbon::parse($hire->join_date)->format('d M Y') }}
  • @endforeach
@endif {{-- Upcoming Probations --}} @if($upcomingProbations->count() > 0)

Upcoming Probation Ends

    @foreach($upcomingProbations as $prob)
  • {{ $prob->name }}
    Ends: {{ \Carbon\Carbon::parse($prob->probation_date)->format('d M Y') }}
  • @endforeach
@endif {{-- Latest Approvals --}} @if($recentApprovals->count() > 0)

Recent Approvals

    @foreach($recentApprovals->take(5) as $approval)
  • {{ $approval->getUser->name }}
    {{ number_format($approval->number_days, 1) }} days - {{ $approval->updated_at->diffForHumans() }}
  • @endforeach
@endif
@push('js') @endpush @stop @section('footer')   @stop @endcan