From c1f5d232ac8ea3ea846a159c05206d61072398b8 Mon Sep 17 00:00:00 2001 From: dhanabalan Date: Thu, 18 Jun 2026 16:29:26 +0530 Subject: [PATCH] Solved issue in panel box validation --- app/Livewire/PanelCheckList.php | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/app/Livewire/PanelCheckList.php b/app/Livewire/PanelCheckList.php index 9ed9093..e4cc9b2 100644 --- a/app/Livewire/PanelCheckList.php +++ b/app/Livewire/PanelCheckList.php @@ -147,19 +147,24 @@ public $records = []; foreach ($this->checklist as $characteristicId => $value) { - $status = 'Ok'; + // $status = 'Ok'; $characteristic = ProductCharacteristicsMaster::find($characteristicId); - if ( - $characteristic && - is_numeric($value) && - $value >= $characteristic->lower && - $value <= $characteristic->upper - ) { - $status = 'Ok'; - } else { - $status = 'NotOk'; + if (($characteristic?->inspection_type ?? null) === 'Value') { + if ( + $characteristic && + is_numeric($value) && + $value >= $characteristic->lower && + $value <= $characteristic->upper + ) { + $status = 'Ok'; + } else { + $status = 'NotOk'; + } + } + else { + $status = $value; } ProductionCharacteristic::create([