{{ __('KPI') }}

@can('create_kpiscore', App\Models\KpiScore::class) {{ __('button.Create-KPI') }} @endcan @can('view_any_kpiindicator', App\Models\KpiIndicator::class) @endcan
@if($isInbox ?? false) @endif @foreach($entries as $entry) @php $approval = $entry->KPI->approval; @endphp @if($isInbox ?? false) @php $currentStep = $approval?->steps->firstWhere('status', 'active'); $currentUser = auth()->user(); $canApprove = false; if ($currentStep) { $canApprove = ($currentStep->user_id === $currentUser->id) || ($currentStep->approver_role && $currentUser->hasRole($currentStep->approver_role)); } @endphp @endif @if($isInbox ?? false) @endif @endforeach
# {{ __('table.Code') }} {{ __('table.Name') }} {{ __('table.Job-Position') }} {{ __('table.Final-Score') }} {{ __('table.Period') }} File Status {{ __('table.Action') }}
{{ $loop->iteration }} {{ $entry->code }} user photo {{ $entry->employee?->fullname ?? '-' }} {{ $entry->employee?->employment?->jobposition?->name ?? '-' }} {{ number_format($entry->final_score * 100, 2) }}% {{ $entry->period }} @if ($entry->KPI->kpi_file) @else @endif @if ($canApprove) @endif