diff --git a/app/Filament/Resources/PanelBoxValidationResource/Pages/CreatePanelBoxValidation.php b/app/Filament/Resources/PanelBoxValidationResource/Pages/CreatePanelBoxValidation.php index 38e5f69..2539463 100644 --- a/app/Filament/Resources/PanelBoxValidationResource/Pages/CreatePanelBoxValidation.php +++ b/app/Filament/Resources/PanelBoxValidationResource/Pages/CreatePanelBoxValidation.php @@ -74,14 +74,14 @@ class CreatePanelBoxValidation extends CreateRecord { // return $data; // } + if(($data['serial_exists']) == true){ + $this->halt(); + } if ($this->checkIfHasCharacteristics($data) && ($data['serial_exists']) == false) { $this->showChecklist = true; $this->halt(); } - if(($data['serial_exists']) == true){ - $this->halt(); - } - else{ + if(!$this->checkIfHasCharacteristics($data) && ($data['serial_exists']) == false){ \Filament\Notifications\Notification::make() ->title('Characteristics not found for the scanned item.') ->danger()