@php
$actualVal1 = $record['Sequence_1'] ?? 'X';
$minVal1 = $startSeqCheckPoint1->min_cushioning;
$maxVal1 = $startSeqCheckPoint1->max_cushioning;// . "\n"
$seqTitTime1 = $seqTitle1 . "\n". $record['Sequence_Time_1'] ?? '';
if ($actualVal1 == 'X') {
$bgStyle1 = 'background-color: #f87171;';// 'bg-red-500'; // Tailwind red
} elseif (is_numeric($actualVal1) && is_numeric($minVal1) && is_numeric($maxVal1)) {
if ($actualVal1 < $minVal1) {
$bgStyle1 = 'background-color: #fde68a;';// 'bg-yellow-300'; // Tailwind yellow
} elseif ($actualVal1 > $maxVal1) {
$bgStyle1 = 'background-color: #f87171;';// 'bg-red-500'; // Tailwind red
} else {
$bgStyle1 = 'background-color: #4ade80;';// 'bg-green-400'; // Tailwind green
}
} else {
$bgStyle1 = '';
}
$actualVal2 = $record['Sequence_2'] ?? 'X';
$minVal2 = $startSeqCheckPoint2->min_cushioning;
$maxVal2 = $startSeqCheckPoint2->max_cushioning;
$seqTitTime2 = $seqTitle2 . "\n". $record['Sequence_Time_2'] ?? '';
if ($actualVal2 == 'X') {
$bgStyle2 = 'background-color: #f87171;';// 'bg-red-500'; // Tailwind red
} elseif (is_numeric($actualVal2) && is_numeric($minVal2) && is_numeric($maxVal2)) {
if ($actualVal2 < $minVal2) {
$bgStyle2 = 'background-color: #fde68a;';// 'bg-yellow-300'; // Tailwind yellow
} elseif ($actualVal2 > $maxVal2) {
$bgStyle2 = 'background-color: #f87171;';// 'bg-red-500'; // Tailwind red
} else {
$bgStyle2 = 'background-color: #4ade80;';// 'bg-green-400'; // Tailwind green
}
} else {
$bgStyle2 = '';
}
$actualVal3 = $record['Sequence_3'] ?? 'X';
$minVal3 = $startSeqCheckPoint3->min_cushioning;
$maxVal3 = $startSeqCheckPoint3->max_cushioning;
$seqTitTime3 = $seqTitle3 . "\n". $record['Sequence_Time_3'] ?? '';
if ($actualVal3 == 'X') {
$bgStyle3 = 'background-color: #f87171;';// 'bg-red-500'; // Tailwind red
} elseif (is_numeric($actualVal3) && is_numeric($minVal3) && is_numeric($maxVal3)) {
if ($actualVal3 < $minVal3) {
$bgStyle3 = 'background-color: #fde68a;';// 'bg-yellow-300'; // Tailwind yellow
} elseif ($actualVal3 > $maxVal3) {
$bgStyle3 = 'background-color: #f87171;';// 'bg-red-500'; // Tailwind red
} else {
$bgStyle3 = 'background-color: #4ade80;';// 'bg-green-400'; // Tailwind green
}
} else {
$bgStyle3 = '';
}
$actualVal4 = $record['Sequence_4'] ?? 'X';
$minVal4 = $startSeqCheckPoint4->min_cushioning;
$maxVal4 = $startSeqCheckPoint4->max_cushioning;
$seqTitTime4 = $seqTitle4 . "\n". $record['Sequence_Time_4'] ?? '';
if ($actualVal4 == 'X') {
$bgStyle4 = 'background-color: #f87171;';// 'bg-red-500'; // Tailwind red
} elseif (is_numeric($actualVal4) && is_numeric($minVal4) && is_numeric($maxVal4)) {
if ($actualVal4 < $minVal4) {
$bgStyle4 = 'background-color: #fde68a;';// 'bg-yellow-300'; // Tailwind yellow
} elseif ($actualVal4 > $maxVal4) {
$bgStyle4 = 'background-color: #f87171;';// 'bg-red-500'; // Tailwind red
} else {
$bgStyle4 = 'background-color: #4ade80;';// 'bg-green-400'; // Tailwind green
}
} else {
$bgStyle4 = '';
}
$actualVal5 = $record['Sequence_5'] ?? 'X';
$minVal5 = $startSeqCheckPoint5->min_cushioning;
$maxVal5 = $startSeqCheckPoint5->max_cushioning;
$seqTitTime5 = $seqTitle5 . "\n". $record['Sequence_Time_5'] ?? '';
if ($actualVal5 == 'X') {
$bgStyle5 = 'background-color: #f87171;';// 'bg-red-500'; // Tailwind red
} elseif (is_numeric($actualVal5) && is_numeric($minVal5) && is_numeric($maxVal5)) {
if ($actualVal5 < $minVal5) {
$bgStyle5 = 'background-color: #fde68a;';// 'bg-yellow-300'; // Tailwind yellow
} elseif ($actualVal5 > $maxVal5) {
$bgStyle5 = 'background-color: #f87171;';// 'bg-red-500'; // Tailwind red
} else {
$bgStyle5 = 'background-color: #4ade80;';// 'bg-green-400'; // Tailwind green
}
} else {
$bgStyle5 = '';
}
$actualVal6 = $record['Sequence_6'] ?? 'X';
$minVal6 = $startSeqCheckPoint6->min_cushioning;
$maxVal6 = $startSeqCheckPoint6->max_cushioning;
$seqTitTime6 = $seqTitle6 . "\n". $record['Sequence_Time_6'] ?? '';
if ($actualVal6 == 'X') {
$bgStyle6 = 'background-color: #f87171;';// 'bg-red-500'; // Tailwind red
} elseif (is_numeric($actualVal6) && is_numeric($minVal6) && is_numeric($maxVal6)) {
if ($actualVal6 < $minVal6) {
$bgStyle6 = 'background-color: #fde68a;';// 'bg-yellow-300'; // Tailwind yellow
} elseif ($actualVal6 > $maxVal6) {
$bgStyle6 = 'background-color: #f87171;';// 'bg-red-500'; // Tailwind red
} else {
$bgStyle6 = 'background-color: #4ade80;';// 'bg-green-400'; // Tailwind green
}
} else {
$bgStyle6 = '';
}
$actualVal7 = $record['Sequence_7'] ?? 'X';
$minVal7 = $startSeqCheckPoint7->min_cushioning;
$maxVal7 = $startSeqCheckPoint7->max_cushioning;
$seqTitTime7 = $seqTitle7 . "\n". $record['Sequence_Time_7'] ?? '';
if ($actualVal7 == 'X') {
$bgStyle7 = 'background-color: #f87171;';// 'bg-red-500'; // Tailwind red
} elseif (is_numeric($actualVal7) && is_numeric($minVal7) && is_numeric($maxVal7)) {
if ($actualVal7 < $minVal7) {
$bgStyle7 = 'background-color: #fde68a;';// 'bg-yellow-300'; // Tailwind yellow
} elseif ($actualVal7 > $maxVal7) {
$bgStyle7 = 'background-color: #f87171;';// 'bg-red-500'; // Tailwind red
} else {
$bgStyle7 = 'background-color: #4ade80;';// 'bg-green-400'; // Tailwind green
}
} else {
$bgStyle7 = '';
}
$actualVal8 = $record['Sequence_8'] ?? 'X';
$minVal8 = $startSeqCheckPoint8->min_cushioning;
$maxVal8 = $startSeqCheckPoint8->max_cushioning;
$seqTitTime8 = $seqTitle8 . "\n". $record['Sequence_Time_8'] ?? '';
if ($actualVal8 == 'X') {
$bgStyle8 = 'background-color: #f87171;';// 'bg-red-500'; // Tailwind red
} elseif (is_numeric($actualVal8) && is_numeric($minVal8) && is_numeric($maxVal8)) {
if ($actualVal8 < $minVal8) {
$bgStyle8 = 'background-color: #fde68a;';// 'bg-yellow-300'; // Tailwind yellow
} elseif ($actualVal8 > $maxVal8) {
$bgStyle8 = 'background-color: #f87171;';// 'bg-red-500'; // Tailwind red
} else {
$bgStyle8 = 'background-color: #4ade80;';// 'bg-green-400'; // Tailwind green
}
} else {
$bgStyle8 = '';
}
$actualVal9 = $record['Sequence_9'] ?? 'X';
$minVal9 = $startSeqCheckPoint9->min_cushioning;
$maxVal9 = $startSeqCheckPoint9->max_cushioning;
$seqTitTime9 = $seqTitle9 . "\n". $record['Sequence_Time_9'] ?? '';
if ($actualVal9 == 'X') {
$bgStyle9 = 'background-color: #f87171;';// 'bg-red-500'; // Tailwind red
} elseif (is_numeric($actualVal9) && is_numeric($minVal9) && is_numeric($maxVal9)) {
if ($actualVal9 < $minVal9) {
$bgStyle9 = 'background-color: #fde68a;';// 'bg-yellow-300'; // Tailwind yellow
} elseif ($actualVal9 > $maxVal9) {
$bgStyle9 = 'background-color: #f87171;';// 'bg-red-500'; // Tailwind red
} else {
$bgStyle9 = 'background-color: #4ade80;';// 'bg-green-400'; // Tailwind green
}
} else {
$bgStyle9 = '';
}
@endphp
| {{ $index + 1 }} |
{{-- {{ $record['created_at'] ?? '' }} | --}}
{{ $record['guard_name'] ?? '' }} |
{{ $record['start_time'] ?? '' }} |
{{ $record['end_time'] ?? '' }} |
{{ $record['lap_time'] ?? '' }} |
{{-- {{ $actualVal1 }} | --}}
{{ $actualVal1 }} |
{{ $actualVal2 }} |
{{ $actualVal3 }} |
{{ $actualVal4 }} |
{{ $actualVal5 }} |
{{ $actualVal6 }} |
{{ $actualVal7 }} |
{{ $actualVal8 }} |
{{ $actualVal9 }} |
{{--
@php
$status = $record['scanned_status'] ?? '';
@endphp
$status === 'Scanned',
'text-yellow-600 font-semibold' => $status === 'Incompleted',
'text-red-600 font-semibold' => $status === 'Not Exist',
])>
{{ $status }}
| --}}
@empty