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

This commit is contained in:
dhanabalan
2026-07-02 17:23:07 +05:30
parent c338751a48
commit 65b4ce50d3

View File

@@ -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';
}