From f0aeb0cbfeb1aff27be2b3fe9873fa87d14b638f Mon Sep 17 00:00:00 2001 From: velz Date: Thu, 9 Aug 2018 20:08:39 +0530 Subject: [PATCH] HALLTICKET SEMMAPPING BATCHSCHDEULE PROMOTEBATCH EXAMATTENDANCE PROD ISSUES FIXED --- .../controllers/HallTickets_Controller.php | 2 + .../application/models/Hallticket_model.php | 4 +- .../assets/js/controllers/BatchmomentCtrl.js | 8 ++- .../js/controllers/examAttendanceCtrl.js | 15 ++-- .../js/controllers/generateHallTicketCtrl.js | 41 ++++++----- Apollo/assets/js/controllers/schCtrl.js | 71 +++++++++++++++++-- .../assets/views/hallticket/batchshedule.html | 37 ++++++---- .../assets/views/hallticket/editShedule.html | 38 ++++++---- .../views/hallticket/hallTicketPDF.html | 14 ++-- Apollo/assets/views/partials/nav.html | 43 ++++++----- .../views/reregistration/promotebatch.html | 9 +++ 11 files changed, 194 insertions(+), 88 deletions(-) diff --git a/Apollo/api/application/controllers/HallTickets_Controller.php b/Apollo/api/application/controllers/HallTickets_Controller.php index 2a10bec0..1ddb8a7d 100755 --- a/Apollo/api/application/controllers/HallTickets_Controller.php +++ b/Apollo/api/application/controllers/HallTickets_Controller.php @@ -427,6 +427,8 @@ class HallTickets_Controller extends REST_Controller { $center = $this->post('center'); //print_r($center);die(); $res = $this->Hallticket_model->getStudentListForHallTicketmodel($UID,$courseID,$batch,$requestedBy,$branchId,$center); + // echo "CON"; + // print_r($res);die(); if(count($res) > 0) { $data['status'] = REST_Controller::HTTP_OK; diff --git a/Apollo/api/application/models/Hallticket_model.php b/Apollo/api/application/models/Hallticket_model.php index 1e6142b1..ed4d9859 100755 --- a/Apollo/api/application/models/Hallticket_model.php +++ b/Apollo/api/application/models/Hallticket_model.php @@ -697,7 +697,7 @@ class Hallticket_model extends CI_Model $this->db->select('T_StudentDetails.StudentID,T_StudentDetails.MobileNumber,T_StudentDetails.Firstname,T_StudentDetails.Lastname,T_StudentDetails.EmailID,T_StudentDetails.ProfilePicPath,T_Student_CourseDetails.EnrollmentID,T_Hallticket_Master.HallTicket_ID,T_Hallticket_Student_Details.HallTicket_ID as isFlag'); $this->db->from('T_Students_Fees_Status'); $this->db->join('T_StudentDetails','T_Students_Fees_Status.StudentID=T_StudentDetails.StudentID and T_StudentDetails.IsActive = 1'); - $this->db->join('T_Student_CourseDetails','T_StudentDetails.StudentID = T_Student_CourseDetails.StudentID'); + $this->db->join('T_Student_CourseDetails','T_StudentDetails.StudentID = T_Student_CourseDetails.StudentID and T_Students_Fees_Status.CourseID = T_Student_CourseDetails.CourseID'); $this->db->join('T_Hallticket_Master','T_Students_Fees_Status.CourseID = T_Hallticket_Master.CourseID and T_Students_Fees_Status.BatchCode = T_Hallticket_Master.BatchCode and T_Students_Fees_Status.BranchCode = T_Hallticket_Master.BranchCode and T_Hallticket_Master.CenterID='.$center['CenterID'],'left'); $this->db->join('T_Hallticket_Student_Details','T_Hallticket_Master.HallTicket_ID = T_Hallticket_Student_Details.HallTicket_ID and T_Students_Fees_Status.StudentID = T_Hallticket_Student_Details.StudentID','left'); $this->db->where('T_Students_Fees_Status.BatchCode',$batch); @@ -706,7 +706,7 @@ class Hallticket_model extends CI_Model $res = $this->db->get(); $data = $res->result(); - //print_r($data);die(); + $result_array = array(); if(count($data) > 0) { diff --git a/Apollo/assets/js/controllers/BatchmomentCtrl.js b/Apollo/assets/js/controllers/BatchmomentCtrl.js index 7041168e..394d3892 100644 --- a/Apollo/assets/js/controllers/BatchmomentCtrl.js +++ b/Apollo/assets/js/controllers/BatchmomentCtrl.js @@ -14,6 +14,7 @@ app.controller('BatchmomentCtrl', ["$scope","$rootScope","toaster", "$filter", " $scope.isTblShow = false; $scope.isLoader = false; $scope.isLoaderShow = false; +$scope.isSubLoaderShow = false; $scope.isLoaderTxt = "Loading..."; $scope.isShowNxtBatch = false; $scope.getStudentButtonTxt = 'GET STUDENTS'; @@ -71,6 +72,7 @@ $scope.promoteButtonStatus = false; $scope.getStudentButtonTxt = 'PLEASE WAIT'; $scope.selectedStudentsID = []; $scope.isLoaderShow = true; + $scope.isSubLoaderShow = false; $scope.myModel.all = false; $scope.isTblShow = false; var university = $scope.myModel.universityName; @@ -101,16 +103,18 @@ $scope.promoteButtonStatus = false; { $scope.studentInfo=""; $scope.isLoaderShow = true; + $scope.isSubLoaderShow = true; $scope.isTblShow = false; - $scope.isLoaderTxt = "No Records Found/ No Next Batch available"; + $scope.isLoaderTxt = "No Records Found"; $scope.isShowNxtBatch = false; $scope.nextBatchDetails = ""; $scope.getStudentButtonTxt = 'GET STUDENTS'; } },function(error){ $scope.isLoaderShow = true; + $scope.isSubLoaderShow = true; $scope.isTblShow = false; - $scope.isLoaderTxt = "No Records Found/ No Next Batch available"; + $scope.isLoaderTxt = "No Records Found"; $scope.isShowNxtBatch = false; $scope.nextBatchDetails = ""; $scope.getStudentButtonTxt = 'GET STUDENTS'; diff --git a/Apollo/assets/js/controllers/examAttendanceCtrl.js b/Apollo/assets/js/controllers/examAttendanceCtrl.js index 006efbb9..97ecdd1c 100644 --- a/Apollo/assets/js/controllers/examAttendanceCtrl.js +++ b/Apollo/assets/js/controllers/examAttendanceCtrl.js @@ -143,11 +143,12 @@ $scope.isLoaderTxt = "Loading..."; $scope.studentInfoPM = []; angular.forEach($scope.studentInfo,function(value,key){ - var dateType = $filter('date')(new Date(value.FromTime),'a'); - if(dateType == "AM") + //var dateType = $filter('date')(new Date(value.FromTime),'a'); + var dateType = value.FromTime.substr(-2); + if(dateType == "AM" || dateType == "am") { $scope.studentInfoAM.push(value); - }else if(dateType == "PM") + }else if(dateType == "PM" || dateType == "pm") { $scope.studentInfoPM.push(value); } @@ -269,17 +270,17 @@ $scope.isLoaderTxt = "Loading..."; var headerAM = function(data) { var heading = $rootScope.pdfuname+' '+$rootScope.pdfbatch+' Examination'+' '+'Center'+' '+$rootScope.pdfcenter['CenterName']+" - "+ 'Attendance of '+$scope.pdfExamDateToDisplay+'Fore Noon Session'; - doc1.setFontSize(12); + doc1.setFontSize(9); doc1.setFontStyle('bold'); - doc1.text(120,30,heading); + doc1.text(50,30,heading); }; var headerPM = function(data) { var heading = $rootScope.pdfuname+' '+$rootScope.pdfbatch+' Examination'+' '+'Center'+' '+$rootScope.pdfcenter['CenterName']+" - "+ 'Attendance of '+$scope.pdfExamDateToDisplay+'After Noon Session'; - doc2.setFontSize(12); + doc2.setFontSize(9); doc2.setFontStyle('bold'); - doc2.text(120,30,heading); + doc2.text(50,30,heading); }; diff --git a/Apollo/assets/js/controllers/generateHallTicketCtrl.js b/Apollo/assets/js/controllers/generateHallTicketCtrl.js index 0853d293..29d58d5a 100755 --- a/Apollo/assets/js/controllers/generateHallTicketCtrl.js +++ b/Apollo/assets/js/controllers/generateHallTicketCtrl.js @@ -460,20 +460,21 @@ app.controller('HallTicketPDFCtrl', ["$scope", "$modalInstance", "pdfitems", fun doc.addImage(dataURL, 'jpeg', 75, 35, 50, 50);//university logo location doc.addImage(profiledataURL, 'jpeg', 470, 100, 60, 60);//student profile location - doc.setFontSize(22); - doc.text(160,50,$scope.universityNamePDF); - doc.setFontSize(10); + doc.setFontSize(16); + doc.text(150,50,$scope.universityNamePDF); + doc.setFontSize(8); doc.text(160,65,$scope.universityAddressPDF); - doc.setFontSize(10); + doc.setFontSize(8); doc.text(160,88,$scope.universityEmailPDF); doc.rect(45, 100, 400, 60); doc.rect(445, 100, 100, 60); doc.line(45, 125, 445, 125); - doc.setFontSize(10); + doc.setFontSize(8); doc.setFontType("bold"); - doc.text(80,115,examName); + doc.text(50,115,examName); + doc.setFontSize(10); doc.setFontType("normal"); doc.text(50,140,rollNo); doc.text(230,140,stuName); @@ -683,20 +684,21 @@ app.controller('HallTicketPDFCtrl', ["$scope", "$modalInstance", "pdfitems", fun doc.addImage(dataURL, 'jpeg', 75, 35, 50, 50);//university logo location doc.addImage(profiledataURL, 'jpeg', 470, 100, 60, 60);//student profile location - doc.setFontSize(22); - doc.text(160,50,$scope.universityNamePDF); - doc.setFontSize(10); + doc.setFontSize(16); + doc.text(150,50,$scope.universityNamePDF); + doc.setFontSize(8); doc.text(160,65,$scope.universityAddressPDF); - doc.setFontSize(10); + doc.setFontSize(8); doc.text(160,88,$scope.universityEmailPDF); doc.rect(45, 100, 400, 60); doc.rect(445, 100, 100, 60); doc.line(45, 125, 445, 125); - doc.setFontSize(10); + doc.setFontSize(8); doc.setFontType("bold"); - doc.text(80,115,examName); + doc.text(50,115,examName); + doc.setFontSize(10); doc.setFontType("normal"); doc.text(50,140,rollNo); doc.text(230,140,stuName); @@ -757,7 +759,7 @@ app.controller('HallTicketPDFCtrl', ["$scope", "$modalInstance", "pdfitems", fun else if(hallticket_type == 'SEM' ){ - console.log('SEM'); + console.log('SEM*********df;lsjfo'); var semlength = value.FeeDetails.length; var i = 0; @@ -859,21 +861,22 @@ app.controller('HallTicketPDFCtrl', ["$scope", "$modalInstance", "pdfitems", fun doc.addImage(dataURL, 'jpeg', 75, 35, 50, 50);//university logo location doc.addImage(profiledataURL, 'jpeg', 470, 100, 60, 60);//student profile location - doc.setFontSize(22); - doc.text(160,50,$scope.universityNamePDF); - doc.setFontSize(10); + doc.setFontSize(17); + doc.text(150,50,$scope.universityNamePDF); + doc.setFontSize(8); doc.text(160,65,$scope.universityAddressPDF); - doc.setFontSize(10); + doc.setFontSize(8); doc.text(160,88,$scope.universityEmailPDF); doc.rect(45, 100, 400, 60); doc.rect(445, 100, 100, 60); doc.line(45, 125, 445, 125); - doc.setFontSize(10); + doc.setFontSize(8); doc.setFontType("bold"); - doc.text(80,115,examName); + doc.text(50,115,examName); doc.setFontType("normal"); + doc.setFontSize(10); doc.text(50,140,rollNo); doc.text(230,140,stuName); doc.text(50,155,centerName); diff --git a/Apollo/assets/js/controllers/schCtrl.js b/Apollo/assets/js/controllers/schCtrl.js index 7fd0150e..cba7b4ec 100755 --- a/Apollo/assets/js/controllers/schCtrl.js +++ b/Apollo/assets/js/controllers/schCtrl.js @@ -334,7 +334,39 @@ app.controller('schCtrl', ["$scope","$rootScope","toaster", "$filter", "ngTableP angular.forEach(subjectsDetails,function (value) { if((value.ScheduleDate!='' && value.ScheduleDate!=undefined) && (value.ScheduleStartTime!='' && value.ScheduleStartTime!=undefined) && (value.ScheduleEndTime!='' && value.ScheduleEndTime!=undefined)){ - + + // var timeToaddAM = "05:30:00"; + // var timeToaddPM = "15:30:00"; + // var tempDate = $filter('date')(value.ScheduleDate, 'yyyy-MM-dd'); + // var ScheduleStartTime = value.ScheduleStartTime; + // var STARTAMPM = ScheduleStartTime.substr(-2); + // var ScheduleStartTime = ScheduleStartTime.substr(0,5)+":00"; + // console.log('ScheduleStartTime'+ScheduleStartTime); + // var timeToAddArr = ""; + // if(STARTAMPM == 'AM' || STARTAMPM == 'am') + // { + // timeToAddArr = timeToaddAM.split(":"); + // }else { timeToAddArr = timeToaddPM.split(":"); } + // var ms = (60 * 60 * parseInt(timeToAddArr[0]) + 60 * (parseInt(timeToAddArr[1])) ) * 1000; + // var newStartTime =new Date('1970-01-01T' + ScheduleStartTime ).getTime() + ms + // var finalStartTime = new Date(newStartTime).toLocaleString('en-GB').slice(12 ,20); + // finalStartTime = tempDate+'T'+finalStartTime+':000Z'; + // console.log(finalStartTime); + + // var ScheduleEndTime = value.ScheduleEndTime; + // var ENDAMPM = ScheduleEndTime.substr(-2); + // var ScheduleEndTime = ScheduleEndTime.substr(0,5)+":00"; + // console.log('ScheduleEndTime'+ScheduleEndTime); + // var timeToAddArr2 = ''; + // if(ENDAMPM == 'AM' || ENDAMPM == 'am') + // { + // timeToAddArr2 = timeToaddAM.split(":"); + // }else { timeToAddArr2 = timeToaddPM.split(":"); } + // var ms2 = (60 * 60 * parseInt(timeToAddArr2[0]) + 60 * (parseInt(timeToAddArr2[1])) ) * 1000; + // var newEndTime =new Date('1970-01-01T' + ScheduleEndTime ).getTime() + ms2 + // var finalEndTime = new Date(newEndTime).toLocaleString('en-GB').slice(12 ,20); + // finalEndTime = tempDate+'T'+finalEndTime+':000Z'; + // console.log(finalEndTime); $scope.scheduledDetails.push({ "universityID":myModel.universityName.universityID, //"courseID":courseDetails.list[0], @@ -347,6 +379,8 @@ app.controller('schCtrl', ["$scope","$rootScope","toaster", "$filter", "ngTableP } }); + //return false; + var saveAllInfo = { method: 'POST', url: apiPoint.url + 'saveBatchSchedule/', @@ -370,12 +404,14 @@ app.controller('schCtrl', ["$scope","$rootScope","toaster", "$filter", "ngTableP //console.log(status); if (response.data.status==200) { - swal(" ", "Saved successfully,", "success"); - $scope.init(); + swal(" Saved successfully", "", "success"); + //$scope.init(); + $state.go($state.current, {}, {reload: true}); } },function(error){ - swal('Some Thing Went Wrong!','Try Later','error') + swal('Some Thing Went Wrong!','Try Later','error'); + $state.go($state.current, {}, {reload: true}); }); @@ -424,11 +460,12 @@ app.controller('schCtrl', ["$scope","$rootScope","toaster", "$filter", "ngTableP swal("", "Saved Successfully.", "success"); //$scope.editId = -1; // $scope.init(); - + $state.go($state.current, {}, {reload: true}); } else { $scope.ldloading[loading.replace('-', '_')] = false; swal("", response.data.message,"error"); + $state.go($state.current, {}, {reload: true}); } }); }; @@ -570,5 +607,29 @@ $scope.batchschedule={ }, }; + +$scope.validateTime = function(time,ide){ + //alert(time); + var tempTime = time; + var tempID = ide.target.attributes.id.value; + ///console.log(tempID); + var arrayTime = time.split(":"); + ////console.log(!isNaN(arrayTime[0])); + //console.log(!isNaN(arrayTime[1].substr(0,2))); + //console.log(isNaN(arrayTime[1].substr(-2))); + //return false; + + if(time.length != 7 || isNaN(arrayTime[0]) || isNaN(arrayTime[1].substr(0,2)) || !isNaN(arrayTime[1].substr(-2))){ + swal('Wrong Time Format...!',' Enter as "09:00AM" ','error'); + document.getElementById(tempID).value = ""; + window.setTimeout(function () + { + document.getElementById(tempID).focus(); + }, 0); + //return false; + } + + +} }]); \ No newline at end of file diff --git a/Apollo/assets/views/hallticket/batchshedule.html b/Apollo/assets/views/hallticket/batchshedule.html index 94662b28..cf7fc3b3 100755 --- a/Apollo/assets/views/hallticket/batchshedule.html +++ b/Apollo/assets/views/hallticket/batchshedule.html @@ -206,23 +206,26 @@
-
-
+
- + + + + + +
-
+
@@ -232,12 +235,16 @@ minute-step="hstep" show-meridian="ismeridian">--> - + + + + + + + +
@@ -255,7 +262,7 @@

- +
diff --git a/Apollo/assets/views/hallticket/editShedule.html b/Apollo/assets/views/hallticket/editShedule.html index 6c624196..786942b2 100755 --- a/Apollo/assets/views/hallticket/editShedule.html +++ b/Apollo/assets/views/hallticket/editShedule.html @@ -49,6 +49,7 @@ class="symbol required"> --> --> -
+
- + + + + + +
@@ -92,21 +96,25 @@
-
-
+
- + + + + + + +
@@ -126,11 +134,11 @@
- - diff --git a/Apollo/assets/views/hallticket/hallTicketPDF.html b/Apollo/assets/views/hallticket/hallTicketPDF.html index 3e4e9bd8..40fed859 100755 --- a/Apollo/assets/views/hallticket/hallTicketPDF.html +++ b/Apollo/assets/views/hallticket/hallTicketPDF.html @@ -62,7 +62,7 @@ - 0{{sub.SemesterID}}{{sub.SubjectCode}}{{sub.SubjectName}}{{sub.ScheduleDate | date: "dd-MM-y" }}{{sub.FromTime | date :"hh:mm a"}} - {{sub.ToTime | date :"hh:mm: a"}}  + 0{{sub.SemesterID}}{{sub.SubjectCode}}{{sub.SubjectName}}{{sub.ScheduleDate | date: "dd-MM-y" }}{{sub.FromTime}} - {{sub.ToTime }}  @@ -71,7 +71,7 @@ - +
@@ -80,7 +80,7 @@ - + @@ -97,7 +97,7 @@ - + @@ -114,7 +114,7 @@ - + @@ -131,7 +131,7 @@ - + @@ -151,7 +151,7 @@ - + diff --git a/Apollo/assets/views/partials/nav.html b/Apollo/assets/views/partials/nav.html index 9dda9651..1b6b8ac0 100755 --- a/Apollo/assets/views/partials/nav.html +++ b/Apollo/assets/views/partials/nav.html @@ -61,6 +61,13 @@ COURSE DETAILS + +
  • + + COURSE SEMESTER MAPPING + +
  • +
  • BRANCH DETAILS @@ -342,11 +349,11 @@
  • 0{{sub.SemesterID}}0{{sub.SemesterID-1}}{{sub.SubjectCode}}{{sub.SubjectName}}{{sub.ScheduleDate | date: "dd-MM-y" }}{{sub.FromTime | date :"hh:mm: a"}} - {{sub.ToTime | date :"hh:mm: a"}} 0{{sub.SemesterID}}0{{sub.SemesterID-1}}{{sub.SubjectCode}}{{sub.SubjectName}}{{sub.ScheduleDate | date: "dd-MM-y" }}{{sub.FromTime}} - {{sub.ToTime}} 
    0{{sub.SemesterID-1}}0{{sub.SemesterID-2}}{{sub.SubjectCode}}{{sub.SubjectName}}{{sub.ScheduleDate | date: "dd-MM-y" }}{{sub.FromTime | date :"hh:mm: a"}} - {{sub.ToTime | date :"hh:mm: a"}} 0{{sub.SemesterID-1}}0{{sub.SemesterID-2}}{{sub.SubjectCode}}{{sub.SubjectName}}{{sub.ScheduleDate | date: "dd-MM-y" }}{{sub.FromTime }} - {{sub.ToTime }} 
    0{{sub.SemesterID-2}}0{{sub.SemesterID-3}}{{sub.SubjectCode}}{{sub.SubjectName}}{{sub.ScheduleDate | date: "dd-MM-y" }}{{sub.FromTime | date :"hh:mm: a"}} - {{sub.ToTime | date :"hh:mm: a"}} 0{{sub.SemesterID-2}}0{{sub.SemesterID-3}}{{sub.SubjectCode}}{{sub.SubjectName}}{{sub.ScheduleDate | date: "dd-MM-y" }}{{sub.FromTime}} - {{sub.ToTime | date :"hh:mm: a"}} 
    0{{sub.SemesterID-3}}0{{sub.SemesterID-4}}{{sub.SubjectCode}}{{sub.SubjectName}}{{sub.ScheduleDate | date: "dd-MM-y" }}{{sub.FromTime | date :"hh:mm: a"}} - {{sub.ToTime | date :"hh:mm: a"}} 0{{sub.SemesterID-3}}0{{sub.SemesterID-4}}{{sub.SubjectCode}}{{sub.SubjectName}}{{sub.ScheduleDate | date: "dd-MM-y" }}{{sub.FromTime }} - {{sub.ToTime}} 
    0{{sub.SemesterID}}{{sub.SubjectCode}}{{sub.SubjectName}}{{sub.ScheduleDate | date: "dd-MM-y" }}{{sub.FromTime | date :"hh:mm: a"}} - {{sub.ToTime | date :"hh:mm: a"}} 0{{sub.SemesterID}}{{sub.SubjectCode}}{{sub.SubjectName}}{{sub.ScheduleDate | date: "dd-MM-y" }}{{sub.FromTime}} - {{sub.ToTime }}