From 4ecfec49d63939aac6a903bb46559bcb5bb328e7 Mon Sep 17 00:00:00 2001 From: dhanabalan Date: Sat, 28 Nov 2026 11:09:58 +0530 Subject: [PATCH] changed logic in panel box validation --- app/Livewire/PanelCheckList.php | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) 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'); -- 2.49.1