@php $serverOrigin = $_SERVER['HTTP_ORIGIN']; $id = $cand->id; $awarenessFirst = ''; $awarenessSecond = ''; $awarenessThird = ''; if ($cand->selfAwareness != '') { $rsD = json_decode($cand->selfAwareness, true); $awarenessFirst = $rsD[0]; $awarenessSecond = $rsD[1]; $awarenessThird = $rsD[2]; } @endphp
{{$cand->candidate_name}}
{{$cand->role}} @if ($cand->role_assessed != '') {{$cand->role_assessed}} @endif
@if($build->assestmentBody == 1) @endif    

Competencies

Target Score

Overall Score

@if (empty($resEvalComps))

No Data To Show

@else @foreach($comps as $compData) @if(in_array($compData->type, $resEvalComps))
{{$compData->title}}
{{$compData->target_score}}/{{$compData->totalStars}}

@for($iCountStar = 1; $iCountStar <= $compData->totalStars; $iCountStar++) @endfor
@php $targetScore = $compData->target_score @endphp @while($targetScore>0) @php $targetScore--; @endphp @endwhile

@php // if (empty($getEvaluator)) { // $average = 0; // } // else { // if (isset($getEvaluator[$compData->type])) { // foreach ($getEvaluator[$compData->type] as $key => $value) { // $getEvaluator[$compData->type][$key] = (($value == 0)?$value:$compData->totalStars); // } // $average = array_sum($getEvaluator[$compData->type])/count($getEvaluator[$compData->type]); // } // else { // $average = 0; // } // } if (empty($getEvaluator)) { $average = 0; $newAve = 0; } else { if (isset($getEvaluator[$compData->type])) { foreach ($getEvaluator[$compData->type] as $key => $value) { $getEvaluator[$compData->type][$key] = (($value == 0)?$value:$compData->totalStars); } // $average = array_sum($getEvaluator[$compData->type])/count($getEvaluator[$compData->type]); $newAverageFIlter = array_filter($evalutarHeadRaw[$compData->type]); $average = count($newAverageFIlter); $percentInDecimal = $cand->talegentWeigh / 100; $newTgscore = $percentInDecimal * $compData->tgScore; $newTgWeigh = 100 - $cand->talegentWeigh; $percentInDecimal2 = $newTgWeigh / 100; $newAverage = $percentInDecimal2 * $average; $newAve = $newTgscore+$newAverage; } else { $newAve = 0; } } $numFormAve = number_format($newAve, 2); $totalAve = str_replace('.00', '', $numFormAve); @endphp
{{$totalAve}}/{{$compData->totalStars}}

@for($iCountStar = 1; $iCountStar <= $compData->totalStars; $iCountStar++) @endfor
@while($totalAve>0) @if($totalAve >0.5) @else @endif @php $totalAve--; @endphp @endwhile

Evaluators: Note: To edit the evaluator, just click the name of the evaluator you want to edit.

@foreach($getEvaluators as $evalData)
@php if (empty($rsEvalArray)) { $ResAverage = 0; } else { $ResAverage = 0; if (isset($rsEvalArray[$evalData->id][$compData->type]['head'])) { $getEvalSubVal = $rsEvalArray[$evalData->id][$compData->type]['head']; if (isset($getEvalSubVal)) { foreach ($getEvalSubVal as $key => $value) { $getEvalSubVal[$key] = (($value == 0)?$value:$compData->totalStars); } $ResAverage = array_sum($getEvalSubVal)/count($getEvalSubVal); } else { $ResAverage = 0; } } } $numForm = number_format($ResAverage, 2); $totalRes = str_replace('.00', '', $numForm); @endphp
Evaluator Overall Score: {{$totalRes}}/{{$compData->totalStars}}

@for($iCountStar = 1; $iCountStar <= $compData->totalStars; $iCountStar++) @endfor
@while($ResAverage>0) @if($ResAverage >0.5) @else @endif @php $ResAverage--; @endphp @endwhile

Comments
@php $compDataValFooter = ((isset($compData->dataFooter))?$compData->dataFooter:''); $jsDecFoot = json_decode($compDataValFooter, true); if (isset($rsEvalArray[$evalData->id][$compData->type]['foot'])) { $rsEvalRaw = $rsEvalArray[$evalData->id][$compData->type]['foot']; $evalDataFooter = json_decode($rsEvalRaw, true); print ''; } @endphp
@endforeach
@endif @endforeach @endif