From 1650a2dda641701a2646b8cee5ebfed7ec13612e Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Tue, 11 Sep 2018 18:22:39 +0530 Subject: [PATCH 1/8] Procedure changed for Student merge screen --- .../application/models/Data_correction.php | 24 +++++++++++-------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/Apollo/api/application/models/Data_correction.php b/Apollo/api/application/models/Data_correction.php index 179d3bd6..e7884a04 100644 --- a/Apollo/api/application/models/Data_correction.php +++ b/Apollo/api/application/models/Data_correction.php @@ -30,20 +30,24 @@ group by Student_id,cid"; Public function getMobile($deleteNo=null,$mergeNo=null) { - $sql = "call SP_MERGE_STUDENT_DATA('".$deleteNo."','".$mergeNo."',@countRow); + $sql = "call SP_MERGE_STUDENT_DATA('".$deleteNo."','".$mergeNo."',@err_meesage,@suc_message); "; - $a=$this->db->query($sql); - $sqlOut = " select @countRow as counts;"; - $b=$this->db->query($sqlOut); - $batch = $b->result(); - //echo $batch[0]->counts; - if ($batch[0]->counts > 0) { + $a=$this->db->query($sql); + //To get error message + $sql_err = " select @err_message as err_message;"; + $b=$this->db->query($sql_err); + $err_res = $b->result(); + //To get success message + $sqlOut = " select @suc_message as suc_message;"; + $c=$this->db->query($sqlOut); + $suc_res = $c->result(); + //echo $batch[0]->err_message; + if ($suc_res[0]->suc_message != null) { $results['MergeStatus'] = true; - $results['after_Merge'] = $batch; - $results['message'] = 'Student details successfully merged'; + $results['message'] = $suc_res[0]->suc_message; } else { $results['MergeStatus'] = false; - $results['message'] = 'Can not Merge'; + $results['message'] = $err_res[0]->err_message; } return $results; } From ca7a777aa38380e8983393e667848c98c16d273f Mon Sep 17 00:00:00 2001 From: dineshkumarkannan Date: Tue, 11 Sep 2018 18:40:30 +0530 Subject: [PATCH 2/8] form id update on date field changes , and comments added for the status update: kdk --- .../application/models/Receive_Enrolment_Fees_Univ_model.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 2a9f6068..1a7c99a4 100644 --- a/Apollo/api/application/models/Receive_Enrolment_Fees_Univ_model.php +++ b/Apollo/api/application/models/Receive_Enrolment_Fees_Univ_model.php @@ -1171,7 +1171,7 @@ $result['updatedraftStatus'] = false; // get formid status list for that particular record // kdk public function getFormIdDetailsStatusUpdateList($reqBranchData, $searchDetails){ - $selectQuery = "SELECT * , concat(t3.Firstname, '', t3.Lastname) as CreatedByName + $selectQuery = "SELECT t1.* , concat(t3.Firstname, '', t3.Lastname) as CreatedByName FROM T_FormId_FeeDetails_Received_From_University_StatusUpdate as t1 LEFT JOIN T_Login as t2 ON t1.CreatedBy = t2.ID LEFT JOIN T_StaffDetails as t3 ON t2.StaffID = t3.StaffID @@ -1197,6 +1197,8 @@ $result['updatedraftStatus'] = false; $newLeadDetails['FormIdDetailsID'] = $id; $newLeadDetails['FormID'] = $formId; $newLeadDetails['Status'] = $statusDetails['Status']; + $newLeadDetails['Comments'] = $statusDetails['Comments']; + $time = date('Y-m-d H:i:s'); $newLeadDetails['CreatedOn'] = $time; $newLeadDetails['CreatedBy'] = $reqBranchData['localUserID']; From a3231599149397045b818eabb452d04990b152ee Mon Sep 17 00:00:00 2001 From: dineshkumarkannan Date: Tue, 11 Sep 2018 18:52:33 +0530 Subject: [PATCH 3/8] mobile number , and studentid capture for the formid details list : kdk --- .../application/models/Receive_Enrolment_Fees_Univ_model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 1a7c99a4..175b5d71 100644 --- a/Apollo/api/application/models/Receive_Enrolment_Fees_Univ_model.php +++ b/Apollo/api/application/models/Receive_Enrolment_Fees_Univ_model.php @@ -1100,7 +1100,7 @@ $result['updatedraftStatus'] = false; // kdk public function getStudentUnivFormIdFeeDatailsList($reqBranchData, $searchDetails){ - $this->db->select('FUD.*, concat(ST.FirstName," ", ST.Lastname) as app_StudentName, IF(concat(ST.FirstName," " , ST.Lastname) = FUD.Student_Name, "YES", "NO") as StudentNameStatus , + $this->db->select('FUD.*, ST.MobileNumber, ST.StudentID, concat(ST.FirstName," ", ST.Lastname) as app_StudentName, IF(concat(ST.FirstName," " , ST.Lastname) = FUD.Student_Name, "YES", "NO") as StudentNameStatus , ST.Fathername as app_FatherName, IF(ST.Fathername = FUD.Father_Name, "YES", "NO") as FathernameStatus, CM.CourseCode as app_CourseCode, IF(CM.CourseCode = FUD.CourseCode, "YES", "NO" ) as CourseCodeStatus, IF(ENU.SemesterYear = FUD.Semester, "YES", "NO" ) as SemesterStatus'); From 7bbe8453be9c5889ad3dbc244cf053930a2416da Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Tue, 11 Sep 2018 18:53:00 +0530 Subject: [PATCH 4/8] student view in upload screens --- Apollo/assets/views/student/studentUnivFormIdFeeDetails.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Apollo/assets/views/student/studentUnivFormIdFeeDetails.html b/Apollo/assets/views/student/studentUnivFormIdFeeDetails.html index 403f1949..6ba93394 100644 --- a/Apollo/assets/views/student/studentUnivFormIdFeeDetails.html +++ b/Apollo/assets/views/student/studentUnivFormIdFeeDetails.html @@ -109,7 +109,7 @@ -
+
@@ -174,7 +174,7 @@
- {{p.FormID}} + {{p.FormID}} {{p.FormType}} From 8be7116af6273fd110015e7bac12794220e28e61 Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Tue, 11 Sep 2018 18:53:47 +0530 Subject: [PATCH 5/8] student view in upload screens --- .../Receive_Enrolment_Fees_Univ_model.php | 2 +- .../application/models/Studentview_model.php | 67 ++++++++- Apollo/assets/i18n/en.json | 2 +- .../studentUnivFormIdFeeDetailsCtrl.js | 131 +++++++++++++++++ .../student_university_fee_compare.js | 135 +++++++++++++++++- Apollo/assets/js/directives/compare-to.js | 18 +++ .../student/studentUnivFeeCompareDetails.html | 19 ++- 7 files changed, 360 insertions(+), 14 deletions(-) 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 2a9f6068..90704554 100644 --- a/Apollo/api/application/models/Receive_Enrolment_Fees_Univ_model.php +++ b/Apollo/api/application/models/Receive_Enrolment_Fees_Univ_model.php @@ -1360,7 +1360,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 @@
- +
- +
@@ -214,11 +214,11 @@
-
+
- @@ -239,9 +239,7 @@ - +
FormID + Form ID Enrollment ID
- {{p.FormID}} - {{p.FormID}} {{p.EnrolmentNo}} {{p.FormType}} @@ -295,7 +293,7 @@ - +