{{-- Company E-Learning Compliance (trainer, whole organisation). From TrainerComplianceController@index: $rows, $courses, $summary, $q --}} @extends('layouts.app') @section('title', 'Company Compliance') @section('content') @include('partials.flash') @include('trainer.compliance._tabs') {{-- Summary: whole-company roll-up (same KPI-tile UI as the dashboard) --}} @php $sColor = $summary['compliance'] >= 90 ? 'text-primary' : ($summary['compliance'] >= 70 ? 'text-gold' : 'text-error'); $tiles = [ ['label' => 'Overall Compliance', 'value' => $summary['compliance'].'%', 'icon' => 'verified', 'class' => $sColor, 'sub' => number_format($summary['completed']).' / '.number_format($summary['assigned']).' completions'], ['label' => 'Overdue', 'value' => number_format($summary['overdue']), 'icon' => 'running_with_errors', 'class' => $summary['overdue'] > 0 ? 'text-error' : 'text-on-surface-variant', 'sub' => 'course'.($summary['overdue'] === 1 ? '' : 's').' past due'], ['label' => 'Care Workers', 'value' => number_format($summary['workers']), 'icon' => 'groups', 'class' => 'text-primary', 'sub' => 'across '.$summary['services'].' '.Str::plural('service', $summary['services'])], ['label' => 'Courses Tracked', 'value' => $courses->count(), 'icon' => 'menu_book', 'class' => 'text-on-surface-variant', 'sub' => 'assigned e-learnings'], ]; @endphp
{{ $tile['value'] }}
{{ $tile['label'] }}
{{ $tile['sub'] }}
Nothing to show
No services or assigned e-learning courses in this selection.
| Service | @foreach($courses as $course)
{{ \Illuminate\Support\Str::limit($course->title, 26) }}
|
@endforeach
|---|---|
|
{{ $row['service']->name }}
{{ $row['service']->code }} · {{ $row['workers'] }} {{ Str::plural('worker', $row['workers']) }} |
@foreach($row['cells'] as $cell)
@if($cell === null) – @elseif(!empty($cell['excluded'])) N/A @else @php $bg = $cell['overdue'] > 0 ? 'bg-error text-on-error' : ($cell['pct'] >= 100 ? 'bg-primary text-on-primary' : ($cell['pct'] > 0 ? 'bg-gold text-on-primary' : 'bg-surface-container-high text-on-surface-variant')); @endphp {{ $cell['pct'] }}% @endif | @endforeach