@extends('layouts.app') @section('title', 'Employee Performance Report') @section('no-page-header') @section('content')
Employee Performance Report
@if($employeeId)
{{ $performance['employee']->full_name }}
Score: {{ $performance['performance_score'] }}/100

{{ $performance['attendance_summary']['attendance_rate'] }}%

Attendance Rate

{{ $performance['transit_summary']['completion_rate'] }}%

Transit Completion

{{ $performance['violation_summary']['resolution_rate'] }}%

Violation Resolution

{{ $performance['performance_score'] }}/100

Overall Score

Performance Breakdown
Monthly Trend
Attendance Details
Total Days{{ $performance['attendance_summary']['total_days'] }}
Present Days{{ $performance['attendance_summary']['present_days'] }}
Absent Days{{ $performance['attendance_summary']['absent_days'] }}
Late Days{{ $performance['attendance_summary']['late_days'] }}
Punctuality Rate{{ $performance['attendance_summary']['punctuality_rate'] }}%
Transit Details
Total Transits{{ $performance['transit_summary']['total_transits'] }}
Completed{{ $performance['transit_summary']['completed_transits'] }}
In Progress{{ $performance['transit_summary']['in_progress_transits'] }}
Delayed{{ $performance['transit_summary']['delayed_transits'] }}
Avg Distance{{ $performance['transit_summary']['average_distance'] }} km
Violation Details
Total Violations{{ $performance['violation_summary']['total_violations'] }}
Resolved{{ $performance['violation_summary']['resolved_violations'] }}
Unresolved{{ $performance['violation_summary']['unresolved_violations'] }}
Resolution Rate{{ $performance['violation_summary']['resolution_rate'] }}%
Most Common Type{{ $performance['violation_summary']['most_common_type'] }}
@else
Performance Rankings
@forelse($performance as $index => $empPerformance) @empty @endforelse
Rank Employee Department Attendance Rate Transit Completion Violations Overall Score Performance Level Actions
#{{ $index + 1 }}
{{ $empPerformance['employee']->full_name }}
{{ $empPerformance['employee']->profile->employee_id ?? '' }}
{{ $empPerformance['employee']->departments->pluck('name')->join(', ') ?: 'N/A' }}
{{ $empPerformance['attendance_summary']['attendance_rate'] }}%
{{ $empPerformance['transit_summary']['completion_rate'] }}%
{{ $empPerformance['violation_summary']['total_violations'] }}
{{ $empPerformance['performance_score'] }}/100
@php $level = $empPerformance['performance_score'] >= 80 ? 'Excellent' : ($empPerformance['performance_score'] >= 60 ? 'Good' : 'Needs Improvement'); $levelColor = $empPerformance['performance_score'] >= 80 ? 'success' : ($empPerformance['performance_score'] >= 60 ? 'warning' : 'danger'); @endphp {{ $level }}
No performance data available
Performance Distribution
Department Performance
Top Performers
@forelse(array_slice($performance, 0, 5) as $topPerformer) @empty @endforelse
Employee Score Attendance Transit Violations
{{ $topPerformer['employee']->full_name }} {{ $topPerformer['performance_score'] }}/100 {{ $topPerformer['attendance_summary']['attendance_rate'] }}% {{ $topPerformer['transit_summary']['completion_rate'] }}% {{ $topPerformer['violation_summary']['total_violations'] }}
No data available
Needs Attention
@forelse(array_slice(array_reverse($performance), 0, 5) as $lowPerformer) @empty @endforelse
Employee Score Issues Actions
{{ $lowPerformer['employee']->full_name }} {{ $lowPerformer['performance_score'] }}/100 @if($lowPerformer['attendance_summary']['attendance_rate'] < 80) Attendance @endif @if($lowPerformer['transit_summary']['completion_rate'] < 80) Transit @endif @if($lowPerformer['violation_summary']['total_violations'] > 5) Violations @endif
No employees need attention
@endif
@endsection