@php use App\Support\PerformanceAppraisal\AppraisalDecisionOptions; $settings = \App\Models\PerformanceAppraisalSetting::settings(); $paperWorkflow = $settings->paperFormWorkflow(); $requiresRatings = \App\Support\PerformanceAppraisal\AppraisalStages::requiresKpiRatings($activeSubmission->stage, $paperWorkflow); $requiresQualitative = \App\Support\PerformanceAppraisal\AppraisalStages::requiresQualitativeFeedback($activeSubmission->stage, $paperWorkflow); $requiresDecision = \App\Support\PerformanceAppraisal\AppraisalStages::requiresDecisionSelection($activeSubmission->stage, $paperWorkflow); $decisionOptions = AppraisalDecisionOptions::active(); $minR = (int) ($settings->rating_scale_min ?? 0); $maxR = (int) ($settings->rating_scale_max ?? 100); $scoringSubmission = $instance->submissions->firstWhere('stage', \App\Support\PerformanceAppraisal\AppraisalStages::scoringStage($paperWorkflow)); $showQualitative = $requiresQualitative || ! $paperWorkflow; $scoringResponses = is_array($scoringSubmission?->responses) ? $scoringSubmission->responses : []; @endphp @if($requiresDecision) @include('partials.appraisal_stage_history', ['instance' => $instance, 'activeSubmission' => $activeSubmission, 'paperWorkflow' => $paperWorkflow])
{{ __('Final decision (check one)') }}
{{ __('মূল্যায়নে প্রাপ্ত মান সম্পর্কে সংশ্লিষ্ট কর্মীর মতামত/সুপারিশ') }}
@forelse($decisionOptions as $opt)
probation_recommendation) === $opt->code)>
@empty

{{ __('No decision options configured. Ask HR to add options under Admin → Decision checklist.') }}

@endforelse
@endif @if($showQualitative)
{{ __('Qualitative feedback (paper form)') }}
{{ __('ক) Three strengths / খ) Three weaknesses — first supervisor') }}
@elseif($paperWorkflow && $requiresRatings)
@endif @if($requiresRatings)
@endif
{{ __('Evaluation form') }}
@if($instance->evaluationForm?->title) {{ $instance->evaluationForm->title }} @endif
@if($requiresRatings) @php $kpiCount = $instance->evaluationForm->formKpis->count(); $maxRaw = $kpiCount * $maxR; @endphp

{{ __('Enter score :min–:max for each KPI, then submit.', ['min' => $minR, 'max' => $maxR]) }} @if($paperWorkflow && $kpiCount === 8) {{ __('Paper form step 2: total raw score up to :max (8 × :each).', ['max' => $maxRaw, 'each' => $maxR]) }} @endif

@foreach(\App\Support\PerformanceAppraisal\AppraisalRatingBands::all() as $b) @endforeach
{{ __('Score band') }}{{ $b['label_bn'] }}
({{ $b['min'] }}–{{ $b['max'] }})
@foreach($instance->evaluationForm->formKpis as $fk) @php $k = $fk->kpiIndicator; @endphp @if($k)
@endif @endforeach @else @if($paperWorkflow && $scoringSubmission?->submitted_at)

{{ __('Scores entered by the employee at :stage.', [ 'stage' => \App\Support\PerformanceAppraisal\AppraisalStages::label($scoringSubmission->stage, true), ]) }} @if($scoringSubmission->total_score !== null) {{ __('Official score') }}: {{ number_format((float) $scoringSubmission->total_score, 2) }}% @endif

@foreach($instance->evaluationForm->formKpis as $fk) @php $k = $fk->kpiIndicator; @endphp @if($k) @endif @endforeach
{{ __('KPI') }}{{ __('Score') }}
@if($k->title_bn){{ $k->title_bn }}
@endif{{ $k->title }}
{{ $scoringResponses[$k->id] ?? '—' }}
@else
{{ __('Sign-off only — submit your comments to forward this appraisal.') }}
@endif @if(! $requiresQualitative && ! $showQualitative && ! $requiresDecision)
@endif @endif