diff --git a/Apollo/api/application/config/routes.php b/Apollo/api/application/config/routes.php index d06c7284..470ac90b 100755 --- a/Apollo/api/application/config/routes.php +++ b/Apollo/api/application/config/routes.php @@ -219,6 +219,8 @@ $route['updateCourseDetailss'] = 'DataCorrection_Controller/updateCourseDetailss $route['getStudentAllInfo'] = 'DayBook_Controller/getStudentAllInfo'; +$route['getCourse'] = 'Student_Controller/getCourse'; + /* diff --git a/Apollo/api/application/controllers/Student_Controller.php b/Apollo/api/application/controllers/Student_Controller.php index ae513c4e..250bf000 100755 --- a/Apollo/api/application/controllers/Student_Controller.php +++ b/Apollo/api/application/controllers/Student_Controller.php @@ -274,6 +274,7 @@ class Student_Controller extends REST_Controller { $reqData['Status'] = $updateDetails['checkTracking']; $reqData['StatusName'] = "PENDING"; $reqData['CreatedBy'] = $localdata['localUserID']; + $reqData['CourseID'] = $updateDetails['CourseID']; $date = date('Y-m-d H:i:s'); $reqData['CreatedOn'] = $date; $addStudentPendingDocDetails = $this->student_model->addStu_PendingDoc_Details($reqData, $localdata); @@ -644,4 +645,28 @@ class Student_Controller extends REST_Controller { $this->response(['message' => 'No users were found', 'status' => REST_Controller::HTTP_NOT_FOUND], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code } } + + + + + public function getCourse_post() + { + $data = $this->post('data'); + + $localBranchID =$data['localBranchID']; + + $getcourselist= $this->student_model->get_All_Course($localBranchID); + + if ($getcourselist) { + $getcourselist['status'] = REST_Controller::HTTP_OK; + // Set the response and exit + $this->response($getcourselist, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code + } else { + // Set the response and exit + $this->response(['message' => 'No users were 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 diff --git a/Apollo/api/application/models/Student_model.php b/Apollo/api/application/models/Student_model.php index 03126283..e418b8d6 100755 --- a/Apollo/api/application/models/Student_model.php +++ b/Apollo/api/application/models/Student_model.php @@ -1325,8 +1325,9 @@ class Student_model extends CI_Model { $localBranch = $localData['localBranchID']; $this->db->select('*'); - $this->db->order_by('CreatedOn', 'DESC'); + $this->db->order_by('T_Student_DocumentTrack_Details.CreatedOn', 'DESC'); $this->db->from(STUDENTDOCUMENTTRACKDETAILS); + $this->db->join('T_CourseMaster','T_CourseMaster.CourseID=T_Student_DocumentTrack_Details.CourseID','left'); $this->db->where('StudentID', $stuID); $getPendDocDetails = $this->db->get(); $documentPendingDetails = $getPendDocDetails->result(); @@ -1342,6 +1343,10 @@ class Student_model extends CI_Model { // add student enrollment pending document details public function addStu_PendingDoc_Details($reqData, $localdata) { + + + //print_r($reqData);die(); + $this->db->insert(STUDENTDOCUMENTTRACKDETAILS, $reqData); if ($this->db->affected_rows() > 0) { // Entry for call track @@ -1715,4 +1720,35 @@ class Student_model extends CI_Model { } + + + public function get_All_Course($localBranchID) + { + $this->db->select('CourseID,T_CourseMaster.CourseCode,CourseName,T_CourseMaster.UniversityID,UniversityName'); + $this->db->from('T_CourseMaster'); + $this->db->join('T_UniversityMaster','T_UniversityMaster.UniversityID=T_CourseMaster.UniversityID'); + $this->db->where('T_CourseMaster.BranchCode',$localBranchID); + $this->db->order_by('UniversityID','asc'); + + $courseDetails = $this->db->get(); + + if($courseDetails->result()) + { + + //print_r($searchDetails->result()); + $result_array['feeStatus'] = true; + $result_array['details'] = $courseDetails->result(); + } + else + { + $result_array['feeStatus'] = false; + $result_array['details'] = "No records found!"; + } + + // print_r($this->db->last_query());die(); + + return $result_array; + + } + } \ No newline at end of file diff --git a/Apollo/assets/js/controllers/studentCtrl.js b/Apollo/assets/js/controllers/studentCtrl.js index 67da7b2f..d553d098 100755 --- a/Apollo/assets/js/controllers/studentCtrl.js +++ b/Apollo/assets/js/controllers/studentCtrl.js @@ -72,6 +72,30 @@ app.controller('studentCtrl', ["$scope", "toaster", "$filter", "ngTableParams", } + var allcourse = { + + method: 'POST', + url: apiPoint.url + 'getCourse/', + headers: { + 'Content-Type': 'application/json' + }, + data: { + data: localDetails + } + + }; + + $http(allcourse).then(function (response) { + if (response.data.details) { + $scope.allcourselist = response.data.details; + // console.log($scope.allcourselist) + } else { + $scope.employeeList = ''; + } + + + }); + @@ -1252,12 +1276,17 @@ app.controller('studentCtrl', ["$scope", "toaster", "$filter", "ngTableParams", $scope.myModelAddPendingDocDetails = { "documentDetails": "", "documentdate":"", + "course":"", "checkTracking": false } $scope.documentTrackAddDetailsLoading = false; $scope.studentEntrollPendingDocFORM = { submit: function (form, myModelAddPendingDocDetails, stuID) { + + + // alert('in'); + // return false; var firstError = null; if (form.$invalid) { var field = null, firstError = null; @@ -1281,6 +1310,7 @@ app.controller('studentCtrl', ["$scope", "toaster", "$filter", "ngTableParams", "student": stuID, "doc_Details": myModelAddPendingDocDetails.documentDetails, "checkTracking": myModelAddPendingDocDetails.checkTracking, + "CourseID":myModelAddPendingDocDetails.course, "documentdate": $filter('date')(new Date($scope.docFollowupDate),'dd-MM-yyyy') }; var updateStudentPendingDocDetails = { @@ -1300,6 +1330,7 @@ app.controller('studentCtrl', ["$scope", "toaster", "$filter", "ngTableParams", $scope.documentTrackAddDetailsLoading = false; $scope.myModelAddPendingDocDetails = { "documentDetails": "", + "course":"", "checkTracking": false } form.$setPristine(true); @@ -1311,8 +1342,12 @@ app.controller('studentCtrl', ["$scope", "toaster", "$filter", "ngTableParams", } }, reset: function (form) { + + // alert('reset') + // return false; $scope.myModelAddPendingDocDetails = { "documentDetails": "", + "course":"", "checkTracking": false } } @@ -1490,10 +1525,13 @@ app.controller('studentSuperAdminCtrl', ["$scope", "toaster", "$filter", "ngTabl var localDetails = ipCookie('cookiechk'); $scope.localBranchDetails = ""; $scope.loader = false; +$scope.allcourselist =''; + $scope.che='abc'; $scope.viewStudentDetailsPage = false; // load when html page load $scope.init = function () { + $scope.che='123'; $scope.localUserType = localDetails.localType; if (localDetail != null) { if (localDetails.localType === 'R004') { @@ -1505,6 +1543,33 @@ app.controller('studentSuperAdminCtrl', ["$scope", "toaster", "$filter", "ngTabl } } else { } + + + var allcourse = { + + method: 'POST', + url: apiPoint.url + 'getCourse/', + headers: { + 'Content-Type': 'application/json' + }, + data: { + data: localDetails + } + + }; + + $http(allcourse).then(function (response) { + if (response.data.details) { + $scope.allcourselist = response.data.details; + // console.log($scope.allcourselist) + } else { + $scope.employeeList = ''; + } + + + }); + + } @@ -2831,6 +2896,7 @@ app.controller('studentSuperAdminCtrl', ["$scope", "toaster", "$filter", "ngTabl $scope.myModelAddPendingDocDetails = { "documentDetails": "", + "course":"", "checkTracking": false } @@ -2838,6 +2904,10 @@ app.controller('studentSuperAdminCtrl', ["$scope", "toaster", "$filter", "ngTabl $scope.studentEntrollPendingDocFORM = { submit: function (form, myModelAddPendingDocDetails, stuID) { + +//console.log(myModelAddPendingDocDetails) + // alert('in'); + // return false; var firstError = null; if (form.$invalid) { var field = null, firstError = null; @@ -2862,6 +2932,7 @@ app.controller('studentSuperAdminCtrl', ["$scope", "toaster", "$filter", "ngTabl "student" : stuID, "doc_Details": myModelAddPendingDocDetails.documentDetails, "checkTracking": myModelAddPendingDocDetails.checkTracking, + "CourseID":myModelAddPendingDocDetails.course, "documentdate" :$filter('date')(new Date($scope.docFollowupDate),'dd-MM-yyyy') }; var updateStudentPendingDocDetails = { @@ -2894,6 +2965,7 @@ app.controller('studentSuperAdminCtrl', ["$scope", "toaster", "$filter", "ngTabl reset: function (form) { $scope.myModelAddPendingDocDetails = { "documentDetails": "", + "course":"", "checkTracking": false } } diff --git a/Apollo/assets/views/student/editStudentDetails.html b/Apollo/assets/views/student/editStudentDetails.html index a6bb1648..b709fc22 100755 --- a/Apollo/assets/views/student/editStudentDetails.html +++ b/Apollo/assets/views/student/editStudentDetails.html @@ -598,7 +598,25 @@ -
+ + +
+ + + +
+ + + + + + +
@@ -646,6 +664,7 @@ Detail Follow_Up_Date + Course Status Delete @@ -658,6 +677,7 @@ Open Close --> + {{penddoc.CourseName}} {{penddoc.StatusName | ucfirst}}