@extends('partials.app') @section('title', 'Dashboard') @php $user = auth()->user(); $firstName = strtok($user->name ?? 'Team', ' '); $hour = now()->hour; $greeting = $hour < 12 ? 'Good morning' : ($hour < 18 ? 'Good afternoon' : 'Good evening'); @endphp @section('content')
@if($isAdmin || $isCoordinator) Here's the live picture of your training operations — users, active programmes, and items waiting on action. @elseif($isTrainer) Your assigned trainings, pending acceptance requests, and upcoming sessions are below. @elseif($isReviewer) Trainings submitted for review are listed below — open any one to review and update its status. @elseif($isApprover) Trainings marked as reviewed are ready for your approval. Open any one to take action. @else Your active training assignments and next steps are shown below. @endif
| Training Name | Date | Register | Present | Absent | Passed Count | Failed Count |
|---|---|---|---|---|---|---|
|
{{ $summary->name }}
@if($summary->is_expired)
Ended
@endif
|
{{ $summary->date ? \Carbon\Carbon::parse($summary->date)->format('d M Y') : '-' }} | {{ $summary->register_count }} | {{ $summary->present_count }} | {{ $summary->absent_count }} | {{ $summary->passed_count }} | {{ $summary->failed_count }} |
| No training summary data available yet. | ||||||
| Training | Type | Status | Trainees | Dates | |
|---|---|---|---|---|---|
| {{ $t->name }} | {{ $t->training_type === 'classroom' ? 'Classroom' : 'Self Training' }} | @php $statusColor = ['created'=>'secondary','inreview'=>'warning','reviewed'=>'info','approved'=>'success'][$t->status] ?? 'secondary'; @endphp {{ ucfirst($t->status) }} | {{ $t->trainees_count }} | {{ $t->start_date ? \Carbon\Carbon::parse($t->start_date)->format('d M') : '—' }} @if($t->end_date) – {{ \Carbon\Carbon::parse($t->end_date)->format('d M Y') }} @endif | View |
| No active trainings yet. | |||||
| Programme | Date | Trainees | Status | |
|---|---|---|---|---|
| {{ $annual->name }} | {{ $annual->start_date ? \Carbon\Carbon::parse($annual->start_date)->format('d M') : '—' }} @if($annual->end_date) – {{ \Carbon\Carbon::parse($annual->end_date)->format('d M Y') }} @endif | {{ $annual->trainees_count }} | @php $annualStatusColor = ['created'=>'secondary','inreview'=>'warning','reviewed'=>'info','approved'=>'success'][$annual->status] ?? 'secondary'; @endphp {{ ucfirst($annual->status) }} | View |
| No refreshment training scheduled for {{ $annualMonthLabel }}. | ||||