diff --git a/app/Livewire/PanelCheckList.php b/app/Livewire/PanelCheckList.php index e4cc9b2..c8be0d1 100644 --- a/app/Livewire/PanelCheckList.php +++ b/app/Livewire/PanelCheckList.php @@ -152,20 +152,16 @@ public $records = []; $characteristic = ProductCharacteristicsMaster::find($characteristicId); if (($characteristic?->inspection_type ?? null) === 'Value') { - if ( - $characteristic && - is_numeric($value) && - $value >= $characteristic->lower && - $value <= $characteristic->upper + if ($characteristic && is_numeric($value) && (($value >= $characteristic->lower && $value <= $characteristic->upper) || $value == $characteristic->lower || $value == $characteristic->upper) ) { $status = 'Ok'; } else { $status = 'NotOk'; } } - else { - $status = $value; - } + // else { + // $status = $value; + // } ProductionCharacteristic::create([ 'plant_id' => $this->data['plant_id'] ?? null, @@ -201,7 +197,7 @@ public $records = []; $characteristic = ProductCharacteristicsMaster::find($characteristicId); - if (! $characteristic || ! is_numeric($value) || $value <= $characteristic->lower || $value >= $characteristic->upper){ + if (! $characteristic || ! is_numeric($value)){ return false; } } @@ -222,7 +218,7 @@ public $records = []; return 'Not Ok'; } - return ($value > $characteristic->lower && $value < $characteristic->upper) ? 'Ok' : 'Not Ok'; + return ($value >= $characteristic->lower && $value <= $characteristic->upper) ? 'Ok' : 'Not Ok'; }