@extends('layouts.app') @section('content') @php $periods = [ 'daily' => 'Daily', 'weekly' => 'Weekly', 'fortnightly' => 'Fortnightly', 'bi_monthly' => 'Bi Monthly', 'monthly' => 'Monthly', 'quarterly' => 'Quarterly', 'annually' => 'Annually', ]; $reportTypes = [ 'performance' => 'Performance (Periodically)', 'history' => 'General Report (History)', ]; $statuses = ['new' => 'New', 'pending' => 'Pending', 'ongoing' => 'Ongoing', 'completed' => 'Completed', 'verified' => 'Verified', 'rejected' => 'Rejected', 'cancelled' => 'Cancelled']; @endphp
| Date | Task No | Employee | Branch | Category | Subject | Description | Target | Achieved | Status | Supervisor | Latest Note |
|---|---|---|---|---|---|---|---|---|---|---|---|
| {{ ($task->start_date ?: $task->created_at)->format('Y-m-d H:i') }} | {{ $task->task_no }} | {{ $task->assignedTo?->name ?: 'Unassigned' }} | {{ $task->branch?->name ?: '-' }} | {{ $task->category?->name ?: '-' }} | {{ $task->subject }} | {{ $task->description ?: '-' }} | {{ $task->target_value !== null ? number_format($task->target_value, 2) : '-' }} | {{ number_format($task->achieved_value, 2) }} | {{ $isOverdue ? 'Overdue' : ($statuses[$task->status] ?? $task->status) }} | {{ $task->supervisor?->name ?: '-' }} | {{ $latest?->progress_note ?: '-' }} |
| No task history found. | |||||||||||
| Employee | Branch | Tasks | Target | Achieved | Completion % | New | Pending | Ongoing | Completed | Verified | Overdue | Score |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| {{ $row['employee'] }} | {{ $row['branch'] }} | {{ number_format($row['tasks']) }} | {{ number_format($row['target'], 2) }} | {{ number_format($row['achieved'], 2) }} | {{ number_format($row['completion_percent'], 2) }}% | {{ number_format($row['new']) }} | {{ number_format($row['pending']) }} | {{ number_format($row['ongoing']) }} | {{ number_format($row['completed']) }} | {{ number_format($row['verified']) }} | {{ number_format($row['overdue']) }} | {{ number_format($row['score'], 2) }}% |
| No performance records found. | ||||||||||||
| Totals | {{ number_format($performanceRows->sum('tasks')) }} | {{ number_format($performanceRows->sum('target'), 2) }} | {{ number_format($performanceRows->sum('achieved'), 2) }} | {{ number_format($performanceRows->sum('new')) }} | {{ number_format($performanceRows->sum('pending')) }} | {{ number_format($performanceRows->sum('ongoing')) }} | {{ number_format($performanceRows->sum('completed')) }} | {{ number_format($performanceRows->sum('verified')) }} | {{ number_format($performanceRows->sum('overdue')) }} | |||