Removed unwanted lines in final filter data in production dashboard

This commit is contained in:
dhanabalan
2025-07-12 11:36:24 +05:30
parent c8ea502833
commit ea5af41f7f

View File

@@ -474,7 +474,7 @@ class ModuleFilterDataController extends Controller
->toArray();
if ($chartName == 'Production Hourly Count') {
if ($filterName === 'this month') {
if ($filterName == 'this month') {
$weeksCount = ceil($endDate->day / 7);
$allWeeks = array_fill(1, $weeksCount, 0);
$data = array_replace($allWeeks, $query);
@@ -485,7 +485,7 @@ class ModuleFilterDataController extends Controller
$labels[] = "Week $i ($weekStart - $weekEnd)";
}
$orderedData = array_values($data);
} elseif ($filterName === 'this week') {
} elseif ($filterName == 'this week') {
$labels = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'];
$data = array_fill(0, 7, 0);
foreach ($query as $dow => $count) {