solved bug for page hang in production target plan #1137

Merged
jothi merged 1 commits from ranjith-dev into master 2026-09-30 09:15:29 +00:00

View File

@@ -452,10 +452,16 @@ class ProductionTargetPlan extends Component
public function loadProductionData($year, $month, $plantId, $lineId) public function loadProductionData($year, $month, $plantId, $lineId)
{ {
$this->records = [];
$this->monthlyRecords = 0;
$this->dates = [];
$this->leaveDates = [];
if (!$plantId || !$lineId || !$month || !$year) { if (!$plantId || !$lineId || !$month || !$year) {
$this->records = []; // $this->records = [];
$this->dates = []; // $this->dates = [];
$this->leaveDates = []; // $this->leaveDates = [];
return; return;
} }
@@ -641,8 +647,6 @@ class ProductionTargetPlan extends Component
// ->whereMonth('created_at', $month) // ->whereMonth('created_at', $month)
// ->sum('plan_quantity'); // ->sum('plan_quantity');
// } // }
public function exportProductionData() public function exportProductionData()
{ {
return Excel::download( return Excel::download(