From 215eca565c7d2689f02df55b87741b093892b40f Mon Sep 17 00:00:00 2001 From: dhanabalan Date: Wed, 30 Sep 2026 14:45:13 +0530 Subject: [PATCH] solved bug for page hang in production target plan --- app/Livewire/ProductionTargetPlan.php | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/app/Livewire/ProductionTargetPlan.php b/app/Livewire/ProductionTargetPlan.php index 56c62746..8f4f376c 100644 --- a/app/Livewire/ProductionTargetPlan.php +++ b/app/Livewire/ProductionTargetPlan.php @@ -452,10 +452,16 @@ class ProductionTargetPlan extends Component public function loadProductionData($year, $month, $plantId, $lineId) { + + $this->records = []; + $this->monthlyRecords = 0; + $this->dates = []; + $this->leaveDates = []; + if (!$plantId || !$lineId || !$month || !$year) { - $this->records = []; - $this->dates = []; - $this->leaveDates = []; + // $this->records = []; + // $this->dates = []; + // $this->leaveDates = []; return; } @@ -641,8 +647,6 @@ class ProductionTargetPlan extends Component // ->whereMonth('created_at', $month) // ->sum('plan_quantity'); // } - - public function exportProductionData() { return Excel::download( -- 2.49.1