@extends('layouts.app') @section('title', 'Employee Task Progress Report') @section('breadcrumb') Reports / Employee Task Progress @endsection @section('content')

Employee Task Progress Report

Job-wise task completion status and percentage per factory employee

Export CSV
Reset
@if(request('export') === 'csv') @php header('Content-Type: text/csv'); header('Content-Disposition: attachment; filename="employee-task-report-' . now()->format('Y-m-d') . '.csv"'); @endphp @endif
Total Assignments
{{ $totalAssignments }}
Completed
{{ $completedCount }}
In Progress / Paused
{{ $inProgressCount }}
@forelse($reportRows as $employeeName => $jobGroups)
{{ strtoupper(substr($employeeName, 0, 2)) }}
{{ $employeeName }}
Factory Employee
@php $empTotal = $jobGroups->flatten(1)->count(); $empCompleted = $jobGroups->flatten(1)->where('task_status','completed')->count(); $empPct = $empTotal > 0 ? round(($empCompleted / $empTotal) * 100) : 0; @endphp
@foreach($jobGroups->flatten(1) as $row) @endforeach
Job Task Status Allocated Logged Progress % Done
{{ $row['job_number'] }} {{ $row['task_name'] }} @php $badge = match($row['task_status']) { 'completed' => 'badge-green', 'in_progress' => 'badge-blue', 'paused' => 'badge-yellow', default => 'badge-gray', }; @endphp {{ ucfirst(str_replace('_',' ', $row['task_status'])) }} {{ $row['allocated_hours'] ? number_format($row['allocated_hours'],1).'h' : '—' }} {{ number_format($row['logged_hours'],2) }}h @if($row['allocated_hours'])
@else no allocation @endif
{{ $row['allocated_hours'] ? $row['pct'].'%' : '—' }}
@empty
No task assignments found matching the selected filters.
@endforelse
@endsection