dashboard api issue : GWM
This commit is contained in:
parent
3a28352d19
commit
76ef70093e
@ -1004,8 +1004,10 @@ class PlanController extends ResourceController
|
||||
$plans = $this->planModel->where('org_id', $org_id)->where('is_active', 1)->findAll();
|
||||
|
||||
// Count occurrences of each status ID
|
||||
$statusCounts = array_count_values(array_column($plans, 'status'));
|
||||
// dd($statusCounts);
|
||||
// $statusCounts = array_count_values(array_column($plans, 'status'));
|
||||
$statusValues = array_map('intval', array_filter(array_column($plans, 'status')));
|
||||
$statusCounts = array_count_values($statusValues);
|
||||
|
||||
$statusResult = [];
|
||||
$statusLabels = [
|
||||
1 => 'Pending Approval',
|
||||
@ -1019,7 +1021,9 @@ class PlanController extends ResourceController
|
||||
|
||||
|
||||
// Count occurrences of each type ID
|
||||
$typeCounts = array_count_values(array_column($plans, 'trip_type'));
|
||||
// $typeCounts = array_count_values(array_column($plans, 'trip_type'));
|
||||
$typeValues = array_map('intval', array_filter(array_column($plans, 'trip_type')));
|
||||
$typeCounts = array_count_values($typeValues);
|
||||
$typeResult = [];
|
||||
$typeLabels = [
|
||||
1 => 'Domestic',
|
||||
|
||||
Loading…
Reference in New Issue
Block a user