GWM
This commit is contained in:
parent
76ef70093e
commit
d863f8ca7b
@ -1045,13 +1045,17 @@ class PlanController extends ResourceController
|
||||
return $plan['created_on'] >= $todayStart && $plan['created_on'] <= $todayEnd;
|
||||
});
|
||||
|
||||
$todayTypeCounts = array_count_values(array_column($todayType, 'trip_type'));
|
||||
// $todayTypeCounts = array_count_values(array_column($todayType, 'trip_type'));
|
||||
$todayType = array_map('intval', array_filter(array_column($todayType, 'trip_type')));
|
||||
$todayTypeCounts = array_count_values($todayType);
|
||||
|
||||
$weeklyType = array_filter($plans, function ($plan) use ($startOfWeek, $endOfWeek) {
|
||||
return $plan['created_on'] >= $startOfWeek && $plan['created_on'] <= $endOfWeek;
|
||||
});
|
||||
|
||||
$weeklyTypeCounts = array_count_values(array_column($weeklyType, 'trip_type'));
|
||||
// $weeklyTypeCounts = array_count_values(array_column($weeklyType, 'trip_type'));
|
||||
$weeklyType = array_map('intval', array_filter(array_column($weeklyType, 'trip_type')));
|
||||
$weeklyTypeCounts = array_count_values($weeklyType);
|
||||
|
||||
for ($i = 1; $i <= 2; $i++) { // Fixed loop condition
|
||||
$typeResult[] = [
|
||||
|
||||
Loading…
Reference in New Issue
Block a user