diff --git a/Apollo/api/application/controllers/StatusUpdation_Controller.php b/Apollo/api/application/controllers/StatusUpdation_Controller.php index 7fb2fabf..d4b31b5a 100755 --- a/Apollo/api/application/controllers/StatusUpdation_Controller.php +++ b/Apollo/api/application/controllers/StatusUpdation_Controller.php @@ -123,6 +123,7 @@ class StatusUpdation_Controller extends REST_Controller { 'SDate' => $reqData[$i]['SDate'], 'Coursedetail' => $reqData[$i]['Coursedetail'], 'Comments' => $reqData[$i]['Comments'], + 'Sem' => $reqData[$i]['Sem'], 'CreatedBy' => $reqDetails['localUserID'], 'CreatedOn' => $dateTime, ); @@ -165,6 +166,7 @@ class StatusUpdation_Controller extends REST_Controller { 'AnsDate' => $reqData[$i]['SDate'], 'Coursedetail' => $reqData[$i]['Coursedetail'], 'Comments' => $reqData[$i]['Comments'], + 'Sem' => $reqData[$i]['Sem'], 'CreatedBy' => $reqDetails['localUserID'], 'CreatedOn' => $dateTime, ); @@ -229,6 +231,7 @@ class StatusUpdation_Controller extends REST_Controller { 'CDate' => $reqData[$i]['SDate'], 'Coursedetail' => $reqData[$i]['Coursedetail'], 'Comments' => $reqData[$i]['Comments'], + 'Sem' => $reqData[$i]['Sem'], 'CreatedBy' => $reqDetails['localUserID'], 'CreatedOn' => $dateTime, // 'CertificationType' => $reqData[$i]['CertificateType'], diff --git a/Apollo/api/application/models/StatusUpdation_model.php b/Apollo/api/application/models/StatusUpdation_model.php index 3d1566ee..fe0b716e 100755 --- a/Apollo/api/application/models/StatusUpdation_model.php +++ b/Apollo/api/application/models/StatusUpdation_model.php @@ -161,10 +161,10 @@ class StatusUpdation_model extends CI_Model } public function get_prev_status_list($reqDetailsFor, $reqDetails){ - if( $reqDetailsFor == 'STUDY_MATERIAL') { + if( $reqDetailsFor == 'STUDY_MATERIAL') { $searchFor = 'M001'; $searchTableFor = STUDY_MATERIAL_STATUS; - $this->db->select('t1.*, t4.Firstname, t5.ListName, t2.Sem_Year'); + $this->db->select('t1.*, t4.Firstname, t5.ListName, t2.Sem_Year, t2.ProgramType'); $this->db->from(''. $searchTableFor . ' as t1'); $this->db->where('t1.StudentID', $reqDetails['student']); $this->db->join('' . COURSE_FEES . ' as t2', 't2.ID = t1.CourseID', 'LEFT'); @@ -207,7 +207,7 @@ class StatusUpdation_model extends CI_Model } else if ( $reqDetailsFor == 'CERTIFICATION_STATUS' ) { $searchFor = 'C001'; $searchTableFor = CERTIFICATION_STATUS; - $this->db->select('t1.*, t4.Firstname, t5.ListName, t2.Sem_Year'); + $this->db->select('t1.*, t4.Firstname, t5.ListName, t2.Sem_Year, t2.ProgramType'); $this->db->from(''. $searchTableFor . ' as t1'); $this->db->where('t1.StudentID', $reqDetails['student']); $this->db->join('' . COURSE_FEES . ' as t2', 't2.ID = t1.CourseID', 'LEFT'); @@ -229,7 +229,7 @@ class StatusUpdation_model extends CI_Model } else if ( $reqDetailsFor == 'ANSWERBOOKLET_STATUS' ) { $searchFor = 'B001'; $searchTableFor = ANSWER_BOOKLET; - $this->db->select('t1.*, t4.Firstname, t5.ListName, t2.Sem_Year'); + $this->db->select('t1.*, t4.Firstname, t5.ListName, t2.Sem_Year, t2.ProgramType'); $this->db->from(''. $searchTableFor . ' as t1'); $this->db->where('t1.StudentID', $reqDetails['student']); $this->db->join('' . COURSE_FEES . ' as t2', 't2.ID = t1.CourseID', 'LEFT'); @@ -322,7 +322,7 @@ class StatusUpdation_model extends CI_Model // get sem/Year for the course public function get_semyear_result($reqData, $stuFor) { // echo $stuFor;exit(); - $subQuery = "SELECT CF.Sem_Year, CF.ID + $subQuery = "SELECT CF.Sem_Year, CF.ID , IF(CF.ProgramType = 'Y001', '0', '1') as SEM_YEAR_TYPE FROM ".COURSE_FEES." as CF LEFT JOIN ".STUDENTS_FEES_STATUS." as SFS ON SFS.FeesType = CF.ID WHERE SFS.CourseID = '$reqData' diff --git a/Apollo/assets/js/controllers/answerBookletStatusCtrl.js b/Apollo/assets/js/controllers/answerBookletStatusCtrl.js index 3ad376c8..f1338483 100755 --- a/Apollo/assets/js/controllers/answerBookletStatusCtrl.js +++ b/Apollo/assets/js/controllers/answerBookletStatusCtrl.js @@ -73,7 +73,8 @@ app.controller('answerBookletStatusCtrl', ["$scope", "toaster", "$filter", "ngTa 'semYear': '', 'staus': '', 'dateOn': '', - 'comment': '' + 'comment': '', + 'sem': '' } $scope.universityData = ''; @@ -220,7 +221,8 @@ app.controller('answerBookletStatusCtrl', ["$scope", "toaster", "$filter", "ngTa 'semYear': '', 'staus': '', 'dateOn': '', - 'comment': '' + 'comment': '', + 'sem': '' } } else { $scope.OpenWindowStatus = false; @@ -278,6 +280,24 @@ app.controller('answerBookletStatusCtrl', ["$scope", "toaster", "$filter", "ngTa } } + + $scope.showSingleLateralSemType = false; + + // sem year show when REGULAR or LATER ENTRY + $scope.getSemYearDropShowMethod = function(type) { + if(JSON.parse(type).SEM_YEAR_TYPE == "0"){ + // type is semester mode + $scope.showSingleLateralSemType = false; + } else { + $scope.showSingleLateralSemType = true; + } + } + + $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"}] + + $scope.statusUpdate = { submit: function (form, myStatusModel, localBranchDetails) { var firstError = null; @@ -296,8 +316,8 @@ app.controller('answerBookletStatusCtrl', ["$scope", "toaster", "$filter", "ngTa 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 { - localDetails.localBranchID = localBranchDetails !== '' ? localBranchDetails : localDetails.localBranchID ; - localDetail.localBranchID = localBranchDetails !== '' ? localBranchDetails : localDetail.localBranchID ; + localDetails.localBranchID = localBranchDetails !== '' ? localBranchDetails : localDetails.localBranchID ; + localDetail.localBranchID = localBranchDetails !== '' ? localBranchDetails : localDetail.localBranchID ; $scope.disableButton = true; var studentForUpdate = []; let formate = "dd-MM-yyyy"; @@ -311,13 +331,18 @@ app.controller('answerBookletStatusCtrl', ["$scope", "toaster", "$filter", "ngTa }); function getStudentForUpdateDetails(id, bCode) { this.StudentID = id; - this.CourseID = $scope.myStatusModel.semYear; + // alert($scope.myStatusModel.semYear); + var courseID = JSON.parse($scope.myStatusModel.semYear); + var val = courseID.ID; + // alert(val); + this.CourseID = val; this.BranchCode = bCode; this.ListCode = $scope.myStatusModel.staus; this.SDate = $scope.myStatusModel.dateOn; this.Coursedetail = id; this.Comments = $scope.myStatusModel.comment; - } + this.Sem = $scope.myStatusModel.sem === '' ? courseID.Sem_Year : $scope.myStatusModel.sem; + } var updateStudyMaterial = { method: 'POST', @@ -351,7 +376,8 @@ app.controller('answerBookletStatusCtrl', ["$scope", "toaster", "$filter", "ngTa 'semYear': '', 'staus': '', 'dateOn': '', - 'comment': '' + 'comment': '', + 'sem': '' } } } diff --git a/Apollo/assets/js/controllers/certificationStatusCtrl.js b/Apollo/assets/js/controllers/certificationStatusCtrl.js index 50b98552..a0124427 100755 --- a/Apollo/assets/js/controllers/certificationStatusCtrl.js +++ b/Apollo/assets/js/controllers/certificationStatusCtrl.js @@ -78,7 +78,8 @@ app.controller('certificationStatusCtrl', ["$scope", "toaster", "$filter", "ngTa 'dateOn': '', 'comment': '', 'certificatetype': '', - 'certificateNumber': '' + 'certificateNumber': '', + 'sem':'' } // get University List @@ -254,7 +255,8 @@ app.controller('certificationStatusCtrl', ["$scope", "toaster", "$filter", "ngTa 'dateOn': '', 'comment': '', 'certificatetype': '', - 'certificateNumber': '' + 'certificateNumber': '', + 'sem':'' } } else { $scope.OpenWindowStatus = false; @@ -312,6 +314,24 @@ app.controller('certificationStatusCtrl', ["$scope", "toaster", "$filter", "ngTa } } + + $scope.showSingleLateralSemType = false; + + // sem year show when REGULAR or LATER ENTRY + $scope.getSemYearDropShowMethod = function(type) { + if(JSON.parse(type).SEM_YEAR_TYPE == "0"){ + // type is semester mode + $scope.showSingleLateralSemType = false; + } else { + $scope.showSingleLateralSemType = true; + } + } + + $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"}] + + // Update the status For Certification $scope.statusUpdate = { submit: function (form, myStatusModel, localBranchDetails) { @@ -346,7 +366,11 @@ app.controller('certificationStatusCtrl', ["$scope", "toaster", "$filter", "ngTa }); function getStudentForUpdateDetails(id, bCode) { this.StudentID = id; - this.CourseID = $scope.myStatusModel.semYear; + // alert($scope.myStatusModel.semYear); + var courseID = JSON.parse($scope.myStatusModel.semYear); + var val = courseID.ID; + // alert(val); + this.CourseID = val; this.BranchCode = bCode; this.ListCode = $scope.myStatusModel.staus; this.SDate = $scope.myStatusModel.dateOn; @@ -354,7 +378,8 @@ app.controller('certificationStatusCtrl', ["$scope", "toaster", "$filter", "ngTa this.Comments = $scope.myStatusModel.comment; this.CertificateType = $scope.myStatusModel.certificatetype; this.CertificateNumber = $scope.myStatusModel.certificateNumber; - } + this.Sem = $scope.myStatusModel.sem === '' ? courseID.Sem_Year : $scope.myStatusModel.sem; + } var updateCertificateStatus = { method: 'POST', url: apiPoint.url + 'updateCertificationStatus/', @@ -391,7 +416,8 @@ app.controller('certificationStatusCtrl', ["$scope", "toaster", "$filter", "ngTa 'dateOn': '', 'comment': '', 'certificatetype': '', - 'certificateNumber': '' + 'certificateNumber': '', + 'sem':'' } } } diff --git a/Apollo/assets/js/controllers/studentCtrl.js b/Apollo/assets/js/controllers/studentCtrl.js index e08259c6..5c3d3207 100755 --- a/Apollo/assets/js/controllers/studentCtrl.js +++ b/Apollo/assets/js/controllers/studentCtrl.js @@ -930,7 +930,7 @@ app.controller('studentCtrl', ["$scope", "toaster", "$filter", "ngTableParams", if (res === true) { // alert(id); // alert(stuId); - $scope.documentAddDetailsLoading = true; + $scope.documentAddDetailsLoading = true; var deleteDocEntry = { method: 'POST', url: apiPoint.url + 'deleteStuDocDetails/', @@ -946,12 +946,12 @@ app.controller('studentCtrl', ["$scope", "toaster", "$filter", "ngTableParams", $http(deleteDocEntry).then(function (response) { if (response.data.deleteStatus == true) { // swal("Success!", response.data.message, "success"); - $scope.documentAddDetailsLoading = false; + $scope.documentAddDetailsLoading = false; $scope.studentDocumentsList = ''; $scope.getStuEntrollDocDetails(stuID); } else { swal(" ", res.data.message, "error"); - $scope.documentAddDetailsLoading = false; + $scope.documentAddDetailsLoading = false; } }); } @@ -972,11 +972,11 @@ app.controller('studentCtrl', ["$scope", "toaster", "$filter", "ngTableParams", $scope.filesDocuments[0] = args.file; }); }); - + $scope.documentAddDetailsLoading = false; $scope.studentEntrollDocFORM = { submit: function (form, myModelAddDocuments, stuID) { - + var firstError = null; if (form.$invalid) { var field = null, firstError = null; @@ -997,7 +997,7 @@ app.controller('studentCtrl', ["$scope", "toaster", "$filter", "ngTableParams", if ($scope.filesDocuments[0] == undefined || $scope.filesDocuments[0] == null || $scope.filesDocuments.length === 0) { swal("Warning!", "Choose the File.", "warning"); } else { - $scope.documentAddDetailsLoading = true; + $scope.documentAddDetailsLoading = true; var formData = new FormData(); var stuDocProof = $scope.filesDocuments[0]; var stuDocProofStatus = $scope.filesDocuments[0] !== undefined ? true : false; @@ -2158,6 +2158,161 @@ app.controller('studentSuperAdminCtrl', ["$scope", "toaster", "$filter", "ngTabl } + // start : entrollment document upload ============================= + + $scope.studentDocumentsList = ''; + // get Student Document Details + $scope.getStuEntrollDocDetails = function (stuId) { + // $scope.studentDocumentsList = ''; + var getStudentDocDetails = { + method: 'POST', + url: apiPoint.url + 'getListofStuDocDetails/', + headers: { + 'Content-Type': 'application/json' + }, + data: { + exceptId: stuId, + localData: localDetail + } + }; + $http(getStudentDocDetails).then(function (response) { + if (response.data.docListStatus == true) { + $scope.docNotFound = false; + $scope.studentDocumentsList = response.data.student_doc_details; + } else { + $scope.docNotFound = true; + $scope.studentDocumentsList.call(); + } + }); + } + + $scope.deleteDocDetails = function (id, stuID) { + SweetAlert.swal({ + title: "Warning!", + text: "Want to Delete this file ?", + type: "warning", + showCancelButton: true, + confirmButtonColor: "#007aff", + confirmButtonText: "Yes!" + }, function (res) { + if (res === true) { + // alert(id); + // alert(stuId); + $scope.documentAddDetailsLoading = true; + var deleteDocEntry = { + method: 'POST', + url: apiPoint.url + 'deleteStuDocDetails/', + headers: { + 'Content-Type': 'application/json' + }, + data: { + exceptId: stuID, + docDetailsID: id, + localData: localDetail + } + }; + $http(deleteDocEntry).then(function (response) { + if (response.data.deleteStatus == true) { + // swal("Success!", response.data.message, "success"); + $scope.documentAddDetailsLoading = false; + $scope.studentDocumentsList = ''; + $scope.getStuEntrollDocDetails(stuID); + } else { + swal(" ", res.data.message, "error"); + $scope.documentAddDetailsLoading = false; + } + }); + } + }); + } + + $scope.myModelAddDocuments = { + "documentName": "", + "documentComments": "" + } + + //an array of documents selected + $scope.filesDocuments = []; + //listen for the document selected event + $scope.$on("fileSelectedDocument", function (event, args) { + $scope.$apply(function () { + //add the file object to the scope's files collection + $scope.filesDocuments[0] = args.file; + }); + }); + + $scope.documentAddDetailsLoading = false; + $scope.studentEntrollDocFORM = { + submit: function (form, myModelAddDocuments, 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 { + + if ($scope.filesDocuments[0] == undefined || $scope.filesDocuments[0] == null || $scope.filesDocuments.length === 0) { + swal("Warning!", "Choose the File.", "warning"); + } else { + $scope.documentAddDetailsLoading = true; + var formData = new FormData(); + var stuDocProof = $scope.filesDocuments[0]; + var stuDocProofStatus = $scope.filesDocuments[0] !== undefined ? true : false; + + formData.append("data", JSON.stringify(myModelAddDocuments)); + formData.append("studentID", stuID); + formData.append("updatedBy", localDetails.localUserID); + formData.append('stuDocProof', stuDocProof); + formData.append('stuDocProof_Status', stuDocProofStatus); + + $http.post(apiPoint.url + 'addStudentEntrollDocDetails/', formData, { + transformRequest: angular.identity, + headers: { 'Content-Type': undefined, 'Process-Data': false }, + }).success(function (res) { + if (res.stuDocUpdateStatus == true) { + $scope.getStuEntrollDocDetails(stuID); + // swal(" ", "Updated successfully.", "success"); + $scope.documentAddDetailsLoading = false; + $scope.filesDocuments[0] = undefined; + form.$setPristine(true); + angular.element("input[type='file']").val(null); + $scope.myModelAddDocuments = { + "documentName": "", + "documentComments": "" + } + // $scope.getStudentList(); + // $scope.editId = -1; + // $scope.editSaveButtonDisable = false; + } else { + swal(" ", res.data.message, "error"); + $scope.documentAddDetailsLoading = false; + // $scope.editSaveButtonDisable = false; + } + }); + } + } + }, + reset: function (form) { + $scope.filesDocuments[0] = undefined; + form.$setPristine(true); + angular.element("input[type='file']").val(null); + } + } + + // end : entrollment document upload ==================================== + + $scope.stepsModelEdit = []; $scope.imageUploadEdit = function (event) { diff --git a/Apollo/assets/js/controllers/studyMaterialStatusCtrl.js b/Apollo/assets/js/controllers/studyMaterialStatusCtrl.js index 36b8aade..fa7dd404 100755 --- a/Apollo/assets/js/controllers/studyMaterialStatusCtrl.js +++ b/Apollo/assets/js/controllers/studyMaterialStatusCtrl.js @@ -74,7 +74,8 @@ app.controller('studyMaterialStatusCtrl', ["$scope", "toaster", "$filter", "ngTa 'semYear': '', 'staus': '', 'dateOn': '', - 'comment': '' + 'comment': '', + 'sem': '' } $scope.universityData = ''; @@ -229,7 +230,8 @@ app.controller('studyMaterialStatusCtrl', ["$scope", "toaster", "$filter", "ngTa 'semYear': '', 'staus': '', 'dateOn': '', - 'comment': '' + 'comment': '', + 'sem': '' } } else { $scope.OpenWindowStatus = false; @@ -286,6 +288,22 @@ app.controller('studyMaterialStatusCtrl', ["$scope", "toaster", "$filter", "ngTa } } + + $scope.showSingleLateralSemType = false; + + // sem year show when REGULAR or LATER ENTRY + $scope.getSemYearDropShowMethod = function(type) { + if(JSON.parse(type).SEM_YEAR_TYPE == "0"){ + // type is semester mode + $scope.showSingleLateralSemType = false; + } else { + $scope.showSingleLateralSemType = true; + } + } + + $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"}] $scope.statusUpdate = { submit: function (form, myStatusModel, localBranchDetails) { @@ -322,12 +340,17 @@ app.controller('studyMaterialStatusCtrl', ["$scope", "toaster", "$filter", "ngTa }); function getStudentForUpdateDetails(id, bCode) { this.StudentID = id; - this.CourseID = $scope.myStatusModel.semYear; + var courseID = JSON.parse($scope.myStatusModel.semYear); + // eval('var obj='+courseID); + // alert(courseID); + var val = courseID.ID; + this.CourseID = val; this.BranchCode = bCode; this.ListCode = $scope.myStatusModel.staus; this.SDate = $scope.myStatusModel.dateOn; this.Coursedetail = id; this.Comments = $scope.myStatusModel.comment; + this.Sem = $scope.myStatusModel.sem === '' ? courseID.Sem_Year : $scope.myStatusModel.sem; } var updateStudyMaterial = { method: 'POST', @@ -363,7 +386,8 @@ app.controller('studyMaterialStatusCtrl', ["$scope", "toaster", "$filter", "ngTa 'semYear': '', 'staus': '', 'dateOn': '', - 'comment': '' + 'comment': '', + 'sem': '' } } } diff --git a/Apollo/assets/views/status-update/answer_booklet_status.html b/Apollo/assets/views/status-update/answer_booklet_status.html index 1550e407..c2fb96d2 100755 --- a/Apollo/assets/views/status-update/answer_booklet_status.html +++ b/Apollo/assets/views/status-update/answer_booklet_status.html @@ -179,7 +179,9 @@ Updated By - {{s.Sem_Year}} + {{s.Sem_Year}} + ({{s.Sem}}) + {{s.ListName}} {{s.Comments}} {{s.AnsDate}} @@ -244,13 +246,26 @@ Sem/Year is Required +
+ + + + Sem is Required + +
Sem/Year is Required
+
+ + + + Sem is Required + +
--> -
-
+
+ + + + Sem is Required + +
--> -
-
+
+ + + + Sem is Required + +
+ Sem/Year is Required +
+
+ + + + Sem is Required +
-
+
+ Sem/Year is Required +
+
+ + + + Sem is Required +