{{-- @foreach ($kpiNormal as $kpi)
@php
$kpi_name = App\Models\Kpi::where('id', $kpi->kpi_id)->first()->name;
$kra_name = App\Models\Kra::where('id', $kpi->kra_id)->first()->name;
@endphp
{{ $kra_name }} |
{{ $kpi_name }} |
{{ $kpi->weight_of_kpis }} |
{{ $kpi->bench_mark_target }} |
% |
{{ $kpi->achivement }} |
{{ $kpi->sources_of_informations }} |
{{ $kpi->score }} |
{{ $kpi->weight_value }} |
{{ $kpi->justification }} |
@php
$totalWeight1 += $kpi->weight_of_kpis;
$totalWeightValue1 += $kpi->weight_value;
@endphp
@endforeach --}}
@php
$previous_kra_name = '';
$kpiNormal = collect($kpiNormal);
@endphp
@foreach ($kpiNormal->groupBy('kra_id') as $kra_id => $kpis)
@php
$kraObj = App\Models\Kra::find($kra_id);
if (!$kraObj) {
continue;
}
$kra_name = $kraObj->name;
@endphp
@foreach ($kpis as $kpi)
@php
$kpiObj = App\Models\Kpi::find($kpi->kpi_id);
if (!$kpiObj) {
continue;
}
$kpi_name = $kpiObj->name;
@endphp
@if ($loop->first)
{{ $kra_name }} |
@endif
{{ $kpi_name }} |
{{ $kpi->weight_of_kpis }} |
{{ $kpi->bench_mark_target }} |
{{ $kpi->units }} |
{{ $kpi->achivement }} |
{{ $kpi->sources_of_informations }} |
{{ $kpi->score }} |
{{ $kpi->weight_value }} |
{{ $kpi->justification }} |
@php
$totalWeight1 += $kpi->weight_of_kpis;
$totalWeightValue1 += $kpi->weight_value;
@endphp
@endforeach
@endforeach
|
{{ $totalWeight1 }} |
|
{{ $totalWeightValue1 }} |
|
{{-- @foreach ($kpiLate as $kpi)
@php
$kpi_name = App\Models\Kpi::where('id', $kpi->kpi_id)->first()->name;
$kra_name = App\Models\Kra::where('id', $kpi->kra_id)->first()->name;
@endphp
{{ $kra_name }} |
{{ $kpi_name }} |
{{ $kpi->weight_of_kpis }} |
{{ $kpi->bench_mark_target }} |
% |
{{ $kpi->achivement }} |
{{ $kpi->sources_of_informations }} |
{{ $kpi->score }} |
{{ $kpi->weight_value }} |
{{ $kpi->justification }} |
@php
$totalWeight2 += $kpi->weight_of_kpis;
$totalWeightValue2 += $kpi->weight_value;
@endphp
@endforeach --}}
@php
$previous_kra_name = '';
$kpiLate = collect($kpiLate);
@endphp
@foreach ($kpiLate->groupBy('kra_id') as $kra_id => $kpis)
@php
$kraObj = App\Models\Kra::find($kra_id);
if (!$kraObj) {
continue;
}
$kra_name = $kraObj->name;
@endphp
@foreach ($kpis as $kpi)
@php
$kpiObj = App\Models\Kpi::find($kpi->kpi_id);
if (!$kpiObj) {
continue;
}
$kpi_name = $kpiObj->name;
@endphp
@if ($loop->first)
{{ $kra_name }} |
@endif
{{ $kpi_name }} |
{{ $kpi->weight_of_kpis }} |
{{ $kpi->bench_mark_target }} |
{{ $kpi->units }} |
{{ $kpi->achivement }} |
{{ $kpi->sources_of_informations }} |
{{ $kpi->score }} |
{{ $kpi->weight_value }} |
{{ $kpi->justification }} |
@php
$totalWeight2 += $kpi->weight_of_kpis;
$totalWeightValue2 += $kpi->weight_value;
@endphp
@endforeach
@endforeach
|
{{ $totalWeight2 }} |
|
{{ $totalWeightValue2 }} |
|
Total Score |
{{ $totalWeight = $totalWeight1 + $totalWeight2 }} |
|
{{ $totalWeightValue = $totalWeightValue1 + $totalWeightValue2 }} |
|