diff --git a/Apollo/api/application/models/Receive_Enrolment_Fees_Univ_model.php b/Apollo/api/application/models/Receive_Enrolment_Fees_Univ_model.php index 175b5d71..6b384aa0 100644 --- a/Apollo/api/application/models/Receive_Enrolment_Fees_Univ_model.php +++ b/Apollo/api/application/models/Receive_Enrolment_Fees_Univ_model.php @@ -1362,7 +1362,7 @@ $result['updatedraftStatus'] = false; $this->db->join(FORMFEESRECEIVEDFROMUNIV.' as UNFR', 'UNFR.ID = UNCD.FormMapID','left'); $this->db->join(UNIVERSITYPAYMENT.' as UNP', 'UNP.PID = UNCD.PaymentMapID','left'); $this->db->join(ENROLMENTRECEIVEDFROMUNIV.' as ENU', 'ENU.FormID = UNFR.FormID','left'); - $this->db->order_by('UNCD.ApprovedDate','DESC'); + $this->db->order_by('UNCD.ApprovedDate','ASC'); $this->db->where('UNCD.UniversityCode',$search['UniversityCode']); $this->db->order_by('UNCD.UniversityName',$search['UniversityName']); $details = $this->db->get(); diff --git a/Apollo/api/application/models/Studentview_model.php b/Apollo/api/application/models/Studentview_model.php index 384bffba..bf5d2a51 100755 --- a/Apollo/api/application/models/Studentview_model.php +++ b/Apollo/api/application/models/Studentview_model.php @@ -73,13 +73,31 @@ class Studentview_model extends CI_Model $result['studentInfo'] = ""; } } + // requestedFrom 4 for based on form get student details + else if ($requestFrom =='4'){ + $this->db->select('ST.*'); + $this->db->from( LOGIN . ' as LO'); + $this->db->join( STUDENTS . ' as ST', 'LO.StaffID = ST.StudentID'); + $this->db->join( STUDENTCOURSE . ' as STC', 'STC.StudentID = ST.StudentID'); + $this->db->where('ST.MobileNumber', $requestedBy); + $studentDetails = $this->db->get()->first_row(); + if($studentDetails){ + $result['studentStatus'] = true; + $result['studentDetails'] = $studentDetails; + // get student course details + $result['courseDetails'] = $this->getFormStudentCourse($studentDetails->StudentID,$requestFrom); + } + else{ + $result['studentStatus'] = false; + $result['studentInfo'] = ""; + } + } return $result; } public function getStudentCourseStudentLogin($studentId=null,$requestFrom=null,$requestedBranch=null,$accessFrom=null){ - // this sub query for avoid university duplicate id $this->db->select('SCU.EnrollmentID,CU.CourseID,CU.CourseName,US.UniversityID,US.UniversityName,US.UniversityShortName'); $this->db->from( STUDENTCOURSE . ' as SCU'); @@ -189,6 +207,53 @@ class Studentview_model extends CI_Model return $studentCourseStatus; } + /* + * get student course details + * created by kms + * */ + public function getFormStudentCourse($studentId=null,$requestFrom=null){ + $this->db->select('SCU.EnrollmentID,CU.CourseID,CU.CourseName,US.UniversityID,US.UniversityName,US.UniversityShortName'); + $this->db->from( STUDENTCOURSE . ' as SCU'); + $this->db->join( COURSE . ' as CU', 'CU.CourseID = SCU.CourseID'); + $this->db->join( UNIVERSITY . ' as US', 'US.UniversityID = SCU.UniversityID AND SCU.BranchID=US.BranchCode'); + $this->db->where('SCU.StudentID',$studentId); + $courseDetails = $this->db->get(); + if($courseDetails->result()){ + $studentCourseStatus['status'] = true; + foreach ($courseDetails->result() as $row){ + $fetchData['CourseID']=$row->CourseID; + $fetchData['CourseName']=$row->CourseName; + $fetchData['UniversityID']=$row->UniversityID; + $fetchData['UniversityName']=$row->UniversityName; + $fetchData['UniveShortName'] = $row->UniversityShortName; + // $fetchData['SessionName']=$row->SessionName; + $fetchData['EnrollmentID']=$row->EnrollmentID; + // get student fees details + $fetchData['feesDetails']=$this->getStudentFeesDetails($studentId,$row->CourseID); + // get student boollet details + $fetchData['studyMaterialDetails']=$this->getStudentMaterialDetails($studentId,$row->CourseID); + // get application details + if($requestFrom!='2'){ + $fetchData['applicationDetails']=$this->getStudentApplicationDetails($studentId,$row->CourseID); + $fetchData['answerbookletDetails']=$this->getStudentAnswerbookletDetails($studentId,$row->CourseID); + } + $fetchData['certificateDetails']=$this->getStudentCertificateDetails($studentId,$row->CourseID); + + // get student Mark crad details + $fetchData['markCardDetails']=$this->getMarkcardDetails($studentId,$row->CourseID); + + $CourseArray[]=$fetchData; + + + } + $studentCourseStatus['courseStatus'] = $CourseArray; + } + else{ + $studentCourseStatus['status'] = false; + } + + return $studentCourseStatus; + } /* * get student fees details diff --git a/Apollo/assets/i18n/en.json b/Apollo/assets/i18n/en.json index 610733c7..a5c1a988 100755 --- a/Apollo/assets/i18n/en.json +++ b/Apollo/assets/i18n/en.json @@ -121,7 +121,7 @@ "formupload": { "MAIN": "UNIVERSITY FORMS", "ENROLLMENT": "Enrollment", - "STUDENTFEEDETAILCOMPARE": "Form Enrolment", + "STUDENTFEEDETAILCOMPARE": "Form Enrollment", "STUDENTFROMIDFEEDETAILS": "Form Fees", "UNIVERSITYFORMPAYMENT": "Payment" }, diff --git a/Apollo/assets/js/controllers/studentUnivFormIdFeeDetailsCtrl.js b/Apollo/assets/js/controllers/studentUnivFormIdFeeDetailsCtrl.js index 7b561b1e..f9668e5a 100644 --- a/Apollo/assets/js/controllers/studentUnivFormIdFeeDetailsCtrl.js +++ b/Apollo/assets/js/controllers/studentUnivFormIdFeeDetailsCtrl.js @@ -726,3 +726,134 @@ $scope.exportDataTab3 = function () { } }]); +/*modal controller + * */ +app.controller('studentModalDemoCtrl', ["$scope", "$rootScope", "$modal", "$log", "API_POINTS", "$http", function ($scope, $rootScope, $modal, $log,apiPoint,$http) { + //Tooltip for print button + $scope.dynamicTooltip = 'Student View'; + + + + // $scope.items = ['item1', 'item2', 'item3']; + + $scope.open = function (studentDetails) { + // get student view details + var getcourse = { + method: 'POST', + url: apiPoint.url + 'getStudentBasicInfo/', + headers: { + 'Content-Type': 'application/json' + }, + data: { + requestedBy :studentDetails.MobileNumber, + requestedFrom: 4, + branchCode : JSON.parse(localStorage.getItem('localObj')).localBranchID + + } + }; + $http(getcourse).then(function (response) { + + if (response.data.status == 200 && response.data.studentStatus== true) { + $scope.courseEditLoading = false; + // $scope.studentDetails = response.data.studentDetails; + $scope.studentDetails = response.data; + // $scope.courseDetails = response.data.courseDetails; + var modalInstance = $modal.open({ + templateUrl: 'assets/views/student/studentDetailsModal.html', + controller: 'ModalInstanceCtrl', + // size: size, + resolve: { + items: function () { + return $scope.studentDetails; + } + } + }); + + modalInstance.result.then(function (selectedItem) { + $scope.selected = selectedItem; + }, function () { + modalInstance.close(); + }); + + } else { + swal("Failed!", "This student is not registerd", "warning"); + $scope.courseEditLoading = false; + $scope.studentDetails = ""; + $scope.courseDetails = ""; + + } + }); + }; + $scope.open1 = function (values,type) { + + var modalInstance1 = $modal.open({ + templateUrl: 'assets/views/student/studentPaymentModal.html', + controller: 'ModalInstanceCtrl1', + // size: size, + resolve: { + items1: function () { + var myvalues = + { + "values":values, + "type":type + }; + return myvalues; + } + + } + }); + + modalInstance1.result.then(function (selectedItem) { + $scope.selected = selectedItem; + }, function () { + modalInstance1.close(); + }); + }; + $scope.printStudentDetails = function (details) { + $rootScope.pdfItems = details; + + var printInstance = $modal.open({ + templateUrl: 'assets/views/student/studentPdf.html', + controller: 'studentModalDemoCtrl', + }); + }; + // generate pdf for student view + $scope.export = function(getName) { + kendo.drawing.drawDOM($("#exportthis")).then(function(group) { + kendo.drawing.pdf.saveAs(group, getName+".pdf"); + }); + } + +}]); +// Please note that $modalInstance represents a modal window (instance) dependency. +// It is not the same as the $modal service used above. + +app.controller('ModalInstanceCtrl', ["$scope", "$modalInstance", "items","WordsService", function ($scope, $modalInstance, items,WordsService) { + + $scope.items = items; + $scope.selected = { + item: $scope.items[0] + }; + + $scope.ok = function () { + $modalInstance.close($scope.selected.item); + }; + + $scope.cancel = function () { + $modalInstance.dismiss('cancel'); + }; +}]); +app.controller('ModalInstanceCtrl1', ["$scope", "$modalInstance", "items1","WordsService", function ($scope, $modalInstance, items1,WordsService) { + + $scope.items1 = items1.values; + $scope.selectedtype = items1.type; + + $scope.ok = function () { + $modalInstance.close($scope.selected.item); + }; + + $scope.cancel = function () { + $modalInstance.dismiss('cancel'); + }; + +}]); diff --git a/Apollo/assets/js/controllers/student_university_fee_compare.js b/Apollo/assets/js/controllers/student_university_fee_compare.js index 7da5390d..597fed50 100644 --- a/Apollo/assets/js/controllers/student_university_fee_compare.js +++ b/Apollo/assets/js/controllers/student_university_fee_compare.js @@ -4,7 +4,7 @@ * Simple table with sorting and filtering on AngularJS */ -app.controller('student_university_fee_compareCtrl', ["$scope", "toaster", "$filter", "ngTableParams", "$http", "API_POINTS", "$state", '$rootScope', '$cookies', 'md5', 'ipCookie', '$timeout', '$window', "flowFactory", "$interval", 'SweetAlert', function ($scope, toaster, $filter, ngTableParams, $http, apiPoint, $state, $rootScope, $cookies, md5, ipCookie, $timeout, $window, flowFactory, $interval, SweetAlert) { +app.controller('student_university_fee_compareCtrl', ["$scope", "toaster", "$filter", "ngTableParams", "$http", "API_POINTS", "$state", '$rootScope', '$cookies', 'md5', 'ipCookie', '$timeout', '$window', "flowFactory", "$interval", 'SweetAlert', '$modal', function ($scope, toaster, $filter, ngTableParams, $http, apiPoint, $state, $rootScope, $cookies, md5, ipCookie, $timeout, $window, flowFactory, $interval, SweetAlert, $modal) { /** * student university fee details compare */ @@ -499,4 +499,137 @@ app.controller('student_university_fee_compareCtrl', ["$scope", "toaster", "$fil } + }]); +/*modal controller + * */ +app.controller('studentModalDemoCtrl', ["$scope", "$rootScope", "$modal", "$log", "API_POINTS", "$http", function ($scope, $rootScope, $modal, $log,apiPoint,$http) { + //Tooltip for print button + $scope.dynamicTooltip = 'Student View'; + + + + // $scope.items = ['item1', 'item2', 'item3']; + + $scope.open = function (studentDetails) { + // get student view details + var getcourse = { + method: 'POST', + url: apiPoint.url + 'getStudentBasicInfo/', + headers: { + 'Content-Type': 'application/json' + }, + data: { + requestedBy :studentDetails.MobileNumber, + requestedFrom: 4, + branchCode : JSON.parse(localStorage.getItem('localObj')).localBranchID + + } + }; + $http(getcourse).then(function (response) { + + if (response.data.status == 200 && response.data.studentStatus== true) { + $scope.courseEditLoading = false; + // $scope.studentDetails = response.data.studentDetails; + $scope.studentDetails = response.data; + // $scope.courseDetails = response.data.courseDetails; + var modalInstance = $modal.open({ + templateUrl: 'assets/views/student/studentDetailsModal.html', + controller: 'ModalInstanceCtrl', + // size: size, + resolve: { + items: function () { + return $scope.studentDetails; + } + } + }); + + modalInstance.result.then(function (selectedItem) { + $scope.selected = selectedItem; + }, function () { + modalInstance.close(); + }); + + } else { + swal("Failed!", "This student is not registerd", "warning"); + $scope.courseEditLoading = false; + $scope.studentDetails = ""; + $scope.courseDetails = ""; + + } + }); + }; + $scope.open1 = function (values,type) { + + var modalInstance1 = $modal.open({ + templateUrl: 'assets/views/student/studentPaymentModal.html', + controller: 'ModalInstanceCtrl1', + // size: size, + resolve: { + items1: function () { + var myvalues = + { + "values":values, + "type":type + }; + return myvalues; + } + + } + }); + + modalInstance1.result.then(function (selectedItem) { + $scope.selected = selectedItem; + }, function () { + modalInstance1.close(); + }); + }; + $scope.printStudentDetails = function (details) { + $rootScope.pdfItems = details; + + var printInstance = $modal.open({ + templateUrl: 'assets/views/student/studentPdf.html', + controller: 'studentModalDemoCtrl', + }); + }; + // generate pdf for student view + $scope.export = function(getName) { + kendo.drawing.drawDOM($("#exportthis")).then(function(group) { + kendo.drawing.pdf.saveAs(group, getName+".pdf"); + }); + } + +}]); +// Please note that $modalInstance represents a modal window (instance) dependency. +// It is not the same as the $modal service used above. + +app.controller('ModalInstanceCtrl', ["$scope", "$modalInstance", "items","WordsService", function ($scope, $modalInstance, items,WordsService) { + + $scope.items = items; + $scope.selected = { + item: $scope.items[0] + }; + + $scope.ok = function () { + $modalInstance.close($scope.selected.item); + }; + + $scope.cancel = function () { + $modalInstance.dismiss('cancel'); + }; +}]); +app.controller('ModalInstanceCtrl1', ["$scope", "$modalInstance", "items1","WordsService", function ($scope, $modalInstance, items1,WordsService) { + + $scope.items1 = items1.values; + $scope.selectedtype = items1.type; + + $scope.ok = function () { + $modalInstance.close($scope.selected.item); + }; + + $scope.cancel = function () { + $modalInstance.dismiss('cancel'); + }; + +}]); + diff --git a/Apollo/assets/js/directives/compare-to.js b/Apollo/assets/js/directives/compare-to.js index 5b4ddb8d..1ec7a225 100755 --- a/Apollo/assets/js/directives/compare-to.js +++ b/Apollo/assets/js/directives/compare-to.js @@ -48,4 +48,22 @@ app.directive('disallowSpaces', function() { }); } }; +}); +app.filter('unique', function() { + return function(collection, primaryKey, secondaryKey) { //optional secondary key + var output = [], + keys = []; + + angular.forEach(collection, function(item) { + var key; + secondaryKey === undefined ? key = item[primaryKey] : key = item[primaryKey][secondaryKey]; + + if(keys.indexOf(key) === -1) { + keys.push(key); + output.push(item); + } + }); + + return output; + }; }); \ No newline at end of file diff --git a/Apollo/assets/views/student/studentUnivFeeCompareDetails.html b/Apollo/assets/views/student/studentUnivFeeCompareDetails.html index 08d5c891..86720fc2 100644 --- a/Apollo/assets/views/student/studentUnivFeeCompareDetails.html +++ b/Apollo/assets/views/student/studentUnivFeeCompareDetails.html @@ -43,7 +43,7 @@
| FormID + | Form ID | Enrollment ID | @@ -239,9 +239,7 @@|
|---|---|---|---|
| - {{p.FormID}} - | +{{p.FormID}} | {{p.EnrolmentNo}} |
{{p.FormType}}
@@ -295,7 +293,7 @@
- |