diff --git a/Apollo/assets/js/controllers/studentUnivFormIdFeeDetailsCtrl.js b/Apollo/assets/js/controllers/studentUnivFormIdFeeDetailsCtrl.js index e9f6ee38..7ec75d6d 100644 --- a/Apollo/assets/js/controllers/studentUnivFormIdFeeDetailsCtrl.js +++ b/Apollo/assets/js/controllers/studentUnivFormIdFeeDetailsCtrl.js @@ -8,22 +8,22 @@ app.controller('studentUnivFormIdFeeDetailsCtrl', ["$scope", "toaster", "$filter /** * student university fee details compare */ - + // get local client details var localDetail = JSON.parse(localStorage.getItem('localObj')); var localDetails = ipCookie('cookiechk'); // load when html page load $scope.init = function () { - - var logcheck = JSON.parse(localStorage.getItem('localObj')); - const LOCALTYPE = logcheck.localType; - if (logcheck != null && (LOCALTYPE == 'R003' || LOCALTYPE == 'R004' || LOCALTYPE == 'R002' || LOCALTYPE == 'R005')) { + var logcheck = JSON.parse(localStorage.getItem('localObj')); + + const LOCALTYPE = logcheck.localType; + if (logcheck != null && (LOCALTYPE == 'R003' || LOCALTYPE == 'R004' || LOCALTYPE == 'R002' || LOCALTYPE == 'R005')) { console.log("if"); - }else { - if(logcheck != null && LOCALTYPE !='R001') { - console.log("else if"); + } else { + if (logcheck != null && LOCALTYPE != 'R001') { + console.log("else if"); $state.go('app.dashboard'); } else { console.log("else else"); @@ -34,7 +34,7 @@ app.controller('studentUnivFormIdFeeDetailsCtrl', ["$scope", "toaster", "$filter if (localDetail != null) { if (localDetails.localType === 'R004') { - // $scope.getUniversityList(); + // $scope.getUniversityList(); $scope.getUniversitySearchList(); } else { ipCookie.remove('cookiechk'); @@ -65,7 +65,7 @@ app.controller('studentUnivFormIdFeeDetailsCtrl', ["$scope", "toaster", "$filter } }); }*/ - // get University List + // get University List $scope.universitySearchData = ''; $scope.getUniversitySearchList = function () { var empListreq = { @@ -82,21 +82,21 @@ app.controller('studentUnivFormIdFeeDetailsCtrl', ["$scope", "toaster", "$filter if (response.data.status) { $scope.universitySearchData = response.data.details; } else { - $scope.universitySearchData=""; + $scope.universitySearchData = ""; } }); }; - + $scope.searchData = { "University": "", "Session": "", "Status": "" } $scope.myUnivSearch = ""; - $scope.sessionData=""; + $scope.sessionData = ""; $scope.getUniveId = function (univ) { - $scope.sessionData=""; + $scope.sessionData = ""; if (univ === '') { $scope.myUnivSearch = ""; $scope.searchData.University = ''; @@ -121,26 +121,26 @@ app.controller('studentUnivFormIdFeeDetailsCtrl', ["$scope", "toaster", "$filter }; //For session dropdown - $scope.filterSessionDetails=""; - $scope.$watch('searchData.University', function (newValue,oldValue) { - if(newValue==undefined || newValue==''){ - $scope.filterSessionDetails=""; + $scope.filterSessionDetails = ""; + $scope.$watch('searchData.University', function (newValue, oldValue) { + if (newValue == undefined || newValue == '') { + $scope.filterSessionDetails = ""; } - else{ - if(angular.isString(newValue)){ - $scope.filterSessionDetails=angular.fromJson(newValue); + else { + if (angular.isString(newValue)) { + $scope.filterSessionDetails = angular.fromJson(newValue); } } }); - + $scope.Searchloader = false; $scope.studentData = false; - - $scope.onSubmit = function(){ + + $scope.onSubmit = function () { $scope.Searchloader = true; - if($scope.searchData.University !== '' && $scope.searchData.Session !==''){ + if ($scope.searchData.University !== '' && $scope.searchData.Session !== '') { $scope.Searchloader = true; var empListreq = { method: 'POST', @@ -166,13 +166,13 @@ app.controller('studentUnivFormIdFeeDetailsCtrl', ["$scope", "toaster", "$filter $scope.statusMessage = $scope.data.message; } }); - }else { + } else { } } $scope.editId = -1; - $scope.setEditId=function(id){ + $scope.setEditId = function (id) { $scope.editId = id; } @@ -184,89 +184,38 @@ app.controller('studentUnivFormIdFeeDetailsCtrl', ["$scope", "toaster", "$filter /* * upload options json * */ - $scope.uploadOptions=[{ + $scope.uploadOptions = [{ id: 1, name: 'Received Enrolment From University', }, - { - id: 2, - name: 'Received Fees From University' - }, + { + id: 2, + name: 'Received Fees From University' + }, ]; - /* - watch upload model for enable upload options - */ - $scope.showFile="0"; - $scope.$watchCollection('uploadModel', function (newValue,oldValue) { + /* + watch upload model for enable upload options + */ + $scope.showFile = "1"; + // $scope.$watchCollection('uploadModel', function (newValue, oldValue) { - if(newValue.university!='' && newValue.university!=null && newValue.uploadFor!='' && newValue.uploadFor=='1'){ - $scope.showFile="1"; + // if (newValue.university != '' && newValue.university != null) { + // $scope.showFile = "1"; + // } + // else { + // $scope.showFile = "0"; + // } - } - else if(newValue.university!='' && newValue.university!=null && newValue.uploadFor!='' && newValue.uploadFor=='2'){ - $scope.showFile="2"; - } - else{ - $scope.showFile="0"; - } + // }); - }); - - /* update received enrolment from university - * created by kms - * */ - $scope.extractDetails=""; - $scope.readXlsxDetails = function (workbook) { - /* DO SOMETHING WITH workbook HERE */ - for (var sheetName in workbook.Sheets) { - var jsonData = XLSX.utils.sheet_to_json(workbook.Sheets[sheetName]); - if(jsonData.length!=0){ - $scope.extractDetails=jsonData; - } - - } - $scope.error = function (e) { - /* DO SOMETHING WHEN ERROR IS THROWN */ - //console.log(e); - } - - } - - $scope.receiveEnrolmentDetails = function (details,uploadForDetails) { - var updateUniversityEnrolment = { - method: 'POST', - url: apiPoint.url + 'receiveEnrolmentFromUniv/', - headers: { - 'Content-Type': 'application/json' - }, - data: { - localDetails: localDetail, - details: details, - universityID: angular.fromJson(uploadForDetails.university).UniversityID, - universityName: angular.fromJson(uploadForDetails.university).UniversityName, - - } - }; - - $http(updateUniversityEnrolment).then(function (response) { - if (response.data.status == true) { - swal("", "Updated Successfully", "success"); - $state.go($state.current, {}, {reload: true}); - } else { - swal("", "Failed", "error"); - } - }); - } - // end - - $scope.extractFormIDDetails=""; + $scope.extractFormIDDetails = ""; $scope.readXlsxFormDetails = function (workbook) { - $scope.extractFormIDDetails=""; + $scope.extractFormIDDetails = ""; /* DO SOMETHING WITH workbook HERE */ for (var sheetName in workbook.Sheets) { var jsonData = XLSX.utils.sheet_to_json(workbook.Sheets[sheetName]); - if(jsonData.length!=0){ - $scope.extractFormIDDetails=jsonData; + if (jsonData.length != 0) { + $scope.extractFormIDDetails = jsonData; } } @@ -277,7 +226,7 @@ app.controller('studentUnivFormIdFeeDetailsCtrl', ["$scope", "toaster", "$filter } - $scope.receiveFormIdFeeDetails = function(details) { + $scope.receiveFormIdFeeDetails = function (details) { console.log(details); var updateUniversityEnrolment = { @@ -295,7 +244,7 @@ app.controller('studentUnivFormIdFeeDetailsCtrl', ["$scope", "toaster", "$filter $http(updateUniversityEnrolment).then(function (response) { if (response.data.stuFeeList == true) { swal("", "Updated Successfully", "success"); - $state.go($state.current, {}, {reload: true}); + $state.go($state.current, {}, { reload: true }); } else { swal("", "Failed", "error"); } @@ -304,13 +253,13 @@ app.controller('studentUnivFormIdFeeDetailsCtrl', ["$scope", "toaster", "$filter $scope.popupLoad = false; $scope.popupLoadData = false; - $scope.formPaymentDetails=""; - + $scope.formPaymentDetails = ""; + // Fee compare details get - $scope.getFeeCompareDetails = function(formId, enrolmentId){ + $scope.getFeeCompareDetails = function (formId, enrolmentId) { $scope.popupLoadData = false; - $scope.formPaymentDetails=""; + $scope.formPaymentDetails = ""; $scope.popupLoad = true; var getFeeCompareDetailsList = { method: 'POST', @@ -329,19 +278,19 @@ app.controller('studentUnivFormIdFeeDetailsCtrl', ["$scope", "toaster", "$filter if (response.data.status == true) { $scope.popupLoad = false; $scope.popupLoadData = true; - $scope.formPaymentDetails=response.data; + $scope.formPaymentDetails = response.data; } else { $scope.popupLoad = false; $scope.popupLoadData = true; - $scope.formPaymentDetails=response.data; + $scope.formPaymentDetails = response.data; } }); } $scope.unMatchedLoadingStatus = false; // Get unmached details - $scope.getUnmatchedRecord = function(ss){ + $scope.getUnmatchedRecord = function (ss) { $scope.unMatchedRecordDetails = ''; $scope.unMatchedNoRecordFound = false; $scope.unMatchedLoadingStatus = true; @@ -361,14 +310,53 @@ app.controller('studentUnivFormIdFeeDetailsCtrl', ["$scope", "toaster", "$filter if (response.data.unMatchedRecordStatus == true) { $scope.unMatchedLoadingStatus = false; $scope.unMatchedNoRecordFound = false; - $scope.unMatchedRecordDetails=response.data.unMatchedRecordDetails; - $scope.unMatchedRecordDetailsType= response.data.unMatchedRecordFor; + $scope.unMatchedRecordDetails = response.data.unMatchedRecordDetails; + $scope.unMatchedRecordDetailsType = response.data.unMatchedRecordFor; } else { $scope.unMatchedLoadingStatus = false; $scope.unMatchedNoRecordFound = true; - $scope.unMatchedRecordDetails=response.data.unMatchedRecordDetails; + $scope.unMatchedRecordDetails = response.data.unMatchedRecordDetails; } }); } + // get subtab details for the formid fee details get form the university + + $scope.subTabActive= function(tab){ + if( tab == 'subTabactive2'){ + getDraftFormIdDetails(); + } + } + + // get draft form id details + function getDraftFormIdDetails(){ + // $scope.unMatchedRecordDetails = ''; + // $scope.unMatchedNoRecordFound = false; + // $scope.unMatchedLoadingStatus = true; + // var getDetailsFor = ss == 1 ? 'EnrolmentIDFile' : 'FormIDFile'; + // var getFeeCompareDetailsList = { + // method: 'POST', + // url: apiPoint.url + 'getUnmatchedRecordDetails/', + // headers: { + // 'Content-Type': 'application/json' + // }, + // data: { + // localDetails: localDetail, + // getDetailsFor: getDetailsFor + // } + // }; + // $http(getFeeCompareDetailsList).then(function (response) { + // if (response.data.unMatchedRecordStatus == true) { + // $scope.unMatchedLoadingStatus = false; + // $scope.unMatchedNoRecordFound = false; + // $scope.unMatchedRecordDetails = response.data.unMatchedRecordDetails; + // $scope.unMatchedRecordDetailsType = response.data.unMatchedRecordFor; + // } else { + // $scope.unMatchedLoadingStatus = false; + // $scope.unMatchedNoRecordFound = true; + // $scope.unMatchedRecordDetails = response.data.unMatchedRecordDetails; + // } + // }); + } + }]); diff --git a/Apollo/assets/views/student/studentUnivFormIdFeeDetails.html b/Apollo/assets/views/student/studentUnivFormIdFeeDetails.html index c11df1e9..962b0e68 100644 --- a/Apollo/assets/views/student/studentUnivFormIdFeeDetails.html +++ b/Apollo/assets/views/student/studentUnivFormIdFeeDetails.html @@ -16,7 +16,6 @@ $("#selectBranch").focus(); }); -
| FormID - | -Form Type - | -Student Name - | -Father Name - | -University - | -Course - | -Sem/Year - | -Enrolment ID - | -University Paid - | -Student Paid - | -||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| - {{p.FormID}} - | -- {{p.FormType}} - | -
-
+
+
+
+
+ Loading...+{{statusMessage}}+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ |
| FormID | +EnrolmentNo | +RollNo | +CentreCode | +CentreState | +MobileNumber | +StudentName | +FatherName | +MotherName | +EmailID | +UniversityCode | +UniversityName | +CourseCode | +CourseName | +SemesterYear | + + +
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| {{p.FormID}} | +{{p.EnrolmentNo}} | +{{p.RollNo}} | +{{p.CentreCode}} | +{{p.CentreState}} | +{{p.MobileNumber}} | +{{p.StudentName}} | +{{p.FatherName}} | +{{p.MotherName}} | +{{p.EmailID}} | +{{p.UniversityCode}} | +{{p.UniversityName}} | +{{p.CourseCode}} | +{{p.CourseName}} | +{{p.SemesterYear}} | +
| FormID | +FormType | +CentreCode | +CourseCode | +ActualCourseFee | +CourseFee | +Amount | + + +
|---|---|---|---|---|---|---|
| {{p.FormID}} | +{{p.FormType}} | +{{p.CentreCode}} | +{{p.CourseCode}} | +{{p.ActualCourseFee}} | +{{p.CourseFee}} | +{{p.Amount}} | +
| FormID | -EnrolmentNo | -RollNo | -CentreCode | -CentreState | -MobileNumber | -StudentName | -FatherName | -MotherName | -EmailID | -UniversityCode | -UniversityName | -CourseCode | -CourseName | -SemesterYear | - - -
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| {{p.FormID}} | -{{p.EnrolmentNo}} | -{{p.RollNo}} | -{{p.CentreCode}} | -{{p.CentreState}} | -{{p.MobileNumber}} | -{{p.StudentName}} | -{{p.FatherName}} | -{{p.MotherName}} | -{{p.EmailID}} | -{{p.UniversityCode}} | -{{p.UniversityName}} | -{{p.CourseCode}} | -{{p.CourseName}} | -{{p.SemesterYear}} | -
| FormID | -FormType | -CentreCode | -CourseCode | -ActualCourseFee | -CourseFee | -Amount | - - -
|---|---|---|---|---|---|---|
| {{p.FormID}} | -{{p.FormType}} | -{{p.CentreCode}} | -{{p.CourseCode}} | -{{p.ActualCourseFee}} | -{{p.CourseFee}} | -{{p.Amount}} | -