diff --git a/Apollo/api/application/config/routes.php b/Apollo/api/application/config/routes.php index 536537d6..638afed2 100755 --- a/Apollo/api/application/config/routes.php +++ b/Apollo/api/application/config/routes.php @@ -132,6 +132,8 @@ $route['getExistingStudentDetails'] = 'Student_Controller/getExistingStudentDeta $route['addStudentEntrollDocDetails'] = 'Student_Controller/addStudentEntrollDocDetails'; $route['getListofStuDocDetails'] = 'Student_Controller/getListofStuDocDetails'; $route['deleteStuDocDetails'] = 'Student_Controller/deleteStuDocDetails'; +$route['getListofStuPendingDocDetails'] = 'Student_Controller/getListofStuPendingDocDetails'; +$route['addStudentEnrollPendingDocDetails'] = 'Student_Controller/addStudentEnrollPendingDocDetails'; //batch $route['addBatchDetails'] = 'Batch_Controller/addBatchDetails'; diff --git a/Apollo/api/application/controllers/Student_Controller.php b/Apollo/api/application/controllers/Student_Controller.php index dfa7fa52..8f5fdec5 100755 --- a/Apollo/api/application/controllers/Student_Controller.php +++ b/Apollo/api/application/controllers/Student_Controller.php @@ -316,6 +316,55 @@ class Student_Controller extends REST_Controller { } + // get student pending enrollment document details + public function getListofStuPendingDocDetails_post() { + $StudentID = $this->post('exceptId'); + $localdata = $this->post('localData'); + $studentPendingDocDetails = $this->student_model->getStudent_PendingDoc_Details($StudentID); + if ($studentPendingDocDetails) + { + $studentPendingDocDetails['status'] = REST_Controller::HTTP_OK; + // Set the response and exit + $this->response($studentPendingDocDetails, 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 + } + } + + public function addStudentEnrollPendingDocDetails_post() { + $updateDetails = $this->post('updateDetails'); + $localdata = $this->post('localData'); + + $reqData['StudentID'] = $updateDetails['student']; + $reqData['Details'] = $updateDetails['doc_Details']; + $reqData['Status'] = $updateDetails['checkTracking']; + $reqData['CreatedBy'] = $localdata['localUserID']; + $date = date('Y-m-d H:i:s'); + $reqData['CreatedOn'] = $date; + + $addStudentPendingDocDetails = $this->student_model->addStu_PendingDoc_Details($reqData); + + if ($addStudentPendingDocDetails) + { + $addStudentPendingDocDetails['status'] = REST_Controller::HTTP_OK; + // Set the response and exit + $this->response($addStudentPendingDocDetails, 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 + } + } public function updateStudentImgDetails_post() { diff --git a/Apollo/api/application/models/Student_model.php b/Apollo/api/application/models/Student_model.php index 6a0af7f9..4dab02d7 100755 --- a/Apollo/api/application/models/Student_model.php +++ b/Apollo/api/application/models/Student_model.php @@ -996,6 +996,39 @@ class Student_model extends CI_Model } } + public function getStudent_PendingDoc_Details($stuID) { + $this->db->select('*'); + $this->db->order_by('CreatedOn', 'DESC'); + $this->db->from('T_Student_DocumentTrack_Details'); + $this->db->where('StudentID', $stuID); + $getPendDocDetails = $this->db->get(); + $documentPendingDetails = $getPendDocDetails->result(); + if (count($documentPendingDetails) > 0) { + $results['PendingDocListStatus'] = true; + $results['student_pending_doc_details'] = $documentPendingDetails; + } + else { + $results['PendingDocListStatus'] = false; + $results['message'] = 'No record found'; + } + return $results; + } + + // add student enrollment pending document details + public function addStu_PendingDoc_Details($reqData) { + // echo "model"; + // print_r($reqData);exit(); + $this->db->insert('T_Student_DocumentTrack_Details', $reqData); + if ($this->db->affected_rows() > 0) { + $results['AddStuPendingDocStatus'] = true; + $results['message'] = "Added Successfully."; + } else { + $results['AddStuPendingDocStatus'] = false; + $results['message'] = "Something went wrong.please try again."; + } + return $results; + } + // update student personal details public function update_student($empArr, $updateFor, $imagename, $imageSource, $size) diff --git a/Apollo/assets/js/controllers/answerBookletStatusCtrl.js b/Apollo/assets/js/controllers/answerBookletStatusCtrl.js index f1338483..8387e91c 100755 --- a/Apollo/assets/js/controllers/answerBookletStatusCtrl.js +++ b/Apollo/assets/js/controllers/answerBookletStatusCtrl.js @@ -293,10 +293,10 @@ app.controller('answerBookletStatusCtrl', ["$scope", "toaster", "$filter", "ngTa } } - $scope.semDetails =[{"id": 1, "type": "SEM 1"}, {"id": 2, "type": "SEM 2"}, + $scope.semDetails =[{"id": 1, "type": "SEM 1"}, {"id": 2, "type": "SEM 2"}, {"id": 3, "type": "SEM 3"}, {"id": 4, "type": "SEM 4"}, {"id": 5, "type": "SEM 5"}, - {"id": 6, "type": "SEM 6"}, {"id": 7, "type": "SEM 7"}, {"id": 8, "type": "SEM 8"}] - + {"id": 6, "type": "SEM 6"}, {"id": 7, "type": "SEM 7"}, {"id": 8, "type": "SEM 8"} + , {"id": 9, "type": "YEAR 1"}, {"id": 10, "type": "YEAR 2"}, {"id": 11, "type": "YEAR 3"}, {"id": 12, "type": "YEAR 4"}] $scope.statusUpdate = { submit: function (form, myStatusModel, localBranchDetails) { diff --git a/Apollo/assets/js/controllers/certificationStatusCtrl.js b/Apollo/assets/js/controllers/certificationStatusCtrl.js index a0124427..316532fa 100755 --- a/Apollo/assets/js/controllers/certificationStatusCtrl.js +++ b/Apollo/assets/js/controllers/certificationStatusCtrl.js @@ -327,10 +327,10 @@ app.controller('certificationStatusCtrl', ["$scope", "toaster", "$filter", "ngTa } } - $scope.semDetails =[{"id": 1, "type": "SEM 1"}, {"id": 2, "type": "SEM 2"}, + $scope.semDetails =[{"id": 1, "type": "SEM 1"}, {"id": 2, "type": "SEM 2"}, {"id": 3, "type": "SEM 3"}, {"id": 4, "type": "SEM 4"}, {"id": 5, "type": "SEM 5"}, - {"id": 6, "type": "SEM 6"}, {"id": 7, "type": "SEM 7"}, {"id": 8, "type": "SEM 8"}] - + {"id": 6, "type": "SEM 6"}, {"id": 7, "type": "SEM 7"}, {"id": 8, "type": "SEM 8"} + , {"id": 9, "type": "YEAR 1"}, {"id": 10, "type": "YEAR 2"}, {"id": 11, "type": "YEAR 3"}, {"id": 12, "type": "YEAR 4"}] // Update the status For Certification $scope.statusUpdate = { diff --git a/Apollo/assets/js/controllers/studentCtrl.js b/Apollo/assets/js/controllers/studentCtrl.js index 5c3d3207..65ebc952 100755 --- a/Apollo/assets/js/controllers/studentCtrl.js +++ b/Apollo/assets/js/controllers/studentCtrl.js @@ -1042,6 +1042,94 @@ app.controller('studentCtrl', ["$scope", "toaster", "$filter", "ngTableParams", } } + $scope.PendingDocNotFound = false; + // student pending document details + $scope.getStudentPendingEntrolDocDetails = function(stuId) { + // $scope.studentDocumentsList = ''; + + var getStudentPendingDocDetails = { + method: 'POST', + url: apiPoint.url + 'getListofStuPendingDocDetails/', + headers: { + 'Content-Type': 'application/json' + }, + data: { + exceptId: stuId, + localData: localDetail + } + }; + $http(getStudentPendingDocDetails).then(function (response) { + if (response.data.PendingDocListStatus == true) { + $scope.PendingDocNotFound = false; + $scope.studentPendingDocumentsDetails = response.data.student_pending_doc_details; + } else { + $scope.PendingDocNotFound = true; + } + }); + } + + + $scope.myModelAddPendingDocDetails = { + "documentDetails": "", + "checkTracking": false + } + + $scope.studentEntrollPendingDocFORM = { + submit: function (form, myModelAddPendingDocDetails, stuID) { + + var firstError = null; + if (form.$invalid) { + var field = null, firstError = null; + for (field in form) { + if (field[0] != '$') { + if (firstError === null && !form[field].$valid) { + firstError = form[field].$name; + } + if (form[field].$pristine) { + form[field].$dirty = true; + } + } + } + angular.element('.ng-invalid[name=' + firstError + ']').focus(); + // swal("The form cannot be submitted because it contains validation errors!", "Errors are marked with a red, dashed border!", "error"); + } else { + var ModelDetails = { + "student" : stuID, + "doc_Details": myModelAddPendingDocDetails.documentDetails, + "checkTracking": myModelAddPendingDocDetails.checkTracking + }; + var updateStudentPendingDocDetails = { + method: 'POST', + url: apiPoint.url + 'addStudentEnrollPendingDocDetails/', + headers: { + 'Content-Type': 'application/json' + }, + data: { + updateDetails: ModelDetails, + localData: localDetail + } + }; + $http(updateStudentPendingDocDetails).then(function (response) { + if (response.data.AddStuPendingDocStatus == true) { + $scope.getStudentPendingEntrolDocDetails(stuID); + $scope.myModelAddPendingDocDetails = { + "documentDetails": "", + "checkTracking": false + } + } else { + swal(" ", res.data.message, "error"); + } + }); + } + }, + reset: function (form) { + $scope.myModelAddPendingDocDetails = { + "documentDetails": "", + "checkTracking": false + } + } + } + // end : entrollment document upload ==================================== $scope.stepsModelEdit = []; diff --git a/Apollo/assets/js/controllers/studyMaterialStatusCtrl.js b/Apollo/assets/js/controllers/studyMaterialStatusCtrl.js index fa7dd404..5c6bf7b9 100755 --- a/Apollo/assets/js/controllers/studyMaterialStatusCtrl.js +++ b/Apollo/assets/js/controllers/studyMaterialStatusCtrl.js @@ -303,7 +303,8 @@ app.controller('studyMaterialStatusCtrl', ["$scope", "toaster", "$filter", "ngTa $scope.semDetails =[{"id": 1, "type": "SEM 1"}, {"id": 2, "type": "SEM 2"}, {"id": 3, "type": "SEM 3"}, {"id": 4, "type": "SEM 4"}, {"id": 5, "type": "SEM 5"}, - {"id": 6, "type": "SEM 6"}, {"id": 7, "type": "SEM 7"}, {"id": 8, "type": "SEM 8"}] + {"id": 6, "type": "SEM 6"}, {"id": 7, "type": "SEM 7"}, {"id": 8, "type": "SEM 8"} + , {"id": 9, "type": "YEAR 1"}, {"id": 10, "type": "YEAR 2"}, {"id": 11, "type": "YEAR 3"}, {"id": 12, "type": "YEAR 4"}] $scope.statusUpdate = { submit: function (form, myStatusModel, localBranchDetails) { diff --git a/Apollo/assets/views/student/editStudentDetails.html b/Apollo/assets/views/student/editStudentDetails.html index a2a6f649..e3ab5dc9 100755 --- a/Apollo/assets/views/student/editStudentDetails.html +++ b/Apollo/assets/views/student/editStudentDetails.html @@ -391,99 +391,182 @@ - - - - -
-
- - Add Document Details - -
-
-
-
-
-
-
+
+ -
- - +
+
+
+
+
+
Loading...
+
-
-
-
-
Loading...
-
-
- - - -
-
- - - - - - - - - - - - - + + +
Document NameDetailsDownload/Delete
{{doc.DocumentName}}{{doc.DocumentStorePath}}
+
+ No document details found ** +
+
- - -
+ + +
+ + Pending Document Details + +
+
+
+
+ +