solved issue in lower value in panel box
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 19s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 21s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 15s
Laravel Pint / pint (pull_request) Successful in 2m1s
Laravel Larastan / larastan (pull_request) Failing after 4m19s
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 19s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 21s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 15s
Laravel Pint / pint (pull_request) Successful in 2m1s
Laravel Larastan / larastan (pull_request) Failing after 4m19s
This commit is contained in:
@@ -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';
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user