diff --git a/Apollo/api/application/controllers/Call_Tracking_Controller.php b/Apollo/api/application/controllers/Call_Tracking_Controller.php index 0453e702..d2297e0b 100755 --- a/Apollo/api/application/controllers/Call_Tracking_Controller.php +++ b/Apollo/api/application/controllers/Call_Tracking_Controller.php @@ -39,6 +39,9 @@ class Call_Tracking_Controller extends REST_Controller { $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 + $this->methods['getRecentLeadDetails_post']['limit'] = 1000; // 50 requests per hour per user/key + $this->methods['getRecentCloseDetails_post']['limit'] = 1000; // 50 requests per hour per user/key + $this->methods['getRecentPendingDetails_post']['limit'] = 1000; // 50 requests per hour per user/key // load the model $this->load->model('Calltracking_model', 'Calltracking_model'); @@ -88,6 +91,7 @@ class Call_Tracking_Controller extends REST_Controller { $lead_details['IsNewEnquiry'] = $this->post('enquiryStatus'); $lead_details['CreatedBy'] = $this->post('createdBy'); $lead_details['CreatedOn'] = $now->format('Y-m-d H:i:s'); + //store tracking details $tracking_details['University'] = $this->post('universityID'); $tracking_details['Course'] = $this->post('courseName'); @@ -99,6 +103,7 @@ class Call_Tracking_Controller extends REST_Controller { $tracking_details['Address'] = $this->post('address'); $tracking_details['CreatedBy'] = $this->post('createdBy'); $tracking_details['CreatedOn'] = $now->format('Y-m-d H:i:s'); + $tracking_details['UpdatedOn'] = $now->format('Y-m-d H:i:s'); //store tracking followup details $tracking_followup_details['FollowupOn'] = $this->post('date'); $tracking_followup_details['FollowupComments'] = $this->post('comments'); @@ -253,6 +258,103 @@ class Call_Tracking_Controller extends REST_Controller { } + /* + * get recent call lead details + * created by kms + * */ + + public function getRecentLeadDetails_post() + { + $search['requestedBy'] = $this->post('requestedBy'); + $search['requestedDept'] = $this->post('requestedDept'); + $search['loadDate'] = $this->post('loadDate'); + // $search['searchDate'] = $this->post('searchDate'); + // $search['searchMobileNumber'] = $this->post('searchMobileNumber'); + // $search['searchName']= $this->post('searchName'); + $getRecentLeadDetails = $this->Calltracking_model->getRecentleadDetails($search); + + if ($getRecentLeadDetails) + { + $getRecentLeadDetails['status'] = REST_Controller::HTTP_OK; + // Set the response and exit + $this->response($getRecentLeadDetails, 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 + } + + + } + /* + * get recent close details + * created by kms + * */ + public function getRecentCloseDetails_post() + { + $search['requestedBy'] = $this->post('requestedBy'); + $search['requestedDept'] = $this->post('requestedDept'); + $search['loadDate'] = $this->post('loadDate'); + // $search['searchDate'] = $this->post('searchDate'); + // $search['searchMobileNumber'] = $this->post('searchMobileNumber'); + // $search['searchName']= $this->post('searchName'); + $getRecentCloseDetails = $this->Calltracking_model->getRecentCloseDetails($search); + + if ($getRecentCloseDetails) + { + $getRecentCloseDetails['status'] = REST_Controller::HTTP_OK; + // Set the response and exit + $this->response($getRecentCloseDetails, 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 + } + + + } + + /* + * get recent pending details + * created by kms + * */ + public function getRecentPendingDetails_post() + { + $search['requestedBy'] = $this->post('requestedBy'); + $search['requestedDept'] = $this->post('requestedDept'); + $search['loadDate'] = $this->post('loadDate'); + // $search['searchDate'] = $this->post('searchDate'); + // $search['searchMobileNumber'] = $this->post('searchMobileNumber'); + // $search['searchName']= $this->post('searchName'); + $getRecentPendingDetails = $this->Calltracking_model->getRecentPendingDetails($search); + + if ($getRecentPendingDetails) + { + $getRecentPendingDetails['status'] = REST_Controller::HTTP_OK; + // Set the response and exit + $this->response($getRecentPendingDetails, 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