diff --git a/Apollo/api/application/config/routes.php b/Apollo/api/application/config/routes.php index 7f6163f3..6e196527 100644 --- a/Apollo/api/application/config/routes.php +++ b/Apollo/api/application/config/routes.php @@ -58,30 +58,35 @@ $route['translate_uri_dashes'] = TRUE; | Sample REST API Routes | ------------------------------------------------------------------------- */ +$route['autenticadors'] = 'autenticador/index'; // Example 4 $route['login'] = 'Login_Controller/login'; +// branch +$route['getMasterBranchDetails'] = 'Employee_Controller/getMasterBranchDetails'; +$route['addBranchDetails'] = 'Branch_Controller/addBranchDetails'; +$route['getBranchDetails'] = 'Branch_Controller/getBranchDetails'; +$route['updateBranchDetails'] = 'Branch_Controller/updateBranchDetails'; +// staff $route['employee'] = 'Employee_Controller/employee'; $route['getEmployeeList'] = 'Employee_Controller/getEmployeeList'; $route['getRoleDetails'] = 'Employee_Controller/getRoleDetails'; -$route['getMasterBranchDetails'] = 'Employee_Controller/getMasterBranchDetails'; $route['chkEmpExistDetail'] = 'Employee_Controller/check_exist'; $route['insertEmployee'] = 'Employee_Controller/addEmployee'; $route['chkUpdateEmpExistDetail'] = 'Employee_Controller/check_update_exist'; $route['updateEmpExistDetail'] = 'Employee_Controller/updateEmployee'; $route['getEmpBranchDetails'] = 'Employee_Controller/getEmpBranchDetails'; $route['updateEmpBranchDetail'] = 'Employee_Controller/updateEmpBranchDetail'; -$route['autenticadors'] = 'autenticador/index'; // Example 4 -$route['addBranchDetails'] = 'Branch_Controller/addBranchDetails'; -$route['getBranchDetails'] = 'Branch_Controller/getBranchDetails'; -$route['updateBranchDetails'] = 'Branch_Controller/updateBranchDetails'; +// call tracking $route['getTrackingLeadDetails'] = 'Call_Tracking_Controller/getTrackingLeadDetails'; $route['addLeadTrackingDetails'] = 'Call_Tracking_Controller/addLeadTrackingDetails'; $route['getTrackingDetails'] = 'Call_Tracking_Controller/getTrackingDetails'; $route['updateFollowupDetails'] = 'Call_Tracking_Controller/updateFollowupDetails'; $route['loadFollowupDetails'] = 'Call_Tracking_Controller/loadFollowupDetails'; +// university $route['insertUniversity'] = 'University_Controller/insertUniversity'; $route['getUniversity'] = 'University_Controller/getUniversity'; $route['chkUnivIdExistDetail'] = 'University_Controller/chkUnivIdExistDetail'; $route['updateUniversityDetail'] = 'University_Controller/updateUniversityDetail'; +//course $route['getCourseDetails'] = 'Course_Controller/getCourseDetails'; $route['addCourseDetails'] = 'Course_Controller/addCourseDetails'; $route['updateCourseDetails'] = 'Course_Controller/updateCourseDetails'; @@ -104,6 +109,11 @@ $route['getStudentCourseList'] = 'Student_Controller/getStudentCourseList'; $route['getStudentCourseDetails'] = 'Student_Controller/getStudentCourseDetails'; $route['updateStudentCourseDetail'] = 'Student_Controller/updateStudentCourseDetail'; +//batch +$route['addBatchDetails'] = 'Batch_Controller/addBatchDetails'; +$route['updateBatchDetails'] = 'Batch_Controller/updateBatchDetails'; +$route['getBatchDetails'] = 'Batch_Controller/getBatchDetails'; + diff --git a/Apollo/api/application/models/Batch_model.php b/Apollo/api/application/models/Batch_model.php index e827cad0..ce2fefad 100644 --- a/Apollo/api/application/models/Batch_model.php +++ b/Apollo/api/application/models/Batch_model.php @@ -20,11 +20,11 @@ class Batch_model extends CI_Model { $this->db->select('BatchCode'); $this->db->where('BatchCode', $arrayDetails['BatchCode']); - if($this->db->get(T_BATCHMASTER)->first_row()){ + if($this->db->get(BATCH)->first_row()){ $result['batchStatus'] = false; $result['message'] = "This batch Code is already exist!"; } else { - $this->db->insert(T_BATCHMASTER, $arrayDetails); + $this->db->insert(BATCH, $arrayDetails); if ($this->db->affected_rows() == '1') { $result['batchStatus'] = true; @@ -48,7 +48,7 @@ class Batch_model extends CI_Model { public function getBatch() { $this->db->select('CU.BatchCode,CU.BatchName,CU.IsActive,US.UniversityID,US.UniversityName'); - $this->db->from(T_BATCHMASTER.' as CU'); + $this->db->from(BATCH.' as CU'); $this->db->join(UNIVERSITY.' as US', 'US.UniversityID = CU.UniversityID'); $this->db->order_by('CU.CreatedOn','DESC'); $batchDetails = $this->db->get(); @@ -76,7 +76,7 @@ class Batch_model extends CI_Model { public function updateBatch($arrayDetails=null) { $this->db->where('BatchCode',$arrayDetails['BatchCode']); - $upateStatus=$this->db->update(T_BATCHMASTER, $arrayDetails); + $upateStatus=$this->db->update(BATCH, $arrayDetails); if($upateStatus){ $result['batchStatus'] = true; diff --git a/Apollo/api/application/models/Course_model.php b/Apollo/api/application/models/Course_model.php index 569a8e45..5cf1b980 100644 --- a/Apollo/api/application/models/Course_model.php +++ b/Apollo/api/application/models/Course_model.php @@ -71,7 +71,7 @@ class Course_model extends CI_Model { $this->db->select('CU.CourseID,CU.CourseName,CU.FeesType,CU.PC,CU.DC,CU.TC,CU.MC,CU.OtherFees,CU.IsActive,US.UniversityID,US.UniversityName'); $this->db->from(COURSE.' as CU'); $this->db->join(UNIVERSITY.' as US', 'US.UniversityID = CU.UniversityID'); - $this->db->order_by('CourseID','DESC'); + $this->db->order_by('CU.CreatedOn','DESC'); $courseDetails = $this->db->get(); if($courseDetails->result()){