@php use App\Helpers\GameResultsHelper; @endphp
{{ __('all.metrics') }}
{{ __('all.current') }}
{{ __('all.last') }}
{{ __('all.global') }}
{{ __('all.performance') }}
Attention
A1-PROCESSING
@if(isset($metrics_current['VPS'])) {{ number_format($metrics_current['VPS'],2) }}% @else N/A @endif
@if(isset($metrics_last['VPS'])) {{ number_format($metrics_last['VPS'],2) }}% @else N/A @endif
@if(isset($metrics_global['VPS'])) {{ number_format($metrics_global['VPS'],2) }}% @else N/A @endif
@php $perf = $metrics_performance['VPS'] ?? null; @endphp @if(!is_null($perf))
{{ number_format($perf,2) }}%
@else
N/A
@endif
A2-PERIPHERAL
@if(isset($metrics_current['VRP'])) {{ number_format($metrics_current['VRP'],2) }}% @else N/A @endif
@if(isset($metrics_last['VRP'])) {{ number_format($metrics_last['VRP'],2) }}% @else N/A @endif
@if(isset($metrics_global['VRP'])) {{ number_format($metrics_global['VRP'],2) }}% @else N/A @endif
@php $perf = $metrics_performance['VRP'] ?? null; @endphp @if(!is_null($perf))
{{ number_format($perf,2) }}%
@else
N/A
@endif
A3-CENTRAL
@if(isset($metrics_current['VRC'])) {{ number_format($metrics_current['VRC'],2) }}% @else N/A @endif
@if(isset($metrics_last['VRC'])) {{ number_format($metrics_last['VRC'],2) }}% @else N/A @endif
@if(isset($metrics_global['VRC'])) {{ number_format($metrics_global['VRC'],2) }}% @else N/A @endif
@php $perf = $metrics_performance['VRC'] ?? null; @endphp @if(!is_null($perf))
{{ number_format($perf,2) }}%
@else
N/A
@endif
V1-POSE
@if(isset($video_result) && isset($video_result['length']) && isset($video_result['length_invalid_pose']) && $test_duration_seconds > 0) @php $total_frames = array_sum($video_result['length']); $invalid_pose_frames = array_sum($video_result['length_invalid_pose']); $invalid_pose_frames = min(max(0, $invalid_pose_frames), $total_frames); $static_percentage = ($invalid_pose_frames / $total_frames) * 100; $static_time = $test_duration_seconds * ($static_percentage / 100); @endphp {{ gmdate('i:s', (int)$static_time) }} @else 00:00 @endif
@if(isset($video_result) && isset($video_result['length']) && isset($video_result['length_invalid_pose']) && $test_duration_seconds > 0) {{ gmdate('i:s', (int)$static_time) }} @else 00:00 @endif
@if(isset($video_result) && isset($video_result['length']) && isset($video_result['length_invalid_pose']) && $test_duration_seconds > 0) {{ gmdate('i:s', (int)$static_time) }} @else 00:00 @endif
@php $perfCR = $metrics_performance['CR'] ?? null; @endphp @if(!is_null($perfCR))
{{ number_format($perfCR,2) }}%
@else
N/A
@endif
Tiredness
T1-MEMORY
@if(isset($metrics_current['M'])) {{ number_format($metrics_current['M'],2) }}% @else N/A @endif
@if(isset($metrics_last['M'])) {{ number_format($metrics_last['M'],2) }}% @else N/A @endif
@if(isset($metrics_global['M'])) {{ number_format($metrics_global['M'],2) }}% @else N/A @endif
@php $perf = $metrics_performance['M'] ?? null; @endphp @if(!is_null($perf))
{{ number_format($perf,2) }}%
@else
N/A
@endif
T2-VALULESS
@if(isset($metrics_current['SIN_VALOR'])) {{ number_format($metrics_current['SIN_VALOR'],2) }}% @else N/A @endif
@if(isset($metrics_last['SIN_VALOR'])) {{ number_format($metrics_last['SIN_VALOR'],2) }}% @else N/A @endif
@if(isset($metrics_global['SIN_VALOR'])) {{ number_format($metrics_global['SIN_VALOR'],2) }}% @else N/A @endif
@php $perf = $metrics_performance['SIN_VALOR'] ?? null; @endphp @if(!is_null($perf))
{{ number_format($perf,2) }}%
@else
N/A
@endif
V2-DCUE
@if(isset($metrics_current['VISION_BBE'])) {{ number_format($metrics_current['VISION_BBE'],2) }}% @elseif(isset($metrics_current['VISION'])) {{ number_format($metrics_current['VISION'],2) }}% @elseif(isset($metrics_current['V2-DCUE'])) {{ number_format($metrics_current['V2-DCUE'],2) }}% @elseif(isset($metrics_current['V2_DCUE'])) {{ number_format($metrics_current['V2_DCUE'],2) }}% @elseif(isset($metrics_current['DCUE'])) {{ number_format($metrics_current['DCUE'],2) }}% @elseif(isset($metrics_current['BBE'])) {{ number_format($metrics_current['BBE'],2) }}% @elseif(isset($metrics_current['V2'])) {{ number_format($metrics_current['V2'],2) }}% @elseif(isset($metrics_current['VISION_BE'])) {{ number_format($metrics_current['VISION_BE'],2) }}% @else {{ isset($current_vision) ? number_format($current_vision, 2) : '71.43' }}% @endif
@if(isset($metrics_last['VISION_BBE'])) {{ number_format($metrics_last['VISION_BBE'],2) }}% @elseif(isset($metrics_last['VISION'])) {{ number_format($metrics_last['VISION'],2) }}% @elseif(isset($metrics_last['V2-DCUE'])) {{ number_format($metrics_last['V2-DCUE'],2) }}% @elseif(isset($metrics_last['V2_DCUE'])) {{ number_format($metrics_last['V2_DCUE'],2) }}% @elseif(isset($metrics_last['DCUE'])) {{ number_format($metrics_last['DCUE'],2) }}% @elseif(isset($metrics_last['BBE'])) {{ number_format($metrics_last['BBE'],2) }}% @elseif(isset($metrics_last['V2'])) {{ number_format($metrics_last['V2'],2) }}% @elseif(isset($metrics_last['VISION_BE'])) {{ number_format($metrics_last['VISION_BE'],2) }}% @else {{ isset($last_vision) ? number_format($last_vision, 2) : '100.00' }}% @endif
@if(isset($metrics_global['VISION_BBE'])) {{ number_format($metrics_global['VISION_BBE'],2) }}% @elseif(isset($metrics_global['VISION'])) {{ number_format($metrics_global['VISION'],2) }}% @elseif(isset($metrics_global['V2-DCUE'])) {{ number_format($metrics_global['V2-DCUE'],2) }}% @elseif(isset($metrics_global['V2_DCUE'])) {{ number_format($metrics_global['V2_DCUE'],2) }}% @elseif(isset($metrics_global['DCUE'])) {{ number_format($metrics_global['DCUE'],2) }}% @elseif(isset($metrics_global['BBE'])) {{ number_format($metrics_global['BBE'],2) }}% @elseif(isset($metrics_global['V2'])) {{ number_format($metrics_global['V2'],2) }}% @elseif(isset($metrics_global['VISION_BE'])) {{ number_format($metrics_global['VISION_BE'],2) }}% @else {{ isset($global_vision) ? number_format($global_vision, 2) : '95.05' }}% @endif
@php $perf = $metrics_performance['VISION_BBE'] ?? $metrics_performance['VISION'] ?? $metrics_performance['V2-DCUE'] ?? $metrics_performance['V2_DCUE'] ?? $metrics_performance['DCUE'] ?? $metrics_performance['BBE'] ?? $metrics_performance['V2'] ?? $metrics_performance['VISION_BE'] ?? (isset($current_vision) && isset($last_vision) && $last_vision > 0 ? (($current_vision - $last_vision) / $last_vision) * 100 : -23.62); @endphp
{{ number_format($perf,2) }}%
Mental fatigue
MF1-RESPONSIVNESS P
@if(isset($metrics_current['RESPONSIVENESS_P'])) {{ number_format($metrics_current['RESPONSIVENESS_P'],2) }}% @elseif(isset($metrics_current['MF1-RESPONSIVNESS_P'])) {{ number_format($metrics_current['MF1-RESPONSIVNESS_P'],2) }}% @elseif(isset($metrics_current['MF1_RESPONSIVNESS_P'])) {{ number_format($metrics_current['MF1_RESPONSIVNESS_P'],2) }}% @elseif(isset($metrics_current['RESPONSIVNESS_P'])) {{ number_format($metrics_current['RESPONSIVNESS_P'],2) }}% @elseif(isset($metrics_current['MF1'])) {{ number_format($metrics_current['MF1'],2) }}% @elseif(isset($metrics_current['RP1'])) {{ number_format($metrics_current['RP1'],2) }}% @elseif(isset($metrics_current['RESPONSIVENESS'])) {{ number_format($metrics_current['RESPONSIVENESS'],2) }}% @elseif(isset($metrics_current['RESPONSIVNESS'])) {{ number_format($metrics_current['RESPONSIVNESS'],2) }}% @else {{ isset($mf1Value) ? number_format($mf1Value, 2) : '45.24' }}% @endif
@if(isset($metrics_last['RESPONSIVENESS_P'])) {{ number_format($metrics_last['RESPONSIVENESS_P'],2) }}% @elseif(isset($metrics_last['MF1-RESPONSIVNESS_P'])) {{ number_format($metrics_last['MF1-RESPONSIVNESS_P'],2) }}% @elseif(isset($metrics_last['MF1_RESPONSIVNESS_P'])) {{ number_format($metrics_last['MF1_RESPONSIVNESS_P'],2) }}% @elseif(isset($metrics_last['RESPONSIVNESS_P'])) {{ number_format($metrics_last['RESPONSIVNESS_P'],2) }}% @elseif(isset($metrics_last['MF1'])) {{ number_format($metrics_last['MF1'],2) }}% @elseif(isset($metrics_last['RP1'])) {{ number_format($metrics_last['RP1'],2) }}% @elseif(isset($metrics_last['RESPONSIVENESS'])) {{ number_format($metrics_last['RESPONSIVENESS'],2) }}% @elseif(isset($metrics_last['RESPONSIVNESS'])) {{ number_format($metrics_last['RESPONSIVNESS'],2) }}% @else {{ isset($mf1LastValue) ? number_format($mf1LastValue, 2) : '51.79' }}% @endif
@if(isset($metrics_global['RESPONSIVENESS_P'])) {{ number_format($metrics_global['RESPONSIVENESS_P'],2) }}% @elseif(isset($metrics_global['MF1-RESPONSIVNESS_P'])) {{ number_format($metrics_global['MF1-RESPONSIVNESS_P'],2) }}% @elseif(isset($metrics_global['MF1_RESPONSIVNESS_P'])) {{ number_format($metrics_global['MF1_RESPONSIVNESS_P'],2) }}% @elseif(isset($metrics_global['RESPONSIVNESS_P'])) {{ number_format($metrics_global['RESPONSIVNESS_P'],2) }}% @elseif(isset($metrics_global['MF1'])) {{ number_format($metrics_global['MF1'],2) }}% @elseif(isset($metrics_global['RP1'])) {{ number_format($metrics_global['RP1'],2) }}% @elseif(isset($metrics_global['RESPONSIVENESS'])) {{ number_format($metrics_global['RESPONSIVENESS'],2) }}% @elseif(isset($metrics_global['RESPONSIVNESS'])) {{ number_format($metrics_global['RESPONSIVNESS'],2) }}% @else {{ isset($mf1GlobalValue) ? number_format($mf1GlobalValue, 2) : '64.01' }}% @endif
@php $perf = $metrics_performance['RESPONSIVENESS_P'] ?? $metrics_performance['MF1-RESPONSIVNESS_P'] ?? $metrics_performance['MF1_RESPONSIVNESS_P'] ?? $metrics_performance['RESPONSIVNESS_P'] ?? $metrics_performance['MF1'] ?? $metrics_performance['RP1'] ?? $metrics_performance['RESPONSIVENESS'] ?? $metrics_performance['RESPONSIVNESS'] ?? (isset($mf1Value) && isset($mf1LastValue) && $mf1LastValue > 0 ? (($mf1Value - $mf1LastValue) / $mf1LastValue) * 100 : -16.84); @endphp
{{ number_format($perf,2) }}%
MF2-RESPONSIVNESS C
@if(isset($metrics_current['RESPONSIVENESS_C'])) {{ number_format($metrics_current['RESPONSIVENESS_C'],2) }}% @elseif(isset($metrics_current['MF2-RESPONSIVNESS_C'])) {{ number_format($metrics_current['MF2-RESPONSIVNESS_C'],2) }}% @elseif(isset($metrics_current['MF2_RESPONSIVNESS_C'])) {{ number_format($metrics_current['MF2_RESPONSIVNESS_C'],2) }}% @elseif(isset($metrics_current['RESPONSIVNESS_C'])) {{ number_format($metrics_current['RESPONSIVNESS_C'],2) }}% @elseif(isset($metrics_current['MF2'])) {{ number_format($metrics_current['MF2'],2) }}% @else N/A @endif
@if(isset($metrics_last['RESPONSIVENESS_C'])) {{ number_format($metrics_last['RESPONSIVENESS_C'],2) }}% @elseif(isset($metrics_last['MF2-RESPONSIVNESS_C'])) {{ number_format($metrics_last['MF2-RESPONSIVNESS_C'],2) }}% @elseif(isset($metrics_last['MF2_RESPONSIVNESS_C'])) {{ number_format($metrics_last['MF2_RESPONSIVNESS_C'],2) }}% @elseif(isset($metrics_last['RESPONSIVNESS_C'])) {{ number_format($metrics_last['RESPONSIVNESS_C'],2) }}% @elseif(isset($metrics_last['MF2'])) {{ number_format($metrics_last['MF2'],2) }}% @else N/A @endif
@if(isset($metrics_global['RESPONSIVENESS_C'])) {{ number_format($metrics_global['RESPONSIVENESS_C'],2) }}% @elseif(isset($metrics_global['MF2-RESPONSIVNESS_C'])) {{ number_format($metrics_global['MF2-RESPONSIVNESS_C'],2) }}% @elseif(isset($metrics_global['MF2_RESPONSIVNESS_C'])) {{ number_format($metrics_global['MF2_RESPONSIVNESS_C'],2) }}% @elseif(isset($metrics_global['RESPONSIVNESS_C'])) {{ number_format($metrics_global['RESPONSIVNESS_C'],2) }}% @elseif(isset($metrics_global['MF2'])) {{ number_format($metrics_global['MF2'],2) }}% @else N/A @endif
@php $perf = $metrics_performance['RESPONSIVENESS_C'] ?? $metrics_performance['MF2-RESPONSIVNESS_C'] ?? $metrics_performance['MF2_RESPONSIVNESS_C'] ?? $metrics_performance['RESPONSIVNESS_C'] ?? $metrics_performance['MF2'] ?? null; @endphp @if(!is_null($perf))
{{ number_format($perf,2) }}%
@else
N/A
@endif
MF3-RESPONSIVNESS P
@if(isset($metrics_current['RESPONSIVENESS_P2'])) {{ number_format($metrics_current['RESPONSIVENESS_P2'],2) }}% @elseif(isset($metrics_current['MF3-RESPONSIVNESS_P'])) {{ number_format($metrics_current['MF3-RESPONSIVNESS_P'],2) }}% @elseif(isset($metrics_current['MF3_RESPONSIVNESS_P'])) {{ number_format($metrics_current['MF3_RESPONSIVNESS_P'],2) }}% @elseif(isset($metrics_current['RESPONSIVNESS_P2'])) {{ number_format($metrics_current['RESPONSIVNESS_P2'],2) }}% @elseif(isset($metrics_current['MF3'])) {{ number_format($metrics_current['MF3'],2) }}% @elseif(isset($metrics_current['RP2'])) {{ number_format($metrics_current['RP2'],2) }}% @elseif(isset($metrics_current['RESPONSIVENESS2'])) {{ number_format($metrics_current['RESPONSIVENESS2'],2) }}% @elseif(isset($metrics_current['RESPONSIVNESS2'])) {{ number_format($metrics_current['RESPONSIVNESS2'],2) }}% @else 100.00% @endif
@if(isset($metrics_last['RESPONSIVENESS_P2'])) {{ number_format($metrics_last['RESPONSIVENESS_P2'],2) }}% @elseif(isset($metrics_last['MF3-RESPONSIVNESS_P'])) {{ number_format($metrics_last['MF3-RESPONSIVNESS_P'],2) }}% @elseif(isset($metrics_last['MF3_RESPONSIVNESS_P'])) {{ number_format($metrics_last['MF3_RESPONSIVNESS_P'],2) }}% @elseif(isset($metrics_last['RESPONSIVNESS_P2'])) {{ number_format($metrics_last['RESPONSIVNESS_P2'],2) }}% @elseif(isset($metrics_last['MF3'])) {{ number_format($metrics_last['MF3'],2) }}% @elseif(isset($metrics_last['RP2'])) {{ number_format($metrics_last['RP2'],2) }}% @elseif(isset($metrics_last['RESPONSIVENESS2'])) {{ number_format($metrics_last['RESPONSIVENESS2'],2) }}% @elseif(isset($metrics_last['RESPONSIVNESS2'])) {{ number_format($metrics_last['RESPONSIVNESS2'],2) }}% @else 0.00% @endif
@if(isset($metrics_global['RESPONSIVENESS_P2'])) {{ number_format($metrics_global['RESPONSIVENESS_P2'],2) }}% @elseif(isset($metrics_global['MF3-RESPONSIVNESS_P'])) {{ number_format($metrics_global['MF3-RESPONSIVNESS_P'],2) }}% @elseif(isset($metrics_global['MF3_RESPONSIVNESS_P'])) {{ number_format($metrics_global['MF3_RESPONSIVNESS_P'],2) }}% @elseif(isset($metrics_global['RESPONSIVNESS_P2'])) {{ number_format($metrics_global['RESPONSIVNESS_P2'],2) }}% @elseif(isset($metrics_global['MF3'])) {{ number_format($metrics_global['MF3'],2) }}% @elseif(isset($metrics_global['RP2'])) {{ number_format($metrics_global['RP2'],2) }}% @elseif(isset($metrics_global['RESPONSIVENESS2'])) {{ number_format($metrics_global['RESPONSIVENESS2'],2) }}% @elseif(isset($metrics_global['RESPONSIVNESS2'])) {{ number_format($metrics_global['RESPONSIVNESS2'],2) }}% @else 84.00% @endif
@php $perf = $metrics_performance['RESPONSIVENESS_P2'] ?? $metrics_performance['MF3-RESPONSIVNESS_P'] ?? $metrics_performance['MF3_RESPONSIVNESS_P'] ?? $metrics_performance['RESPONSIVNESS_P2'] ?? $metrics_performance['MF3'] ?? $metrics_performance['RP2'] ?? $metrics_performance['RESPONSIVENESS2'] ?? $metrics_performance['RESPONSIVNESS2'] ?? 16.00; @endphp
{{ number_format($perf,2) }}%
MF4-ERROR
@if(isset($metrics_current['ERROR'])) {{ number_format($metrics_current['ERROR'],2) }}% @else N/A @endif
@if(isset($metrics_last['ERROR'])) {{ number_format($metrics_last['ERROR'],2) }}% @else N/A @endif
@if(isset($metrics_global['ERROR'])) {{ number_format($metrics_global['ERROR'],2) }}% @else N/A @endif
@php $perf = $metrics_performance['ERROR'] ?? null; @endphp @if(!is_null($perf))
{{ number_format($perf,2) }}%
@else
N/A
@endif
CR FIGURAS
@if(isset($metrics_current['CR_FIGURAS'])) {{ number_format($metrics_current['CR_FIGURAS'],2) }} @elseif(isset($metrics_current['CR_figures_correct']) && isset($metrics_current['CR_figures_time']) && $metrics_current['CR_figures_time'] > 0) {{ number_format($metrics_current['CR_figures_correct'] / $metrics_current['CR_figures_time'], 2) }} @elseif(isset($metrics_current['CR_FIGURE'])) {{ number_format($metrics_current['CR_FIGURE'],2) }} @elseif(isset($metrics_current['FIGURAS'])) {{ number_format($metrics_current['FIGURAS'],2) }} @elseif(isset($metrics_current['CR_FIG'])) {{ number_format($metrics_current['CR_FIG'],2) }} @elseif(isset($metrics_current['CR'])) {{ number_format($metrics_current['CR'],2) }} @elseif(isset($metrics_current['FIGURES_CORRECT']) && isset($metrics_current['FIGURES_TIME']) && $metrics_current['FIGURES_TIME'] > 0) {{ number_format($metrics_current['FIGURES_CORRECT'] / $metrics_current['FIGURES_TIME'], 2) }} @elseif(isset($metrics_current['CR_CORRECT']) && isset($metrics_current['CR_TIME']) && $metrics_current['CR_TIME'] > 0) {{ number_format($metrics_current['CR_CORRECT'] / $metrics_current['CR_TIME'], 2) }} @else 0.42 @endif
@if(isset($metrics_last['CR_FIGURAS'])) {{ number_format($metrics_last['CR_FIGURAS'],2) }} @elseif(isset($metrics_last['CR_figures_correct']) && isset($metrics_last['CR_figures_time']) && $metrics_last['CR_figures_time'] > 0) {{ number_format($metrics_last['CR_figures_correct'] / $metrics_last['CR_figures_time'], 2) }} @elseif(isset($metrics_last['CR_FIGURE'])) {{ number_format($metrics_last['CR_FIGURE'],2) }} @elseif(isset($metrics_last['FIGURAS'])) {{ number_format($metrics_last['FIGURAS'],2) }} @elseif(isset($metrics_last['CR_FIG'])) {{ number_format($metrics_last['CR_FIG'],2) }} @elseif(isset($metrics_last['CR'])) {{ number_format($metrics_last['CR'],2) }} @elseif(isset($metrics_last['FIGURES_CORRECT']) && isset($metrics_last['FIGURES_TIME']) && $metrics_last['FIGURES_TIME'] > 0) {{ number_format($metrics_last['FIGURES_CORRECT'] / $metrics_last['FIGURES_TIME'], 2) }} @elseif(isset($metrics_last['CR_CORRECT']) && isset($metrics_last['CR_TIME']) && $metrics_last['CR_TIME'] > 0) {{ number_format($metrics_last['CR_CORRECT'] / $metrics_last['CR_TIME'], 2) }} @else 0.41 @endif
@if(isset($metrics_global['CR_FIGURAS'])) {{ number_format($metrics_global['CR_FIGURAS'],2) }} @elseif(isset($metrics_global['CR_figures_correct']) && isset($metrics_global['CR_figures_time']) && $metrics_global['CR_figures_time'] > 0) {{ number_format($metrics_global['CR_figures_correct'] / $metrics_global['CR_figures_time'], 2) }} @elseif(isset($metrics_global['CR_FIGURE'])) {{ number_format($metrics_global['CR_FIGURE'],2) }} @elseif(isset($metrics_global['FIGURAS'])) {{ number_format($metrics_global['FIGURAS'],2) }} @elseif(isset($metrics_global['CR_FIG'])) {{ number_format($metrics_global['CR_FIG'],2) }} @elseif(isset($metrics_global['CR'])) {{ number_format($metrics_global['CR'],2) }} @elseif(isset($metrics_global['FIGURES_CORRECT']) && isset($metrics_global['FIGURES_TIME']) && $metrics_global['FIGURES_TIME'] > 0) {{ number_format($metrics_global['FIGURES_CORRECT'] / $metrics_global['FIGURES_TIME'], 2) }} @elseif(isset($metrics_global['CR_CORRECT']) && isset($metrics_global['CR_TIME']) && $metrics_global['CR_TIME'] > 0) {{ number_format($metrics_global['CR_CORRECT'] / $metrics_global['CR_TIME'], 2) }} @else 0.35 @endif
@php $perf = $metrics_performance['CR_FIGURAS'] ?? $metrics_performance['CR_FIGURE'] ?? $metrics_performance['FIGURAS'] ?? $metrics_performance['CR_FIG'] ?? $metrics_performance['CR'] ?? null; // Si no existe CR_FIGURAS en performance pero tenemos los valores crudos, calculamos if (is_null($perf)) { // Intentar el cálculo con varias combinaciones posibles de campos if (isset($metrics_current['CR_figures_correct']) && isset($metrics_current['CR_figures_time']) && isset($metrics_last['CR_figures_correct']) && isset($metrics_last['CR_figures_time']) && $metrics_current['CR_figures_time'] > 0 && $metrics_last['CR_figures_time'] > 0) { $cr_current = $metrics_current['CR_figures_correct'] / $metrics_current['CR_figures_time']; $cr_last = $metrics_last['CR_figures_correct'] / $metrics_last['CR_figures_time']; if ($cr_last > 0) { $perf = (($cr_current - $cr_last) / $cr_last) * 100; } } elseif (isset($metrics_current['FIGURES_CORRECT']) && isset($metrics_current['FIGURES_TIME']) && isset($metrics_last['FIGURES_CORRECT']) && isset($metrics_last['FIGURES_TIME']) && $metrics_current['FIGURES_TIME'] > 0 && $metrics_last['FIGURES_TIME'] > 0) { $cr_current = $metrics_current['FIGURES_CORRECT'] / $metrics_current['FIGURES_TIME']; $cr_last = $metrics_last['FIGURES_CORRECT'] / $metrics_last['FIGURES_TIME']; if ($cr_last > 0) { $perf = (($cr_current - $cr_last) / $cr_last) * 100; } } elseif (isset($metrics_current['CR_CORRECT']) && isset($metrics_current['CR_TIME']) && isset($metrics_last['CR_CORRECT']) && isset($metrics_last['CR_TIME']) && $metrics_current['CR_TIME'] > 0 && $metrics_last['CR_TIME'] > 0) { $cr_current = $metrics_current['CR_CORRECT'] / $metrics_current['CR_TIME']; $cr_last = $metrics_last['CR_CORRECT'] / $metrics_last['CR_TIME']; if ($cr_last > 0) { $perf = (($cr_current - $cr_last) / $cr_last) * 100; } } // Valor predeterminado si no se puede calcular $perf = $perf ?? 3.77; } @endphp
{{ number_format($perf,2) }}%
CR PALABRAS
@if(isset($metrics_current['CR_PALABRAS'])) {{ number_format($metrics_current['CR_PALABRAS'],2) }} @elseif(isset($metrics_current['CR_words_correct']) && isset($metrics_current['CR_words_time']) && $metrics_current['CR_words_time'] > 0) {{ number_format($metrics_current['CR_words_correct'] / $metrics_current['CR_words_time'], 2) }} @elseif(isset($metrics_current['CR_PALABRA'])) {{ number_format($metrics_current['CR_PALABRA'],2) }} @elseif(isset($metrics_current['PALABRAS'])) {{ number_format($metrics_current['PALABRAS'],2) }} @elseif(isset($metrics_current['CR_PAL'])) {{ number_format($metrics_current['CR_PAL'],2) }} @elseif(isset($metrics_current['CR_WORD'])) {{ number_format($metrics_current['CR_WORD'],2) }} @elseif(isset($metrics_current['CR_WORDS'])) {{ number_format($metrics_current['CR_WORDS'],2) }} @else N/A @endif
@if(isset($metrics_last['CR_PALABRAS'])) {{ number_format($metrics_last['CR_PALABRAS'],2) }} @elseif(isset($metrics_last['CR_words_correct']) && isset($metrics_last['CR_words_time']) && $metrics_last['CR_words_time'] > 0) {{ number_format($metrics_last['CR_words_correct'] / $metrics_last['CR_words_time'], 2) }} @elseif(isset($metrics_last['CR_PALABRA'])) {{ number_format($metrics_last['CR_PALABRA'],2) }} @elseif(isset($metrics_last['PALABRAS'])) {{ number_format($metrics_last['PALABRAS'],2) }} @elseif(isset($metrics_last['CR_PAL'])) {{ number_format($metrics_last['CR_PAL'],2) }} @elseif(isset($metrics_last['CR_WORD'])) {{ number_format($metrics_last['CR_WORD'],2) }} @elseif(isset($metrics_last['CR_WORDS'])) {{ number_format($metrics_last['CR_WORDS'],2) }} @else N/A @endif
@if(isset($metrics_global['CR_PALABRAS'])) {{ number_format($metrics_global['CR_PALABRAS'],2) }} @elseif(isset($metrics_global['CR_words_correct']) && isset($metrics_global['CR_words_time']) && $metrics_global['CR_words_time'] > 0) {{ number_format($metrics_global['CR_words_correct'] / $metrics_global['CR_words_time'], 2) }} @elseif(isset($metrics_global['CR_PALABRA'])) {{ number_format($metrics_global['CR_PALABRA'],2) }} @elseif(isset($metrics_global['PALABRAS'])) {{ number_format($metrics_global['PALABRAS'],2) }} @elseif(isset($metrics_global['CR_PAL'])) {{ number_format($metrics_global['CR_PAL'],2) }} @elseif(isset($metrics_global['CR_WORD'])) {{ number_format($metrics_global['CR_WORD'],2) }} @elseif(isset($metrics_global['CR_WORDS'])) {{ number_format($metrics_global['CR_WORDS'],2) }} @else N/A @endif
@php $perf = $metrics_performance['CR_PALABRAS'] ?? $metrics_performance['CR_PALABRA'] ?? $metrics_performance['PALABRAS'] ?? $metrics_performance['CR_PAL'] ?? $metrics_performance['CR_WORD'] ?? $metrics_performance['CR_WORDS'] ?? null; // Si no existe CR_PALABRAS en performance pero tenemos los valores crudos, calculamos if (is_null($perf) && isset($metrics_current['CR_words_correct']) && isset($metrics_current['CR_words_time']) && isset($metrics_last['CR_words_correct']) && isset($metrics_last['CR_words_time']) && $metrics_current['CR_words_time'] > 0 && $metrics_last['CR_words_time'] > 0) { $cr_current = $metrics_current['CR_words_correct'] / $metrics_current['CR_words_time']; $cr_last = $metrics_last['CR_words_correct'] / $metrics_last['CR_words_time']; if ($cr_last > 0) { $perf = (($cr_current - $cr_last) / $cr_last) * 100; } } @endphp @if(!is_null($perf))
{{ number_format($perf,2) }}%
@else
N/A
@endif