@extends('admin.layouts.app') @section('title', get_setting('site_name').' | '.__('Instance #').$instance->id) @section('content') @php $paperWorkflow = \App\Models\PerformanceAppraisalSetting::settings()->paperFormWorkflow(); @endphp
{{-- Header --}}
{{ __('Appraisal instance') }} #{{ $instance->id }}

{{ $instance->staff?->user?->name }} · {{ $instance->cycle?->name }}

{{ __('Back') }} @can('PerformanceAppraisal-edit') {{ __('Edit') }} @endcan @can('PerformanceAppraisal-delete') @if($instance->status !== \App\Models\AppraisalInstance::STATUS_FINALIZED)
@csrf @method('DELETE')
@endif @endcan {{ __('Print appraisal form') }} {{ __('Printable history') }} {{ __('All submissions log') }} @if(! in_array($instance->status, [\App\Models\AppraisalInstance::STATUS_CLOSED, \App\Models\AppraisalInstance::STATUS_CANCELLED], true))
@csrf
@endif
{{ __('Staff') }}

{{ $instance->staff?->user?->name ?? '—' }}

{{ __('User ID') }} {{ $instance->staff?->user?->id ?? '—' }}
{{ __('Status') }}

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

{{ __('Current stage') }}

{{ \App\Support\PerformanceAppraisal\AppraisalStages::label($instance->current_stage, $paperWorkflow) }}

{{ __('Final score') }}

{{ $instance->final_total_score !== null ? number_format((float) $instance->final_total_score, 2).'%' : '—' }}

{{ __('Evaluation period') }}

{{ $instance->evaluation_period_from?->format('d/m/Y') ?? '—' }} – {{ $instance->evaluation_period_to?->format('d/m/Y') ?? '—' }}

{{ __('Form') }}

{{ $instance->evaluationForm?->title ?? '—' }}

@if($paperWorkflow)
{{ __('Org. join date') }}

{{ $instance->organization_join_date?->format('d/m/Y') ?? '—' }}

{{ __('Schedule join date') }}

{{ $instance->schedule_join_date?->format('d/m/Y') ?? '—' }}

{{ __('Branch join date') }}

{{ $instance->branch_join_date?->format('d/m/Y') ?? '—' }}

@endif
@if(! empty($evaluatorWarnings))
{{ __('Evaluator configuration warnings') }}
    @foreach($evaluatorWarnings as $warn)
  • {{ $warn }}
  • @endforeach

{{ __('Assign evaluators when creating a new instance, or use “Suggest from supervisor chain” on the create form as a starting point.') }}

@endif
{{ __('Evaluator chain (by stage)') }}
@foreach($evaluatorChain as $row) @endforeach
{{ __('Stage') }} {{ __('Evaluator') }}
{{ $row['label'] }} {{ $row['evaluator_name'] ?? '—' }}({{ $row['evaluator_user_id'] ?? '—' }}) {{ $row['warning'] ?? '' }}
@php $chainUserIds = $instance->meta['supervisor_chain_user_ids'] ?? []; @endphp @if(! empty($chainUserIds))

{{ __('Supervisor chain (user IDs, nearest first)') }}: {{ implode(' → ', $chainUserIds) }}

@endif
{{-- Submission history --}}
{{ __('Submission history') }} — {{ __('who submitted at each stage') }}
{{ __('Print full history') }}
@include('admin.performance_appraisal.partials.submission_history_block', ['submissionRows' => $submissionRows])
@if($instance->strength_1 || $instance->weakness_1)
{{ __('Qualitative feedback') }}

{{ __('Strengths') }}

  1. {{ $instance->strength_1 ?: '—' }}
  2. {{ $instance->strength_2 ?: '—' }}
  3. {{ $instance->strength_3 ?: '—' }}

{{ __('Weaknesses') }}

  1. {{ $instance->weakness_1 ?: '—' }}
  2. {{ $instance->weakness_2 ?: '—' }}
  3. {{ $instance->weakness_3 ?: '—' }}
@endif
{{ __('Final decision checklist') }}
{{ __('Print form copy') }}
@include('admin.performance_appraisal.partials.decision_checklist_block', ['instance' => $instance, 'decisionOptions' => $decisionOptions])
{{ __('HR data & set final decision') }}
@csrf

{{ __('Select one checklist item (same as paper form). Qualitative fields and dates can be updated here.') }}

@foreach($decisionOptions as $opt)
probation_recommendation) === $opt->code)>
@endforeach {{ __('Manage checklist options') }}
@foreach(['strength_1', 'strength_2', 'strength_3', 'weakness_1', 'weakness_2', 'weakness_3'] as $field)
@endforeach
{{ __('360° reviewer') }}
@csrf
@if($instance->peerFeedback->isNotEmpty())
    @foreach($instance->peerFeedback as $p)
  • {{ $p->reviewer?->user?->name }} ({{ $p->relationship }}) @if($p->submitted_at) {{ __('Submitted') }} {{ $p->submitted_at->format('d/m/Y') }} @else {{ __('Pending') }} @endif
  • @endforeach
@endif
@if($instance->pips->isNotEmpty())
{{ __('PIP') }}
@foreach($instance->pips as $pip)

{{ $pip->status }} — {{ $pip->notes }}

@endforeach
@endif
@endsection @section('script') @include('admin.performance_appraisal.partials.instance_delete_confirm_script') @endsection