@extends('layouts.dashboard') @section('title', 'Admin Dashboard') @section('content')

Welcome back, Administrator!

Manage your organization's operations and monitor performance

Total Employees

{{ $stats['total_employees'] }}

Supervisors

{{ $stats['total_supervisors'] }}

Total Clients

{{ $stats['total_clients'] }}

Pending Visits

{{ $stats['pending_visits'] }}

Recent Visits

@php $recentVisits = \App\Models\Visit::with(['employee', 'client']) ->latest() ->take(5) ->get(); @endphp @if($recentVisits->count() > 0)
@foreach($recentVisits as $visit)
{{ $visit->employee->name }}
{{ $visit->client->name }}
{{ $visit->scheduled_date->format('M d') }}
{{ $visit->scheduled_time }}
@endforeach
@else

No recent visits

@endif

System Overview

Departments
Active departments
{{ \App\Models\Department::where('status', 'active')->count() }}
Active Visits
Visits in progress
{{ \App\Models\Visit::where('status', 'in_progress')->count() }}
Pending Leaves
Awaiting approval
{{ $stats['pending_leaves'] }}
Today's Activity
Visits completed today
{{ $stats['completed_visits'] }}

Quick Actions

@endsection