@php $selectedRows = $get('selected_rows') ?? []; $table_rows = $get('table_rows') ?? []; // Get the configurable threshold $stdDevThreshold = config('dyena.stdDevThreshold', 0.08); // fallback to 0.08 if not set // Debug: log the threshold value \Log::info('StdDev Threshold from config: ' . $stdDevThreshold); // Manually construct the correct path to the 'selected_rows' CheckboxList $viewStatePath = $getStatePath(); $basePath = substr($viewStatePath, 0, strrpos($viewStatePath, '.')); $checkboxListPath = $basePath . '.selected_rows'; @endphp

{{ $get('pcrtest_name') ?? 'Testauswahl' }}

{{-- Checkbox --}} @php $currentGroup = null; @endphp @foreach ($table_rows as $row) @php $groupMarker = $row['group_marker'] ?? ''; $groupKey = strtolower($groupMarker); $stdDev = (float) ($get('display_std_dev_' . $groupKey) ?? 0); $isHighStdDev = $stdDev > $stdDevThreshold; // Debug logging \Log::info('Row comparison', [ 'group' => $groupMarker, 'stdDev' => $stdDev, 'threshold' => $stdDevThreshold, 'isHighStdDev' => $isHighStdDev ]); // Determine base color based on group marker $baseColor = ($groupMarker === 'G') ? '#169e16' : '#4571f5'; // If high stdDev, use red; otherwise use base color $cellBgColor = $isHighStdDev ? 'rgba(239, 68, 68, 0.2)' : $baseColor; @endphp {{-- Checkbox --}} {{-- Well, Group, Samplename, CT --}} {{-- Logic to display stats ONLY on the first row of a new group --}} @if ($row['group_marker'] !== $currentGroup) @php $currentGroup = $row['group_marker']; @endphp @else {{-- For subsequent rows, display empty cells --}} @endif @endforeach
Well Zellzahl Sample Name Cт Mean Cт SD
{{ $row['well'] }} {{ $row['group_marker'] }} {{ $row['samplename'] }} {{ is_numeric($row['ct']) ? number_format($row['ct'], 3, ',', '') : $row['ct'] }} {{ number_format($get('display_mean_' . $groupKey), 3, ',', '.') }} @if($isHighStdDev) 🚩 {{ number_format($stdDev, 3, ',', '.') }} @else {{ number_format($stdDev, 3, ',', '.') }} @endif