@include('manager.detailed_report.styles') @php $section = collect($sections)->firstWhere('label','Quality SCORE'); $label = $section['label'] ?? 'QUALITY SCORE'; $score = optional($final)->quality_score ?? ''; $score_class = $section['score_class'] ?? 'score-na'; @endphp @component('manager.detailed_report.accordion_section', [ 'label' => $label, 'score' => $score."%", 'score_class' => $score_class ]) @slot('content') @if(empty($final))
No Result found or result not ready
@else @foreach($calls as $callId => $callLabel) @endforeach @foreach($section['rows'] as $row) @foreach($calls as $callId => $callLabel) @endforeach @endforeach @php // Decode the saved JSON $callTotals = json_decode(optional($final)->call_total ?? '{}', true); @endphp @foreach($callTotals as $callId => $value) @endforeach
Metric Overall ScoreCall {{ $loop->iteration }}
{{ $row['label'] }} {{ is_numeric($v = str_replace('%', '', data_get($final, $row['data_col']))) ? round((float)$v, 0) . '%' : '' }} @php $value = $row['formatted'][$callId] ?? null; $clean = is_string($value) ? str_replace('%', '', strip_tags($value)) : $value; @endphp {!! is_numeric($clean) ? '' . round((float)$clean, 0) . '%' : '' !!}
QUALITY SCORE {{ optional($final)->quality_score }}{{ $value }}
@endif @endslot @endcomponent