diff --git a/Apollo/api/application/controllers/StatusUpdation_Controller.php b/Apollo/api/application/controllers/StatusUpdation_Controller.php index da2aafec..604ad50c 100755 --- a/Apollo/api/application/controllers/StatusUpdation_Controller.php +++ b/Apollo/api/application/controllers/StatusUpdation_Controller.php @@ -228,4 +228,21 @@ class StatusUpdation_Controller extends REST_Controller { } } + + public function getApplicationFromDetails_post(){ + $reqData = $this->post('data'); + $reqBranch = $this->post('reqBranch'); + // print_r($reqData);exit(); + $getApplicationFormDetails = $this->statusupdation_model->get_applicationFrom_details($reqData, $reqBranch); // Check if the employee exist + if ($getApplicationFormDetails) { + $getApplicationFormDetails['status'] = REST_Controller::HTTP_OK; + // Set the response and exit + $this->response($getApplicationFormDetails, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code + + } else { + // Set the response and exit + $this->response(['message' => 'No list 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/StatusUpdation_model.php b/Apollo/api/application/models/StatusUpdation_model.php index ec992a9b..65345536 100755 --- a/Apollo/api/application/models/StatusUpdation_model.php +++ b/Apollo/api/application/models/StatusUpdation_model.php @@ -851,7 +851,6 @@ class StatusUpdation_model extends CI_Model { //Get AnswerBooklet Status based on StudentID,CourseID,BranchCode,Sem function getAnswerBookletStatus($StudentID,$CourseID,$BranchCode,$Sem) { - //echo "MODEL - $StudentID,$CourseID,$BranchCode,$Sem"; $this->db->select("max(T_AnswerBookletStatus.ListCode)as ListCode,max(T_PickListDetails.ListName) as ListName"); $this->db->from("T_AnswerBookletStatus"); @@ -880,7 +879,12 @@ class StatusUpdation_model extends CI_Model { // print_r($data); // die(); return $data; - - } + + //get application form details + public function get_applicationFrom_details($reqData, $reqBranch) { +echo $reqData['studId']; +echo $reqData['courseId']; + + } } \ No newline at end of file diff --git a/Apollo/assets/js/controllers/applicationStatusCtrl.js b/Apollo/assets/js/controllers/applicationStatusCtrl.js index 1a46e68a..c2ffef6c 100644 --- a/Apollo/assets/js/controllers/applicationStatusCtrl.js +++ b/Apollo/assets/js/controllers/applicationStatusCtrl.js @@ -248,18 +248,18 @@ app.controller('applicationStatusCtrl', ["$scope", "toaster", "$filter", "ngTabl // open popup window onselct checkbox clicked or close popup window all the clicked items unchecked $scope.OpenWindowStatus = false; $scope.openUpdateWind = function (p) { - alert(JSON.stringify(p)); + // alert(JSON.stringify(p)); var details = { studId: p.StudentID, courseId: p.CourseID } - alert(JSON.stringify(details)); + // alert(JSON.stringify(details)); var ItemsSelected = $scope.searchResultDetails.filter(function (item) { if (item.Selected === true) { return true; } }); if (ItemsSelected.length !== 0) { const courseLocal = $scope.searchData.Course; - $scope.getApplicationFromDetails(courseLocal); + $scope.getApplicationFromDetails(details); $scope.getStatusList(); $scope.OpenWindowStatus = true; $scope.myStatusModel = { @@ -275,6 +275,30 @@ app.controller('applicationStatusCtrl', ["$scope", "toaster", "$filter", "ngTabl } } + $scope.getApplicationFromDetails = function(frm_details){ +alert(JSON.stringify(frm_details)); + + var getStatusL = { + method: 'POST', + url: apiPoint.url + 'getApplicationFromDetails/', + headers: { + 'Content-Type': 'application/json' + }, + data: { + data: frm_details, + reqBranch: localDetails.localBranchID + } + }; + $http(getStatusL).then(function (response) { + if (response.data.statusList) { + $scope.statusDetailsList = response.data.statusList_details; + } else { + // $scope.searchLoading = false; + } + }); + + } + // get status list for this activity $scope.getStatusList = function () { var getStatusL = {