@extends('layouts.app') @section('title', 'Employee Compliance') @section('content') @include('partials.flash') {{-- Summary tiles --}}
@php $tiles = [ ['label' => 'Employees', 'value' => $summary['employees'], 'icon' => 'group', 'class' => 'text-primary'], ['label' => 'Fully Compliant', 'value' => $summary['fully_compliant'], 'icon' => 'verified', 'class' => 'text-on-secondary-container'], ['label' => 'With Overdue', 'value' => $summary['with_overdue'], 'icon' => 'warning', 'class' => 'text-error'], ['label' => 'Avg. Compliance', 'value' => $summary['avg_compliance'] . '%', 'icon' => 'donut_large', 'class' => 'text-secondary'], ]; @endphp @foreach($tiles as $tile)
{{ $tile['icon'] }}

{{ $tile['value'] }}

{{ $tile['label'] }}

@endforeach
{{-- Filters --}}
search
@if($filters['q'] || $filters['homeId'] || $filters['overdueOnly']) Reset @endif
@forelse($rows as $row) @php $initials = collect(explode(' ', $row['user']->name))->map(fn($n) => $n[0] ?? '')->take(2)->implode(''); $pct = $row['compliance']; $barColor = $row['overdue'] > 0 ? 'bg-error' : ($pct >= 100 ? 'bg-primary' : 'bg-gold'); @endphp @empty @endforelse
Employee Assigned Completed In Progress Not Started Overdue Compliance
{{ strtoupper($initials) }}

{{ $row['user']->name }}

{{ $row['user']->email }}

{{ $row['total'] }} {{ $row['completed'] }} {{ $row['in_progress'] }} {{ $row['not_started'] }} @if($row['overdue'] > 0) {{ $row['overdue'] }} @else 0 @endif
{{ $pct }}%
No employees found.
{{ $paginator->links() }}
@endsection