{{--Kepala Daerah--}} @php $sasaranKab = $listKab->pluck('rpjmdSasaran')->collapse(); $sasaranIndikatorKab = $sasaranKab->pluck('rpjmdSasaranIndikator')->collapse(); $targetKab = $sasaranIndikatorKab->pluck('rpjmdSasaranIndikatorTarget')->collapse(); $trxIkuKab = $sasaranIndikatorKab->pluck('trxIku')->map(function ($q, $i) use($targetKab) { $trxIku = $q->last(); if (!is_null($trxIku)) { $target = $targetKab->where('rpjmd_sasaran_indikator_id', $trxIku->rencana_kinerja_id)->first(); $trxRkt = $trxIku->trxRkt; $trxPk = $trxRkt->trxPk->last(); if (!is_null($trxPk)) { $trxRenaksi = $trxPk->trxPkDetail->where('trx_rkt_id', $trxRkt->id)->last()->trxRenaksi; $trxIku->renaksi = $trxRenaksi; if(!is_null($trxRkt) && !is_null($trxRkt->realisasi)) { if($trxIku->jenis_perhitungan === 'positif') { $trxIku->capaian = $trxRkt?->realisasi / $target->target * 100; } else { $trxIku->capaian = ($target->target - ($trxRkt?->realisasi - $target->target)) / $target->target * 100; } } else { $trxIku->capaian = 0; } $trxIku->has_pk = true; } else { $trxIku->capaian = 0; $trxIku->has_pk = false; } } return $trxIku; }); $labelKab1 = $trxIkuKab->where('capaian', '>=', 0)->where('capaian', '<', 50)->where('has_pk', true); $labelKab2 = $trxIkuKab->where('capaian', '>=', 50)->where('capaian', '<', 65)->where('has_pk', true); $labelKab3 = $trxIkuKab->where('capaian', '>=', 65)->where('capaian', '<', 75)->where('has_pk', true); $labelKab4 = $trxIkuKab->where('capaian', '>=', 75)->where('capaian', '<', 90)->where('has_pk', true); $labelKab5 = $trxIkuKab->where('capaian', '>=', 90)->where('capaian', '<', 100)->where('has_pk', true); $labelKab6 = $trxIkuKab->where('capaian', 100)->where('has_pk', true); $labelKab7 = $trxIkuKab->where('capaian', '>', 100)->where('has_pk', true) @endphp {{--Perangkat Daerah--}} @foreach ($listSkpd as $idxOpd => $opd) @php $organisasi = $opd->organisasi; $tujuan = $organisasi->renstraTujuan; $sasaran = $tujuan->pluck('renstraSasaran')->collapse(); $sasaranIndikator = $sasaran->pluck('renstraSasaranIndikator')->collapse(); $target = $sasaranIndikator->pluck('renstraSasaranIndikatorTarget')->collapse(); $trxIku = $sasaranIndikator->pluck('trxIku')->map(function ($q, $i) use($target) { $trxIku = $q->last(); if (!is_null($trxIku)) { $target = $target->where('renstra_sasaran_indikator_id', $trxIku->rencana_kinerja_id)->first(); $trxRkt = $trxIku->trxRkt; $trxPk = $trxRkt->trxPk->last(); if (!is_null($trxPk)) { $trxRenaksi = $trxPk->trxPkDetail->where('trx_rkt_id', $trxRkt->id)->last()->trxRenaksi; $trxIku->renaksi = $trxRenaksi; if(!is_null($trxRkt) && !is_null($trxRkt->realisasi)) { if($trxIku->jenis_perhitungan === 'positif') { $trxIku->capaian = $trxRkt?->realisasi / $target->target * 100; } else { $trxIku->capaian = ($target->target - ($trxRkt?->realisasi - $target->target)) / $target->target * 100; } } else { $trxIku->capaian = 0; } $trxIku->has_pk = true; } else { $trxIku->capaian = 0; $trxIku->has_pk = false; } } return $trxIku; }); $label1 = $trxIku->where('capaian', '>=', 0)->where('capaian', '<', 50)->where('has_pk', true); $label2 = $trxIku->where('capaian', '>=', 50)->where('capaian', '<', 65)->where('has_pk', true); $label3 = $trxIku->where('capaian', '>=', 65)->where('capaian', '<', 75)->where('has_pk', true); $label4 = $trxIku->where('capaian', '>=', 75)->where('capaian', '<', 90)->where('has_pk', true); $label5 = $trxIku->where('capaian', '>=', 90)->where('capaian', '<', 100)->where('has_pk', true); $label6 = $trxIku->where('capaian', 100)->where('has_pk', true); $label7 = $trxIku->where('capaian', '>', 100)->where('has_pk', true) @endphp {{--Triwulan--}} @foreach (['I', 'II', 'III', 'IV'] as $triwulan) @php $renaksi = $trxIku->map(function ($v) use($triwulan) { if(isset($v->renaksi)) { $v->triwulan = $v->renaksi->where('triwulan', $triwulan)->whereNotNull('target_fisik')->last(); if (!is_null($v->triwulan) && !is_null($v->triwulan->realisasi_fisik)) { try { if($v->jenis_perhitungan === 'positif') { $v->capaian_triwulan = $v->triwulan?->realisasi_fisik / $v->triwulan?->target_fisik * 100; } else { $v->capaian_triwulan = ($v->triwulan?->target_fisik - ($v->triwulan?->realisasi_fisik - $v->triwulan?->target_fisik)) / $v->triwulan?->target_fisik * 100; } } catch (\Throwable $e) { $v->capaian_triwulan = 0; } } else { $v->capaian_triwulan = 0; } } return $v; }); $targetTriwulan = $renaksi->whereNotNull('triwulan'); $labelTriwulan1 = $targetTriwulan->where('capaian_triwulan', '>=', 0)->where('capaian_triwulan', '<', 50); $labelTriwulan2 = $targetTriwulan->where('capaian_triwulan', '>=', 50)->where('capaian_triwulan', '<', 65); $labelTriwulan3 = $targetTriwulan->where('capaian_triwulan', '>=', 65)->where('capaian_triwulan', '<', 75); $labelTriwulan4 = $targetTriwulan->where('capaian_triwulan', '>=', 75)->where('capaian_triwulan', '<', 90); $labelTriwulan5 = $targetTriwulan->where('capaian_triwulan', '>=', 90)->where('capaian_triwulan', '<', 100); $labelTriwulan6 = $targetTriwulan->where('capaian_triwulan', 100); $labelTriwulan7 = $targetTriwulan->where('capaian_triwulan', '>', 100) @endphp @endforeach {{--Tahunan--}} @endforeach
No ORGANISASI PERANGKAT DAERAH
CAPAIAN KINERJA
ADA TARGET PERSENTASE CAPAIAN KINERJA TARGET TERCAPAI (100%) MELEBIHI TARGET (>100%) JUMLAH INDIKATOR
00.00
s.d 49.99
50.00
s.d 64.99
65.00
s.d 74.99
75.00
s.d 89.99
90.00
s.d 99.99
1 Pemerintah Kabupaten Tanah Laut
Tahun {!! $tahun !!} @if ($targetKab->count() > 0) {!! $targetKab->count() !!} @endif @if ($labelKab1?->count() > 0) {!! $labelKab1?->count() !!} @endif @if ($labelKab2?->count() > 0) {!! $labelKab2?->count() !!} @endif @if ($labelKab3?->count() > 0) {!! $labelKab3?->count() !!} @endif @if ($labelKab4?->count() > 0) {!! $labelKab4?->count() !!} @endif @if ($labelKab5?->count() > 0) {!! $labelKab5?->count() !!} @endif @if ($labelKab6?->count() > 0) {!! $labelKab6?->count() !!} @endif @if ($labelKab7?->count() > 0) {!! $labelKab7?->count() !!} @endif @if ($sasaranIndikatorKab->count() > 0) {!! $sasaranIndikatorKab->count() !!} @endif
{!! $idxOpd + 2 !!} {!! $opd->nama !!}
Triwulan {!! $triwulan !!} @if ($targetTriwulan?->count() > 0) {!! $targetTriwulan?->count() !!} @endif @if ($labelTriwulan1?->count() > 0) {!! $labelTriwulan1?->count() !!} @endif @if ($labelTriwulan2?->count() > 0) {!! $labelTriwulan2?->count() !!} @endif @if ($labelTriwulan3?->count() > 0) {!! $labelTriwulan3?->count() !!} @endif @if ($labelTriwulan4?->count() > 0) {!! $labelTriwulan4?->count() !!} @endif @if ($labelTriwulan5?->count() > 0) {!! $labelTriwulan5?->count() !!} @endif @if ($labelTriwulan6?->count() > 0) {!! $labelTriwulan6?->count() !!} @endif @if ($labelTriwulan7?->count() > 0) {!! $labelTriwulan7?->count() !!} @endif @if ($target?->count() > 0) {!! $target?->count() !!} @endif
Tahun {!! $tahun !!} @if ($target->count() > 0) {!! $target->count() !!} @endif @if ($label1?->count() > 0) {!! $label1?->count() !!} @endif @if ($label2?->count() > 0) {!! $label2?->count() !!} @endif @if ($label3?->count() > 0) {!! $label3?->count() !!} @endif @if ($label4?->count() > 0) {!! $label4?->count() !!} @endif @if ($label5?->count() > 0) {!! $label5?->count() !!} @endif @if ($label6?->count() > 0) {!! $label6?->count() !!} @endif @if ($label7?->count() > 0) {!! $label7?->count() !!} @endif @if ($sasaranIndikator->count() > 0) {!! $sasaranIndikator->count() !!} @endif