@extends('layouts.app') @section('content') @if(session('error'))
⚠️ {{ session('error') }}
@endif @if(session('success'))
✅ {{ session('success') }}
@endif

{{ $isHrAdmin ? 'Selected Employee' : 'My Team' }}

Evaluating: {{ \Carbon\Carbon::now()->subMonth()->format('F Y') }}

@if ($evaluation)
{{ substr($evaluation->employee->first_name, 0, 1) }}

{{ $evaluation->employee->first_name }} {{ $evaluation->employee->last_name }}

{{ $evaluation->employee->job_title }} • {{ $evaluation->employee->department->name ?? 'N/A' }}

Status

{{ str_replace('_', ' ', $evaluation->status) }}

Master Total

@if ($hasPrevTwo85)

Eligible for Double KPI:

{{ \Carbon\Carbon::parse($qualifyingMonths[0]->start_date)->format('M y') }} ({{ floatval($qualifyingMonths[0]->total_score) }}) & {{ \Carbon\Carbon::parse($qualifyingMonths[1]->start_date)->format('M y') }} ({{ floatval($qualifyingMonths[1]->total_score) }})

@endif
🏆 Double KPI Achieved!
@if ($isNewHire)

Probation Period Override

This employee is within their first 3 months. All KPIs default to 100%. (Double KPI Awards begin at Month 4).

@endif
@csrf
@php $managerCurrentSum = 0; $isDisabled = (!$isHrAdmin && ($evaluation->status !== 'Draft' || $evaluation->is_system_locked == 1)); @endphp @foreach ($mgrIndicators as $item) @php $existingPct = ''; $scoreDisplay = '--'; if ($isNewHire && $item->score === null) { $item->score = $item->indicator->max_score; } if ($item->score !== null && $item->indicator->max_score > 0) { $managerCurrentSum += floatval($item->score); $existingPct = round(($item->score / $item->indicator->max_score) * 100, 0); $scoreDisplay = (fmod($item->score, 1) !== 0.00) ? floatval($item->score) : intval($item->score); } $pctClass = 'bg-white border-slate-200 text-slate-800'; $scoreClass = 'text-slate-300'; if ($existingPct !== '') { if ($existingPct < 80) { $pctClass = 'bg-red-50 border-red-400 text-red-700'; $scoreClass = 'text-red-600'; } elseif ($existingPct < 90) { $pctClass = 'bg-orange-50 border-orange-400 text-orange-700'; $scoreClass = 'text-orange-500'; } else { $pctClass = 'bg-green-50 border-green-400 text-green-700'; $scoreClass = 'text-green-600'; } } @endphp @endforeach
Key Performance Indicator Detailed Target Weight % Achieved Final Score

{{ $item->indicator->title }}

{!! nl2br(e($item->indicator->expected_target)) !!}
{{ floatval($item->indicator->max_score) }}
%
{{ $scoreDisplay }}
Total KPI Weight: {{ floatval($totalMaxPossible) }} Grand Total → {{ floatval($evaluation->total_score) }}
@if ($cdIndicators->count() > 0) @endif
@if (auth()->user()->role === 'Admin') Delete @endif
@if (!$isDisabled) @if ($isHrAdmin && $evaluation->status == 'Submitted') @else @endif @endif
@if ($cdIndicators->count() > 0) @endif @else

Select an Employee

@endif
@endsection