@extends('layouts.mobile.modern') @section('title', 'KPI Saya') @section('header_left') @endsection @push('mystyle') @endpush @section('content')
@if (Session::get('success'))
{{ Session::get('success') }}
@endif @if (Session::get('warning') || Session::get('error'))
{{ Session::get('warning') ?? Session::get('error') }}
@endif {{-- Employee Profile Card --}}
@if(!empty($karyawan->foto) && Storage::disk('public')->exists('/karyawan/' . $karyawan->foto)) @else
{{ substr($karyawan->nama_karyawan, 0, 1) }}
@endif
{{ $karyawan->nama_karyawan }}
{{ $karyawan->jabatan->nama_jabatan }}
{{ $period->nama_periode }}
@if(isset($kpi_employee)) {{-- Score Card Gradient --}}
Total Score
{{ number_format($kpi_employee->total_nilai, 2) }}
Grade {{ $kpi_employee->grade ?? '-' }}
{{ strtoupper($kpi_employee->status) }}
@csrf
Indikator Penilaian
@foreach ($kpi_employee->details as $index => $detail)
{{-- Header --}}
{{ $detail->indicator->nama_indikator }}
{{ $detail->bobot }}%
{{-- Metrics Grid --}}
Target Pencapaian
{{ $detail->target }} {{ $detail->indicator->satuan }}
Skor Akhir
{{ number_format($detail->skor, 2) }}
{{-- Realisasi Input --}}
status == 'approved' || $detail->indicator->mode == 'auto' ? 'readonly' : '' }} placeholder="0">
{{ $detail->indicator->satuan }}
@if($detail->indicator->mode == 'auto')
Auto Sync: {{ $detail->indicator->metric_source }}
@endif
@endforeach @if($kpi_employee->status != 'approved')
@endif
@else {{-- Target Mode (Initial Setup) --}}
@csrf @if ($indicators->isEmpty())
Indikator belum disetting oleh Admin.
@else
Set Target KPI
@php $total_bobot = 0; @endphp @foreach ($indicators as $index => $indicator)
{{ $loop->iteration }}. {{ $indicator->nama_indikator }}
{{ $indicator->bobot }}%
{{ strtoupper($indicator->jenis_target) }} TARGET
{{ $indicator->satuan }}
@php $total_bobot += $indicator->bobot; @endphp @endforeach
Total Keseluruhan Bobot {{ $total_bobot }}%
@if($total_bobot != 100)
Total bobot komulatif harus tepat 100%. Hubungi Admin jika ini salah.
@endif
@endif
@endif
@endsection