diff --git a/Apollo/api/application/controllers/Dashboard_Controller.php b/Apollo/api/application/controllers/Dashboard_Controller.php index 4b957cec..d19b0293 100755 --- a/Apollo/api/application/controllers/Dashboard_Controller.php +++ b/Apollo/api/application/controllers/Dashboard_Controller.php @@ -93,7 +93,7 @@ class Dashboard_Controller extends REST_Controller { * get university based student registration details for dash board * created by kms * */ - public function getUniversityRegisteredStudent(){ + public function getUniversityRegisteredStudent_post(){ $data = $this->post('data'); $getRegisteredDetails = $this->dashboard_model->get_univ_registered_student($data); if ($getRegisteredDetails) { diff --git a/Apollo/api/application/models/Dashboard_model.php b/Apollo/api/application/models/Dashboard_model.php index 55fc64dd..bd127be4 100755 --- a/Apollo/api/application/models/Dashboard_model.php +++ b/Apollo/api/application/models/Dashboard_model.php @@ -74,7 +74,37 @@ class Dashboard_model extends CI_Model * created by kms * */ public function get_univ_registered_student($details){ - + $this->db->distinct(); + $this->db->select('UniversityID,UniversityName'); + $this->db->from(UNIVERSITY); + $this->db->order_by('ID','DESC'); + $this->db->where('BranchCode',$details['localBranchID']); + $getUnivDetails = $this->db->get(); + if($getUnivDetails->result()){ + $resultDetails['resultStatus']=true; + foreach ($getUnivDetails->result() as $rows){ + $fetchDetails['UniversityID']=$rows->UniversityID; + $fetchDetails['UniversityName']=$rows->UniversityName; + $this->db->select('StudentID'); + $this->db->from(STUDENTCOURSE); + $this->db->where('BranchID',$details['localBranchID']); + $this->db->where('UniversityID',$rows->UniversityID); + $getRegisterDetails = $this->db->get(); + if($getRegisterDetails->num_rows()>0){ + $fetchDetails['StudentCounts']=$getRegisterDetails->num_rows(); + } + else{ + $fetchDetails['StudentCounts']=0; + } + $getArray[]=$fetchDetails; + } + $resultDetails['details']=$getArray; + } + else{ + $resultDetails['resultStatus']=false; + $resultDetails['Message']="No records found!"; + } + return $resultDetails; } diff --git a/Apollo/assets/js/controllers/dashboardCtrl.js b/Apollo/assets/js/controllers/dashboardCtrl.js index b424092e..d27167a3 100755 --- a/Apollo/assets/js/controllers/dashboardCtrl.js +++ b/Apollo/assets/js/controllers/dashboardCtrl.js @@ -10,7 +10,7 @@ app.controller('dashboardCtrl', ["$scope","$rootScope", "toaster", "$filter", "n * this method called from view ng-init directive * created by kms * */ - + $scope.getLoginType=JSON.parse(localStorage.getItem('localObj')).localType; $scope.initCallTracking = function () { $rootScope.pendingFolloupDetails = []; var getCallTrack = { @@ -184,10 +184,11 @@ app.controller('OnotherCtrl', ["$scope", "toaster", "$filter", "$http", "API_POI var localDetails = ipCookie('cookiechk'); $scope.init = function () { - $scope.this_Student = 0; - $scope.this_Staff = 0; - $scope.this_TotalUser = 0; - $scope.getTotalUsers(); + // $scope.this_Student = 0; + // $scope.this_Staff = 0; + // $scope.this_TotalUser = 0; + // $scope.getTotalUsers(); + $scope.getUniversityRegisteredDetails(); } @@ -284,6 +285,34 @@ app.controller('OnotherCtrl', ["$scope", "toaster", "$filter", "$http", "API_POI legendTemplate: '