diff --git a/app/Controllers/DashboardController.php b/app/Controllers/DashboardController.php index f7801a6..79d9eca 100644 --- a/app/Controllers/DashboardController.php +++ b/app/Controllers/DashboardController.php @@ -208,7 +208,12 @@ class DashboardController extends ResourceController SUM(CASE WHEN pe.enquiry_status = 'Completed' THEN 1 ELSE 0 END) AS total_completed ") ->join('partner_staff ps', 'ps.id = pe.assigned_to', 'left') - ->where("JSON_CONTAINS(ps.handler_id, '\"$handler_id\"')") + + ->groupStart() + ->where("JSON_CONTAINS(ps.handler_id, '\"$handler_id\"')") + ->orWhere('ps.id', $handler_id) + ->groupEnd() + // ->where('ps.handler_id', $handler_id) ->where('pe.is_active', 1) ->where('pe.assigned_to IS NOT NULL')