@extends('layouts.app') @section('title', 'Training Reporting & Analytics') @section('content')

Training Reporting & Analytics

Comprehensive training analysis and insights

Training Completion Rate

{{ number_format($completionRate, 1) }}%

Total Sessions

{{ number_format($stats['total_sessions']) }}

{{ $stats['completed_sessions'] }} completed

Total Certificates

{{ number_format($stats['total_certificates']) }}

{{ $stats['active_certificates'] }} active

Total Cost

${{ number_format($costAnalysis->total_cost ?? 0, 2) }}

Avg: ${{ number_format($costAnalysis->avg_cost ?? 0, 2) }}

Training by Department

@if($trainingByDepartment->count() > 0)
@foreach($trainingByDepartment as $dept)
{{ $dept['department'] }} {{ $dept['count'] }} records ({{ $dept['unique_employees'] }} employees)
@php $maxCount = $trainingByDepartment->max('count'); $percentage = $maxCount > 0 ? ($dept['count'] / $maxCount) * 100 : 0; @endphp
@endforeach
@else

No training records found

@endif

Competency Gaps by Priority

@if($competencyGaps->count() > 0)
@php $gapColors = [ 'critical' => 'bg-red-500', 'high' => 'bg-orange-500', 'medium' => 'bg-yellow-500', 'low' => 'bg-green-500' ]; @endphp @foreach(['critical', 'high', 'medium', 'low'] as $priority) @php $count = $competencyGaps[$priority] ?? 0; $total = $competencyGaps->sum(); $percentage = $total > 0 ? ($count / $total) * 100 : 0; $colorClass = $gapColors[$priority] ?? 'bg-gray-500'; @endphp @if($count > 0)
{{ $priority }} {{ $count }} gaps
@endif @endforeach
@else

No competency gaps identified

@endif

Monthly Training Trends

@if($monthlyTrends->count() > 0)
@foreach($monthlyTrends as $trend) @php $completionRate = $trend['total_sessions'] > 0 ? ($trend['completed'] / $trend['total_sessions']) * 100 : 0; @endphp @endforeach
Month Total Sessions Completed Scheduled Completion Rate
{{ $trend['month'] }}
{{ $trend['total_sessions'] }}
{{ $trend['completed'] }}
{{ $trend['scheduled'] }}
{{ number_format($completionRate, 1) }}%
@else

No training trends data available

@endif

Certificate Expiry Analysis

Expiring in 30 Days

{{ $certificateExpiry['expiring_30_days'] }}

Expiring in 60 Days

{{ $certificateExpiry['expiring_60_days'] }}

Expired

{{ $certificateExpiry['expired'] }}

Top Training Types

@if($topTrainingTypes->count() > 0)
@foreach($topTrainingTypes as $type => $count) @php $total = $topTrainingTypes->sum(); $percentage = $total > 0 ? ($count / $total) * 100 : 0; @endphp
{{ ucfirst(str_replace('_', ' ', $type)) }} {{ $count }} sessions ({{ number_format($percentage, 1) }}%)
@endforeach
@else

No training type data available

@endif
@endsection