Changed logic in production target page
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 13s

This commit is contained in:
dhanabalan
2026-10-12 14:34:41 +05:30
parent 93d5fe6c0c
commit f94040e996

View File

@@ -159,7 +159,7 @@ class ProductionTarget extends Page
$month = (int) $get('month'); $month = (int) $get('month');
$category = $get('category'); $category = $get('category');
$this->dispatch('loadData',$year, $month, $plantId, $lineId, $category);
}), }),
]) ])
@@ -217,7 +217,21 @@ class ProductionTarget extends Page
$lineId = $this->filters['line_id'] ?? null; $lineId = $this->filters['line_id'] ?? null;
$year = $this->filters['year'] ?? null; $year = $this->filters['year'] ?? null;
$month = (int) $this->filters['month'] ?? null; $month = (int) $this->filters['month'] ?? null;
$this->dispatch('loadData',$year, $month, $plantId, $lineId, ''); $category = $this->filters['category'] ?? null;
if($category == '' || $category == null){
// $this->dispatch('loadData',$year, $month, $plantId, $lineId, '');
$this->dispatch(
'loadData',
(int) $year,
(int) $month,
(int) $plantId,
(int) $lineId
);
}
else{
$this->dispatch('loadDataCategory',$year, $month, $plantId, $lineId, $category);
}
} }
public static function canAccess(): bool public static function canAccess(): bool