diff --git a/Apollo/api/application/controllers/Call_Tracking_Controller.php b/Apollo/api/application/controllers/Call_Tracking_Controller.php index 6837b348..0b595a1b 100644 --- a/Apollo/api/application/controllers/Call_Tracking_Controller.php +++ b/Apollo/api/application/controllers/Call_Tracking_Controller.php @@ -38,7 +38,7 @@ class Call_Tracking_Controller extends REST_Controller { $this->methods['getTrackingDetails_post']['limit'] = 1000; // 50 requests per hour per user/key $this->methods['updateFollowupDetails_post']['limit'] = 1000; // 50 requests per hour per user/key $this->methods['loadFollowupDetails_post']['limit'] = 1000; // 50 requests per hour per user/key - + $this->methods['getDashboardCallTrack_post']['limit'] = 1000; // 50 requests per hour per user/key // load the model $this->load->model('Calltracking_model', 'Calltracking_model'); @@ -225,7 +225,32 @@ class Call_Tracking_Controller extends REST_Controller { } + /* + * get dash board call track details + * created by kms + * */ + public function getDashboardCallTrack_post() + { + $search['requestedBy'] = $this->post('requestedBy'); + $getdashBoardCallDetails = $this->Calltracking_model->getDashboardTrackingDetails($search); + if ($getdashBoardCallDetails) + { + $getdashBoardCallDetails['status'] = REST_Controller::HTTP_OK; + // Set the response and exit + $this->response($getdashBoardCallDetails, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code + } + else + { + // Set the response and exit + $this->response([ + 'message' => 'No records found!', + 'status' => REST_Controller::HTTP_NOT_FOUND + ], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code + } + + + } } \ No newline at end of file