@extends('layouts.performance') @section('title', 'Rapor Detayı') @section('page', 'report') @section('perf-content') @php $activeTab = ''; $reportLogo = null; foreach (['assets/logo.jpg', 'assets/logo.jpeg', 'assets/logo.png'] as $candidate) { if (file_exists(public_path($candidate))) { $reportLogo = asset($candidate); break; } } @endphp

Rapor Detayı

{{ $assignment->employee_name }} - {{ $assignment->period_name }}

Dönem
{{ $assignment->period_name }}
Personel
{{ $assignment->employee_name }}
Sorumluluk Merkezi
{{ $centerLabel }}
1. Amir
{{ $assignment->evaluator1_name }}
{{ $scores['avg1'] !== null ? number_format((float) $scores['avg1'], 2, '.', '') : '-' }}
2. Amir
{{ $hasEvaluator2 ? ($assignment->evaluator2_name ?? '-') : 'Yok' }}
{{ $scores['avg2'] !== null ? number_format((float) $scores['avg2'], 2, '.', '') : '-' }}
Genel Ortalama
@if ($scores['final'] !== null)
{{ number_format((float) $scores['final'], 2, '.', '') }} @if ($grade['label'] !== '') {{ $grade['label'] }} @endif
@else
-
@endif
Kural Seti
Seçili Kural Seti: {{ $ruleSetName !== '' ? $ruleSetName : 'Tanımlı değil' }}
@if ($setRows->isNotEmpty())
    @foreach ($setRows as $set) @php $rule = $ruleItems[$set->id] ?? ['weight_e1' => 60, 'weight_e2' => 40, 'set_weight' => 1]; $ruleText = 'Amir1 %' . $rule['weight_e1'] . ', Amir2 %' . $rule['weight_e2'] . ', Set Katsayı ' . $rule['set_weight']; @endphp
  • {{ $set->name }}: {{ $ruleText }}
  • @endforeach
@endif
@if ($answerQuestions->isEmpty())
Bu atama için aktif soru seti bulunamadı.
@else
@foreach ([1, 2] as $level) @php $answers = $answersByLevel[$level] ?? []; $stats = $answerStats[$level] ?? ['answered' => 0, 'total' => 0, 'avg' => null]; $levelLabel = $level === 1 ? '1. Amir' : '2. Amir'; $evaluatorName = $level === 1 ? ($assignment->evaluator1_name ?? '-') : ($assignment->evaluator2_name ?? '-'); $sectionId = $level === 1 ? 'answers-e1' : 'answers-e2'; @endphp
{{ $levelLabel }} Cevapları
@if ($level === 2 && !$hasEvaluator2)
Bu atamada 2. amir bulunmuyor.
@else
Seviye: {{ $levelLabel }} Amir: {{ $evaluatorName }} İlerleme: {{ (int) $stats['answered'] }} / {{ (int) $stats['total'] }} Ortalama: {{ $stats['avg'] !== null ? number_format((float) $stats['avg'], 2, '.', '') : '-' }}
@if (empty($answers))
Bu seviyede henüz cevap bulunmuyor.
@endif @php $currentSet = null; @endphp @foreach ($answerQuestions as $question) @php $setName = $question->set_name ?: 'Genel'; $qid = (int) $question->id; $score = $answers[$qid] ?? null; $label = $score !== null ? ($scoreLabels[$score] ?? '-') : '-'; $badgeClass = 'bg-secondary'; if ($score === 5) { $badgeClass = 'bg-success'; } elseif ($score === 4) { $badgeClass = 'bg-primary'; } elseif ($score === 3) { $badgeClass = 'bg-info'; } elseif ($score === 2) { $badgeClass = 'bg-warning'; } elseif ($score === 1) { $badgeClass = 'bg-danger'; } @endphp @if ($setName !== $currentSet) @if ($currentSet !== null)
@endif
Soru Seti: {{ $setName }}
@php $currentSet = $setName; @endphp @endif @endforeach @if ($currentSet !== null)
Soru Puan Açıklama
{{ $question->question_text }} {{ $score !== null ? (int) $score : '-' }} {{ $label }}
@endif @endif
@endforeach @endif
Rapor
Performans Raporu
{{ $assignment->employee_name }} - {{ $assignment->period_name }}
@if ($reportLogo) @endif
{{ now()->format('d.m.Y H:i') }}
Dönem
{{ $assignment->period_name }}
Personel
{{ $assignment->employee_name }}
Sorumluluk Merkezi
{{ $centerLabel }}
1. Amir
{{ $assignment->evaluator1_name }}
{{ $scores['avg1'] !== null ? number_format((float) $scores['avg1'], 2, '.', '') : '-' }}
2. Amir
{{ $hasEvaluator2 ? ($assignment->evaluator2_name ?? '-') : 'Yok' }}
{{ $scores['avg2'] !== null ? number_format((float) $scores['avg2'], 2, '.', '') : '-' }}
Genel Ortalama
@if ($scores['final'] !== null)
{{ number_format((float) $scores['final'], 2, '.', '') }} @if ($grade['label'] !== '') ({{ $grade['label'] }}) @endif
@else
-
@endif
Kural Seti
Seçili Kural Seti: {{ $ruleSetName !== '' ? $ruleSetName : 'Tanımlı değil' }}
@if ($setRows->isNotEmpty())
@foreach ($setRows as $set) @php $rule = $ruleItems[$set->id] ?? ['weight_e1' => 60, 'weight_e2' => 40, 'set_weight' => 1]; $ruleText = 'Amir1 %' . $rule['weight_e1'] . ', Amir2 %' . $rule['weight_e2'] . ', Set Katsayı ' . $rule['set_weight']; @endphp
{{ $set->name }}: {{ $ruleText }}
@endforeach
@endif
Soru Detayları
@foreach ($questions as $row) @endforeach
Soru Seti Soru 1. Amir 2. Amir
{{ $row->set_name }} {{ $row->question_text }} @if ((int) $row->active !== 1) Pasif @else {{ $row->score1 !== null ? (int) $row->score1 : '-' }} @endif @if ((int) $row->active !== 1) Pasif @else {{ $row->score2 !== null ? (int) $row->score2 : '-' }} @endif
@endsection