Removed unwanted lines in final filter data in production dashboard
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user