diff --git a/app/Livewire/PanelCheckList.php b/app/Livewire/PanelCheckList.php index 361b1f8a..a1fb020d 100644 --- a/app/Livewire/PanelCheckList.php +++ b/app/Livewire/PanelCheckList.php @@ -450,17 +450,7 @@ public $records = []; } } - if (! $prod) { - Notification::make() - ->title('Failed to Save Production Characteristics') - ->body('One or more characteristic records were not inserted.') - ->danger() - ->send(); - - return; - } - - // if ($insertedCount != count($this->records)) { + // if (! $prod) { // Notification::make() // ->title('Failed to Save Production Characteristics') // ->body('One or more characteristic records were not inserted.') @@ -470,6 +460,16 @@ public $records = []; // return; // } + if ($insertedCount != count($this->records)) { + Notification::make() + ->title('Failed to Save Production Characteristics') + ->body('One or more characteristic records were not inserted.') + ->danger() + ->send(); + + return; + } + $this->showChecklist = false; $this->dispatch('checklist-saved');