{{-- TOMBOL KEMBALI PINTAR (Ingat Filter Tahun & PIC) --}} Kembali

Update Progress Kinerja

Selesaikan sub-tugas & laporkan realisasi anggaran.

@if(session('success'))
{{ session('success') }}
@endif
{{ substr($targetUser->name, 0, 1) }}
{{ $targetUser->name }}

{{ $targetUser->position }}

@php // 1. FILTER SATPAM (Pastikan Project Masih Ada) // Kita buang data yang indicator-nya null (project dihapus) $cleanData = $performances->filter(function($p) { return $p->indicator != null; }); // 2. AMBIL STRATEGIS $strategis = $cleanData->filter(function($p) { return $p->indicator->type == 'Strategis' || $p->indicator->category == 'Strategis'; }); // 3. AMBIL SURVEILLANCE $surveillance = $cleanData->filter(function($p) { return $p->indicator->type == 'Surveillance' || $p->indicator->category == 'Surveillance'; }); // 4. AMBIL RUTIN (SISANYA DARI DATA BERSIH) // Logika ini aman karena $cleanData sudah bersih dari sampah. $rutin = $cleanData->reject(function($p) use ($strategis, $surveillance) { return $strategis->contains('id', $p->id) || $surveillance->contains('id', $p->id); }); // Grouping Array $groups = [ 'STRATEGIS' => ['data' => $strategis, 'class' => 'header-strategis', 'icon' => 'fa-chess-king', 'color' => 'text-warning'], 'SURVEILLANCE' => ['data' => $surveillance, 'class' => 'header-surveillance', 'icon' => 'fa-video', 'color' => 'text-primary'], 'RUTIN' => ['data' => $rutin, 'class' => 'header-rutin', 'icon' => 'fa-sync-alt', 'color' => 'text-info'], ]; @endphp @foreach($groups as $title => $group) @if($group['data']->count() > 0)

PROJECT {{ $title }}

@foreach($group['data'] as $log) @php // --- LOGIKA GEMBOK WAKTU --- $isLocked = false; $startDate = $log->indicator->start_date; $deadline = $log->indicator->deadline; if($startDate) { $today = \Carbon\Carbon::now()->startOfDay(); $start = \Carbon\Carbon::parse($startDate)->startOfDay(); if($today->lessThan($start)) { $isLocked = true; } } @endphp
{{ $title }}
{{ $log->indicator->name }}
@if($log->indicator->budget > 0)
Pagu: Rp {{ number_format($log->indicator->budget, 0, ',', '.') }}
@endif
@if($isLocked)
Jadwal Mulai
{{ date('d M Y', strtotime($startDate)) }} @else
Periode Pengerjaan
@if($startDate && $deadline) {{ date('d M', strtotime($startDate)) }} - {{ date('d M Y', strtotime($deadline)) }} @elseif($deadline) Deadline: {{ date('d M Y', strtotime($deadline)) }} @else - @endif
@endif
@if($isLocked)
Akses Belum Dibuka

Tugas ini baru bisa dikerjakan mulai tanggal {{ date('d F Y', strtotime($startDate)) }}.

@else
Langkah Pengerjaan
@if($log->subTasks->count() > 0)
@foreach($log->subTasks as $sub)
@if($sub->is_completed) @else @endif
{{ $sub->title }}
@csrf
@if($sub->proof_file) @endif
@endforeach
@else
Langsung update persentase di samping.
@endif
Laporan Final & Keuangan
@csrf @method('PUT')
Rp
Sisa: Rp {{ number_format($log->indicator->budget - $log->indicator->actual_cost, 0, ',', '.') }}
@if($log->subTasks->count() == 0 || $log->subTasks->where('is_completed', false)->count() == 0) @else
Selesaikan sub-tugas dulu
@endif
@endif
@endforeach @endif @endforeach