Merge pull request 'Solved issue in panel box validation' (#770) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 28s
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 28s
Reviewed-on: #770
This commit was merged in pull request #770.
This commit is contained in:
@@ -147,19 +147,24 @@ public $records = [];
|
|||||||
|
|
||||||
foreach ($this->checklist as $characteristicId => $value) {
|
foreach ($this->checklist as $characteristicId => $value) {
|
||||||
|
|
||||||
$status = 'Ok';
|
// $status = 'Ok';
|
||||||
|
|
||||||
$characteristic = ProductCharacteristicsMaster::find($characteristicId);
|
$characteristic = ProductCharacteristicsMaster::find($characteristicId);
|
||||||
|
|
||||||
if (
|
if (($characteristic?->inspection_type ?? null) === 'Value') {
|
||||||
$characteristic &&
|
if (
|
||||||
is_numeric($value) &&
|
$characteristic &&
|
||||||
$value >= $characteristic->lower &&
|
is_numeric($value) &&
|
||||||
$value <= $characteristic->upper
|
$value >= $characteristic->lower &&
|
||||||
) {
|
$value <= $characteristic->upper
|
||||||
$status = 'Ok';
|
) {
|
||||||
} else {
|
$status = 'Ok';
|
||||||
$status = 'NotOk';
|
} else {
|
||||||
|
$status = 'NotOk';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$status = $value;
|
||||||
}
|
}
|
||||||
|
|
||||||
ProductionCharacteristic::create([
|
ProductionCharacteristic::create([
|
||||||
|
|||||||
Reference in New Issue
Block a user