{{-- Data contract expected from EmployeeDashboardController@index: $stats = [ 'completed' => int, // courses completed 'total' => int, // courses assigned 'overdue' => int, // courses overdue 'progress' => int, // 0-100, overall completion percentage ]; $continueCourses = Collection // in-progress or resumable courses, each with ->pivot->progress (0-100) and ->pivot->status $overdueCourses = Collection // status = overdue $mandatoryCourses = Collection // category = mandatory $serviceCourses = Collection // category = service_specific $upcomingSessions = Collection // ['title','date','time','format','action_state'] $policyAckCount = int // policies awaiting digital acknowledgment --}} @extends('layouts.app') @section('title', 'Employee Dashboard') @section('content') {{-- DUMMY DATA — remove this block once EmployeeDashboardController@index passes real $stats / $continueCourses / $overdueCourses / $mandatoryCourses / $serviceCourses / $upcomingSessions / $policyAckCount. Every variable below uses "??" so real data from the controller always takes priority. --}} @php $course = function (string $title, string $slug, string $category, int $duration, string $status, int $progress = 0) { return (object) [ 'title' => $title, 'slug' => $slug, 'category' => $category, 'duration_minutes' => $duration, 'thumbnail' => null, 'pivot' => (object) ['status' => $status, 'progress_percent' => $progress], ]; }; $stats = $stats ?? [ 'completed' => 3, 'total' => 8, 'overdue' => 1, 'progress' => 42, ]; $continueCourses = $continueCourses ?? collect([ $course('Fire Awareness', 'fire-awareness', 'mandatory', 30, 'in_progress', 60), $course('Autism Awareness', 'autism-awareness', 'mandatory', 30, 'in_progress', 25), ]); $overdueCourses = $overdueCourses ?? collect([ $course('Mental Capacity Act (MCA) & DoLS', 'mental-capacity-act-mca-deprivation-of-liberty-safeguards-dols', 'mandatory', 45, 'overdue'), ]); $mandatoryCourses = $mandatoryCourses ?? collect([ $course('Health and Safety Introduction', 'health-and-safety-introduction', 'mandatory', 30, 'completed', 100), $course('Safeguarding and Protection of Adults', 'safeguarding-and-protection-of-adults-non-gloucestershire', 'mandatory', 40, 'not_started'), $course('Data Protection UK including GDPR', 'data-protection-uk-including-gdpr', 'mandatory', 30, 'not_started'), $course('Dignity and Respect', 'dignity-and-respect', 'mandatory', 30, 'completed', 100), ]); $serviceCourses = $serviceCourses ?? collect([ $course('Bed Rails', 'bed-rails', 'service_specific', 30, 'not_started'), $course('Epilepsy Awareness: Managing Epilepsy', 'epilepsy-awareness-managing-epilepsy', 'service_specific', 30, 'not_started'), $course('Moving and Handling of People', 'moving-and-handling-of-people', 'service_specific', 40, 'completed', 100), ]); $upcomingSessions = $upcomingSessions ?? [ ['title' => 'Manual Handling (Practical)', 'date' => '7 May 2026', 'time' => '14:00', 'format' => 'In-Person', 'action_state' => 'register'], ['title' => 'Safeguarding Refresher', 'date' => '25 May 2026', 'time' => '14:00', 'format' => 'Online', 'action_state' => 'booked'], ]; $policyAckCount = $policyAckCount ?? 2; @endphp {{-- Hero: welcome + overall progress ring --}}

Welcome, {{ auth()->user()->name }}

Here's where your assigned training and compliance status live. Need a hand? Email training.admin@segralms.com or use Contact Support in the sidebar.

{{ $stats['progress'] ?? 0 }}%

Overall Progress

{{-- Alerts --}}
@if(($stats['overdue'] ?? 0) > 0)
warning

You have {{ $stats['overdue'] }} overdue {{ Str::plural('course', $stats['overdue']) }} — please complete {{ $stats['overdue'] === 1 ? 'it' : 'them' }} to stay compliant.

@endif @if(($policyAckCount ?? 0) > 0)
description

You have {{ $policyAckCount }} new {{ Str::plural('policy', $policyAckCount) }} requiring your digital acknowledgment.

Review →
@endif
{{-- Continue where you left off --}} @if(($continueCourses ?? collect())->isNotEmpty()) @include('dashboards.employee._course-rail', [ 'title' => 'Continue Where You Left Off', 'icon' => 'play_circle', 'railId' => 'continue', 'courses' => $continueCourses, ]) @endif {{-- Overdue / needs attention --}} @if(($overdueCourses ?? collect())->isNotEmpty()) @include('dashboards.employee._course-rail', [ 'title' => "Here's What You Need To Do", 'icon' => 'priority_high', 'railId' => 'overdue', 'courses' => $overdueCourses, ]) @endif {{-- CPD banner --}}

Your Development

Your Direction

Set up your CPD scheme to start tracking your progress for the year.

{{-- Mandatory eLearning --}} @if(($mandatoryCourses ?? collect())->isNotEmpty()) @include('dashboards.employee._course-rail', [ 'title' => 'Mandatory eLearning', 'icon' => 'school', 'railId' => 'mandatory', 'courses' => $mandatoryCourses, ]) @endif {{-- Service Specific --}} @if(($serviceCourses ?? collect())->isNotEmpty()) @include('dashboards.employee._course-rail', [ 'title' => 'Service Specific', 'icon' => 'medical_services', 'railId' => 'service', 'courses' => $serviceCourses, ]) @endif {{-- Upcoming Sessions --}}
calendar_today

Upcoming Sessions

@forelse($upcomingSessions ?? [] as $session) @empty @endforelse
Session Date Time Format Action
{{ $session['title'] }} {{ $session['date'] }} {{ $session['time'] }} {{ $session['format'] }} @if(($session['action_state'] ?? 'register') === 'booked') check_circle Booked @else @endif
No upcoming sessions scheduled.
@endsection