From a04c662cc859e6efdc4653362bec6d96f68e627d Mon Sep 17 00:00:00 2001 From: resicovenba Date: Mon, 27 Nov 2017 13:00:36 +0530 Subject: [PATCH 1/6] student pages added --- .../api/application/models/Employee_model.php | 55 +- Apollo/assets/i18n/en.json | 3 +- Apollo/assets/js/config.constant.js | 4 + Apollo/assets/js/config.router.js | 17 +- Apollo/assets/js/controllers/studentCtrl.js | 164 ++++++ Apollo/assets/js/main.js | 10 +- Apollo/assets/views/partials/nav.html | 19 + .../assets/views/student/student_details.html | 472 ++++++++++++++++++ 8 files changed, 706 insertions(+), 38 deletions(-) create mode 100644 Apollo/assets/js/controllers/studentCtrl.js create mode 100644 Apollo/assets/views/student/student_details.html diff --git a/Apollo/api/application/models/Employee_model.php b/Apollo/api/application/models/Employee_model.php index df93c5ef..ecd4e866 100644 --- a/Apollo/api/application/models/Employee_model.php +++ b/Apollo/api/application/models/Employee_model.php @@ -195,14 +195,14 @@ class Employee_model extends CI_Model $results['branch_details'] = $mBranchDetails->result(); } else { // res for Admin - $staffId = $this->selfGetEmpId($reqUserID); - $subQuery = "SELECT t1.BranchCode, t1.BranchName - FROM T_BranchMaster as t1 - LEFT JOIN T_Staff_BranchAccess as t2 ON t2.StaffID = '$staffId' - WHERE t2.BranchCode = t1.BranchCode - AND t1.IsActive = 1 - AND t2.IsActive = 1"; - $mBranchDetails = $this->db->query($subQuery); + $staffId = $this->selfGetEmpId($reqUserID); + $subQuery = "SELECT t1.BranchCode, t1.BranchName + FROM T_BranchMaster as t1 + LEFT JOIN T_Staff_BranchAccess as t2 ON t2.StaffID = '$staffId' + WHERE t2.BranchCode = t1.BranchCode + AND t1.IsActive = 1 + AND t2.IsActive = 1"; + $mBranchDetails = $this->db->query($subQuery); $results['MeasterBranchDetailStatus'] = true; $results['branch_details'] = $mBranchDetails->result(); } @@ -360,23 +360,30 @@ class Employee_model extends CI_Model // get employee branch details public function get_employee_branch($staffId) { - $this->db->select('t1.BranchCode, t1.BranchName'); - $this->db->from('' . BRANCH . ' as t1'); - $this->db->join('' . STAFF_BRANCH . ' as t2', 't2.BranchCode = t1.BranchCode', 'LEFT'); - $this->db->where('t2.StaffID', $staffId); - $this->db->where('t2.IsActive', 1); - $this->db->where('t1.IsActive', 1); - $branchDetails = $this->db->get(); - $checkArr = $branchDetails->result(); + $this->db->select('t3.ListCode, t3.ListName'); + $this->db->from('' . PICK_LIST_DETAILS . ' as t3'); + $this->db->join('' . STAFF . ' as t4', 't4.ListCode = t3.ListCode', 'LEFT'); + $this->db->where('t4.StaffID', $staffId); + $roleDetails = $this->db->get(); + $checkArr = $roleDetails->result(); if (count($checkArr) > 0) { - $this->db->select('t3.ListCode, t3.ListName'); - $this->db->from('' . PICK_LIST_DETAILS . ' as t3'); - $this->db->join('' . STAFF . ' as t4', 't4.ListCode = t3.ListCode', 'LEFT'); - $this->db->where('t4.StaffID', $staffId); - $roleDetails = $this->db->get(); - $result['empBranchDetails'] = true; - $result['role_details'] = $roleDetails->result(); - $result['branch_details'] = $branchDetails->result(); + $this->db->select('t1.BranchCode, t1.BranchName'); + $this->db->from('' . BRANCH . ' as t1'); + $this->db->join('' . STAFF_BRANCH . ' as t2', 't2.BranchCode = t1.BranchCode', 'LEFT'); + $this->db->where('t2.StaffID', $staffId); + $this->db->where('t2.IsActive', 1); + $this->db->where('t1.IsActive', 1); + $branchDetails = $this->db->get(); + $branchArr = $branchDetails->result(); + if( count($branchArr) > 0 ) { + $result['empBranchDetails'] = true; + $result['role_details'] = $roleDetails->result(); + $result['branch_details'] = $branchDetails->result(); + } else { + $result['empBranchDetails'] = true; + $result['role_details'] = $roleDetails->result(); + $result['branch_details'] = $branchDetails->result(); + } } else { $result['empBranchDetails'] = false; } diff --git a/Apollo/assets/i18n/en.json b/Apollo/assets/i18n/en.json index 560de865..f1e96bde 100644 --- a/Apollo/assets/i18n/en.json +++ b/Apollo/assets/i18n/en.json @@ -69,7 +69,8 @@ "student": { "MAIN": "STUDENTS DETAILS", "LISTING": "STUDENTS LISTING", - "ENROLLMENT": "STUDENT ENROLLMENT" + "ENROLLMENT": "STUDENT ENROLLMENT", + "STUDENTDETAILS": "STUDENT DETAILS" }, "status": { "MAIN": "STATUS", diff --git a/Apollo/assets/js/config.constant.js b/Apollo/assets/js/config.constant.js index b791b9ec..4a44c560 100644 --- a/Apollo/assets/js/config.constant.js +++ b/Apollo/assets/js/config.constant.js @@ -91,6 +91,10 @@ app.constant('JS_REQUIRES', { Activity * */ 'activityCtrl': 'assets/js/controllers/activityCtrl.js', + /* * + Student + * */ + 'studentCtrl': 'assets/js/controllers/studentCtrl.js', /* diff --git a/Apollo/assets/js/config.router.js b/Apollo/assets/js/config.router.js index c5a8ae7b..4ee2c809 100644 --- a/Apollo/assets/js/config.router.js +++ b/Apollo/assets/js/config.router.js @@ -142,10 +142,10 @@ app.config(['$stateProvider', '$urlRouterProvider', '$controllerProvider', '$com // resolve: loadSequence('iconsCtrl') }).state('app.student', { url: '/student', - template: '
', - title: 'Tables', + template: '
STUDENT DETAILS
', + title: 'Student', ncyBreadcrumb: { - label: 'Tables' + label: 'Student' } }).state('app.student.listing', { url: '/basic', @@ -154,12 +154,13 @@ app.config(['$stateProvider', '$urlRouterProvider', '$controllerProvider', '$com ncyBreadcrumb: { label: 'Basic' } - }).state('app.student.enrollment', { - url: '/responsive', - templateUrl: "assets/views/table_responsive.html", - title: 'Responsive Tables', + }).state('app.student.studentDetails', { + url: '/studentDetails', + templateUrl: "assets/views/student/student_details.html", + resolve: loadSequence('ui.select','spin', 'ui.mask', 'ladda', 'angular-ladda', 'studentCtrl', 'ngTable'), + title: 'Student Details', ncyBreadcrumb: { - label: 'Responsive' + label: 'Student Details' } }).state('app.status', { url: '/status', diff --git a/Apollo/assets/js/controllers/studentCtrl.js b/Apollo/assets/js/controllers/studentCtrl.js new file mode 100644 index 00000000..f92761cc --- /dev/null +++ b/Apollo/assets/js/controllers/studentCtrl.js @@ -0,0 +1,164 @@ +'use strict'; +/** + * controllers for ng-table + * Simple table with sorting and filtering on AngularJS + */ + +app.controller('studentCtrl', ["$scope", "toaster", "$filter", "ngTableParams", "$http", "API_POINTS", "$state", '$rootScope', '$cookies', 'md5', 'ipCookie', '$timeout', '$window', function ($scope, toaster, $filter, ngTableParams, $http, apiPoint, $state, $rootScope, $cookies, md5, ipCookie, $timeout, $window) { + /** + * student details capture + * by : kdk + */ + $scope.myModel = { + 'primaryPhone': '', + 'firstname': '', + 'lastname': '', + 'fathername': '', + 'mothername': '', + 'emailId': '', + 'secondaryPhone': '', + 'dateofbirth': '', + 'gender': '', + 'aadharNumber': '', + 'otherId': '', + 'otherIdDetails': '', + 'address1': '', + 'address2': '', + 'caste': '', + 'category': '', + 'religion': '', + 'nationality': '', + 'prequalification': '', + 'occupation': '', + 'designation': '', + 'companyname': '', + 'referredby': '', + 'referredmobilenumber': '', + 'switchsetting': true, + }; + var data = ''; + $scope.roleDetails = ''; + $scope.branchDetails = ''; + $scope.employeeDetails = ''; + $scope.loader = false; + $scope.emptyData; + // 2017-11-23T00:00:00+0530 + // sorting function for table params + $scope.sort = function (keyname) { + $scope.sortKey = keyname; //set the sortKey to the param passed + $scope.reverse = !$scope.reverse; //if true make it false and vice versa + } + + // get local cliend details + var localDetail = JSON.parse(localStorage.getItem('localObj')); + var localDetails = ipCookie('cookiechk'); + + // load when html page load + $scope.init = function () { + if (localDetail != null) { + $scope.currentDate = new Date(); + // $scope.currentPage = 1; + } else { + } + } + + $scope.editId = -1; + $scope.editBranchId = -1; + $scope.setEditId = function (id) { + $scope.editId = id; + $scope.editBranchId = -1; + } + + $scope.setEditBranchId = function (id) { + $scope.getEmpBranchDetails(id); + $scope.editBranchId = id; + $scope.editId = -1; + $scope.branchEditLoading = true; + } + + $scope.cancel = function () { + $scope.getEmployeeList(); + $scope.editId = -1; + $scope.editBranchId = -1; + } + + $scope.empBranchDetails = ''; + $scope.empRoleDetail = ''; + + // add empolyee + $scope.studentFORM = { + submit: function (form, myModel) { + var firstError = null; + if (form.$invalid) { + alert('error'); + 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 { + alert('ok'); + // var formate = "dd-MM-yyyy"; + // $scope.myModel.switchsetting = $scope.myModel.switchsetting === true ? 1 : 0; + // $scope.myModel.dateofbirth = $filter('date')(new Date($scope.myModel.dateofbirth), formate); + // $scope.myModel.dateofjoining = $filter('date')(new Date($scope.myModel.dateofjoining), formate); + // var req = { + // method: 'POST', + // url: apiPoint.url + 'insertEmployee/', + // headers: { + // 'Content-Type': 'application/json' + // }, + // data: { + // data: $scope.myModel, + // createdBy: localDetails.localUserID, + // } + // }; + // $http(req).then(function (response) { + // if (response.data.addEmpStatus == true) { + // swal("Success!", response.data.message, "success"); + // $state.go($state.current, {}, { reload: true }); + // } else { + // swal("Failed!", response.data.message, "error"); + // } + // }); + } + }, + reset: function (form) { + + // $scope.myModel = angular.copy($scope.master); + form.$setPristine(true); + $scope.myModel = { + 'employeeId': '', + 'firstname': '', + 'lastname': '', + 'fathername': '', + 'mothername': '', + 'emailId': '', + 'primaryPhone': '', + 'secondaryPhone': '', + 'dateofbirth': '', + 'gender': '', + 'qualificaion': '', + 'aadharNumber': '', + 'otherId': '', + 'otherIdDetails': '', + 'address1': '', + 'address2': '', + 'homeBranch': '', + 'dateofjoining': '', + 'dateofjoining': '', + 'role': '', + 'switchsetting': true, + }; + } + } + +}]); diff --git a/Apollo/assets/js/main.js b/Apollo/assets/js/main.js index 99dfe627..57c5c298 100644 --- a/Apollo/assets/js/main.js +++ b/Apollo/assets/js/main.js @@ -67,9 +67,9 @@ function (cfpLoadingBarProvider) { cfpLoadingBarProvider.includeSpinner = false; }]); -app.controller('sessionCtrl', ["$scope", "$localStorage", "$state", function ($scope, $localStorage, $state) { - /** - * checking the session settings and logout for the function - */ +// app.controller('sessionCtrl', ["$scope", "$localStorage", "$state", function ($scope, $localStorage, $state) { +// /** +// * checking the session settings and logout for the function +// */ - }]); +// }]); diff --git a/Apollo/assets/views/partials/nav.html b/Apollo/assets/views/partials/nav.html index 70ba902c..bba8f1e9 100644 --- a/Apollo/assets/views/partials/nav.html +++ b/Apollo/assets/views/partials/nav.html @@ -57,6 +57,25 @@ +
  • + +
    +
    + +
    +
    + STUDENT +
    +
    +
    + +
  • diff --git a/Apollo/assets/views/student/student_details.html b/Apollo/assets/views/student/student_details.html new file mode 100644 index 00000000..22b28719 --- /dev/null +++ b/Apollo/assets/views/student/student_details.html @@ -0,0 +1,472 @@ + +
    +
    +
    +

    {{ mainTitle }}

    +
    +
    +
    +
    + + +
    +
    + + + + + + + +
    +
    +
    +
    +
    + + Personal Details + + +
    +
    + + + Mobile Number is required. + Enter a Valid Phone Number +
    + + +
    + + + + First Name required + Invalid First Name +
    + +
    + + + + Last Name required + Invalid Last Name +
    +
    +
    +
    + + + + Father Name required + Invalid Father Name +
    + +
    + + + + Mother Name required + Invalid Last Name +
    + +
    + + + Email is required. + Please, enter a valid email address. +
    +
    +
    + +
    + + + Alternate Mobile Number is required. + Enter a Valid Phone Number +
    + +
    +
    + + + + + Date of Birth is required. + Enter a Valid Date of Birth +
    +
    +
    + +
    + + + + + Gender is required. + +
    +
    + +
    +
    +
    + + + Permanent Address is required +
    +
    + + + Current Address is required +
    +
    + + + Aadhar Number is required. + Enter a Valid Aadhar Number +
    +
    + + + +
    + +
    +
    +
    + + + Aadhar Number is required. + Enter a Valid Details +
    +
    + + + Aadhar Number is required. + Enter a Valid Details +
    +
    +
    +
    + + + + Invalid Caste Name +
    +
    + + + + Invalid Category Name +
    +
    +
    + +
    + + + + Invalid Religion Name +
    +
    + + + + Invalid Nationality Name +
    +
    + + + + Enter a Valid Qualification +
    +
    +
    + +
    + + + + Invalid Occupation +
    +
    + + + + Invalid Designation +
    +
    + + + + Invalid Company +
    +
    +
    +
    + + + + Invalid Referred By +
    +
    + + + Refer's Mobile Number is required. + Enter a Valid Phone Number +
    +
    +
     {{ myModel | json }}
    +
    +
    + + Course Details + + +
    +
    + + +
    +
    + +
    +
    + +
    +
    + +
    +
    +
    +
    +
    +
    +
    + + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + \ No newline at end of file From 7f9c940dcfc6ee4aacb03c1dcdbdaf1040987843 Mon Sep 17 00:00:00 2001 From: resicovenba Date: Mon, 27 Nov 2017 18:11:24 +0530 Subject: [PATCH 2/6] add sutudent details --- Apollo/api/application/config/constants.php | 1 + Apollo/api/application/config/routes.php | 5 +- .../controllers/Student_Controller.php | 112 ++++++++++ .../api/application/models/Student_model.php | 86 ++++++++ Apollo/assets/js/controllers/studentCtrl.js | 114 +++++++---- .../assets/views/student/student_details.html | 192 ++++++++++-------- 6 files changed, 383 insertions(+), 127 deletions(-) create mode 100644 Apollo/api/application/controllers/Student_Controller.php create mode 100644 Apollo/api/application/models/Student_model.php diff --git a/Apollo/api/application/config/constants.php b/Apollo/api/application/config/constants.php index e40e8dde..e676e52d 100644 --- a/Apollo/api/application/config/constants.php +++ b/Apollo/api/application/config/constants.php @@ -100,6 +100,7 @@ defined('LEAD_DETAILS') OR define('LEAD_DETAILS','T_Lead_Details'); defined('LEAD_TRACKING') OR define('LEAD_TRACKING','T_Lead_Tracking'); defined('LEAD_TRACKING_FOLLOWUP') OR define('LEAD_TRACKING_FOLLOWUP','T_Lead_Tracking_Followup'); defined('PICK_LIST_DETAILS') OR define('PICK_LIST_DETAILS','T_PickListDetails'); +defined('BATCH') OR define('BATCH','T_BatchMaster'); //end of database table name diff --git a/Apollo/api/application/config/routes.php b/Apollo/api/application/config/routes.php index 5d31a295..e68cdbe8 100644 --- a/Apollo/api/application/config/routes.php +++ b/Apollo/api/application/config/routes.php @@ -93,8 +93,9 @@ $route['updateActivityStatus'] = 'University_Controller/updateActivityStatus'; $route['changePassword'] = 'Login_Controller/changePassword'; - - +// student +$route['insertStudent'] = 'Student_Controller/addStudent'; +$route['getCourseBatchForUniv'] = 'Student_Controller/getCourseBatch'; diff --git a/Apollo/api/application/controllers/Student_Controller.php b/Apollo/api/application/controllers/Student_Controller.php new file mode 100644 index 00000000..dac2b884 --- /dev/null +++ b/Apollo/api/application/controllers/Student_Controller.php @@ -0,0 +1,112 @@ +methods['addStudent_post']['limit'] = 100; + // load the employee model + $this->load->model('Student_model', 'student_model'); + + } + + public function getCourseBatch_post() { + $data = $this->post('data'); + $getCourseBatchListDetails = $this->student_model->get_courseBatch_list($data);// Check if the employee exist + if ($getCourseBatchListDetails) + { + $getCourseBatchListDetails['status'] = REST_Controller::HTTP_OK; + // Set the response and exit + $this->response($getCourseBatchListDetails, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code + } + else + { + // Set the response and exit + $this->response([ + 'message' => 'No list were found', + 'status' => REST_Controller::HTTP_NOT_FOUND + ], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code + } + } + // add student + public function addStudent_post() { + $data = $this->post('data'); + $createdBy = $this->post('createdBy'); + $createdBranch = $this->post('loginBranch'); + + $req['Firstname'] = $data['firstname']; + $req['Lastname'] = $data['lastname']; + $req['Fathername'] = $data['fathername']; + $req['EmailID'] = $data['emailId']; + $req['MotherName'] = $data['mothername']; + $req['MobileNumber'] = $data['primaryPhone']; + $req['AlternateNumber'] = $data['secondaryPhone']; + $req['Gender'] = $data['gender']; + $req['DOB'] = $data['dateofbirth']; + $req['PresentAddress'] = $data['address2']; + $req['PermanentAddress'] = $data['address1']; + $req['AadharNumber'] = $data['aadharNumber']; + $req['OtherID'] = $data['otherId']; + $req['OtherIDDetails'] = $data['otherIdDetails']; + $req['Caste'] = $data['caste']; + $req['Category'] = $data['category']; + $req['Religion'] = $data['religion']; + $req['Nationality'] = $data['nationality']; + $req['Occupation'] = $data['occupation']; + $req['Designation'] = $data['designation']; + $req['Companyname'] = $data['companyname']; + $req['ReferredBy'] = $data['referredby']; + $req['ReferersMobileNumber'] = $data['referredmobilenumber']; + $req['PreQualification'] = $data['prequalification']; + $req['IsActive'] = $data['switchsetting']; + + $req['CreatedBy'] = $createdBy; + $date = date('Y-m-d H:i:s'); + $req['CreatedOn'] = $date; + print_r($req);exit(); + $studentAdd = $this->student_model->add_student( $req );// Check if the employee exist + if ($studentAdd) + { + $studentAdd['status'] = REST_Controller::HTTP_OK; + // Set the response and exit + $this->response($studentAdd, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code + } + else + { + // Set the response and exit + $this->response([ + 'message' => 'No users were found', + 'status' => REST_Controller::HTTP_NOT_FOUND + ], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code + } + } + + +} diff --git a/Apollo/api/application/models/Student_model.php b/Apollo/api/application/models/Student_model.php new file mode 100644 index 00000000..d9ebc1d9 --- /dev/null +++ b/Apollo/api/application/models/Student_model.php @@ -0,0 +1,86 @@ +db->select('C.CourseID, C.CourseName'); + $this->db->from(COURSE.' as C'); + $this->db->where('UniversityID',$univId); + $this->db->where('IsActive',1); + $courseDetails = $this->db->get(); + if($courseDetails->result()){ + $this->db->select('B.BatchCode, B.BatchName'); + $this->db->from(BATCH.' as B'); + $this->db->where('UniversityID',$univId); + $this->db->where('IsActive',1); + $batchDetails = $this->db->get(); + if( $batchDetails->result()) { + $result['courseStatus'] = true; + $result['course_details'] = $courseDetails->result(); + $result['batch_details'] = $batchDetails->result(); + } else { + $result['courseStatus'] = false; + $result['message'] = "No records found!"; + } + } + else { + $result['courseStatus'] = false; + $result['message'] = "No records found!"; + } + + return $result; + } + + // add student + public function add_employee($empArr, $createdBy) + { + $this->db->insert(STAFF, $empArr); + if ($this->db->affected_rows() == '1') { + $branchArr['StaffID'] = $empArr['StaffID']; + $branchArr['BranchCode'] = $empArr['BranchCode']; + $branchArr['IsActive'] = $empArr['IsActive']; + $branchArr['CreatedBy'] = $createdBy; + $this->db->insert(STAFF_BRANCH, $branchArr); + if ($this->db->affected_rows() == '1') { + $loginArr['StaffID'] = $empArr['StaffID']; + $loginArr['ListCode'] = $empArr['ListCode']; + $loginArr['MobileNumber'] = $empArr['MobileNumber']; + $loginArr['EmailId'] = $empArr['EmailID']; + $loginArr['IsActive'] = $empArr['IsActive']; + $loginArr['CreatedBy'] = $createdBy; + $loginArr['Password'] = ENCR_PASSWORD; + $this->db->insert(LOGIN, $loginArr); + if ($this->db->affected_rows() == '1') { + $result['addEmpStatus'] = true; + $result['message'] = "Successfully employee details added"; + } else { + $result['addEmpStatus'] = false; + $result['message'] = "Something went wrong.please try again"; + } + } else { + $result['addEmpStatus'] = false; + $result['message'] = "Something went wrong.please try again"; + } + } else { + $result['addEmpStatus'] = false; + $result['message'] = "Something went wrong.please try again"; + } + return $result; + } + +} \ No newline at end of file diff --git a/Apollo/assets/js/controllers/studentCtrl.js b/Apollo/assets/js/controllers/studentCtrl.js index f92761cc..657a899d 100644 --- a/Apollo/assets/js/controllers/studentCtrl.js +++ b/Apollo/assets/js/controllers/studentCtrl.js @@ -32,16 +32,11 @@ app.controller('studentCtrl', ["$scope", "toaster", "$filter", "ngTableParams", 'occupation': '', 'designation': '', 'companyname': '', - 'referredby': '', + 'referredby': '', 'referredmobilenumber': '', 'switchsetting': true, }; - var data = ''; - $scope.roleDetails = ''; - $scope.branchDetails = ''; - $scope.employeeDetails = ''; - $scope.loader = false; - $scope.emptyData; + // 2017-11-23T00:00:00+0530 // sorting function for table params $scope.sort = function (keyname) { @@ -57,6 +52,8 @@ app.controller('studentCtrl', ["$scope", "toaster", "$filter", "ngTableParams", $scope.init = function () { if (localDetail != null) { $scope.currentDate = new Date(); + $scope.getUniversityList(); + // $scope.currentPage = 1; } else { } @@ -70,27 +67,71 @@ app.controller('studentCtrl', ["$scope", "toaster", "$filter", "ngTableParams", } $scope.setEditBranchId = function (id) { - $scope.getEmpBranchDetails(id); $scope.editBranchId = id; $scope.editId = -1; $scope.branchEditLoading = true; } $scope.cancel = function () { - $scope.getEmployeeList(); $scope.editId = -1; $scope.editBranchId = -1; } - $scope.empBranchDetails = ''; - $scope.empRoleDetail = ''; + + $scope.universityData = ''; - // add empolyee + $scope.getUniversityList = function () { + var empListreq = { + method: 'POST', + url: apiPoint.url + 'getUniversity/', + headers: { + 'Content-Type': 'application/json' + }, + data: { + data: localDetails + } + }; + $http(empListreq).then(function (response) { + if (response.data.univList) { + $scope.universityData = response.data.university_details; + } else { + } + }); + } + + $scope.courseData = ''; + $scope.batchData = ''; + $scope.courseLoading = false; + $scope.onSlecetUniv = function() { + $scope.myModel.course= ''; + $scope.myModel.batch= ''; + $scope.courseLoading = true; + var univListreq = { + method: 'POST', + url: apiPoint.url + 'getCourseBatchForUniv/', + headers: { + 'Content-Type': 'application/json' + }, + data: { + data: $scope.myModel.university + } + }; + $http(univListreq).then(function (response) { + if (response.data.courseStatus) { + $scope.courseLoading = false; + $scope.courseData = response.data.course_details; + $scope.batchData = response.data.batch_details; + } else { + $scope.courseLoading = false; + } + }); + } + + // add student $scope.studentFORM = { submit: function (form, myModel) { var firstError = null; if (form.$invalid) { - alert('error'); var field = null, firstError = null; for (field in form) { if (field[0] != '$') { @@ -105,30 +146,29 @@ app.controller('studentCtrl', ["$scope", "toaster", "$filter", "ngTableParams", 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 { - alert('ok'); - // var formate = "dd-MM-yyyy"; - // $scope.myModel.switchsetting = $scope.myModel.switchsetting === true ? 1 : 0; - // $scope.myModel.dateofbirth = $filter('date')(new Date($scope.myModel.dateofbirth), formate); - // $scope.myModel.dateofjoining = $filter('date')(new Date($scope.myModel.dateofjoining), formate); - // var req = { - // method: 'POST', - // url: apiPoint.url + 'insertEmployee/', - // headers: { - // 'Content-Type': 'application/json' - // }, - // data: { - // data: $scope.myModel, - // createdBy: localDetails.localUserID, - // } - // }; - // $http(req).then(function (response) { - // if (response.data.addEmpStatus == true) { - // swal("Success!", response.data.message, "success"); - // $state.go($state.current, {}, { reload: true }); - // } else { - // swal("Failed!", response.data.message, "error"); - // } - // }); + var formate = "dd-MM-yyyy"; + $scope.myModel.switchsetting = $scope.myModel.switchsetting === true ? 1 : 0; + $scope.myModel.dateofbirth = $filter('date')(new Date($scope.myModel.dateofbirth), formate); + var req = { + method: 'POST', + url: apiPoint.url + 'insertStudent/', + headers: { + 'Content-Type': 'application/json' + }, + data: { + data: $scope.myModel, + loginBranch: localDetails.localBranchID, + createdBy: localDetails.localUserID, + } + }; + $http(req).then(function (response) { + if (response.data.addEmpStatus == true) { + swal("Success!", response.data.message, "success"); + $state.go($state.current, {}, { reload: true }); + } else { + swal("Failed!", response.data.message, "error"); + } + }); } }, reset: function (form) { diff --git a/Apollo/assets/views/student/student_details.html b/Apollo/assets/views/student/student_details.html index 22b28719..e22a626d 100644 --- a/Apollo/assets/views/student/student_details.html +++ b/Apollo/assets/views/student/student_details.html @@ -116,37 +116,31 @@ Personal Details -
    - Mobile Number is required. Enter a Valid Phone Number
    - -
    - First Name required Invalid First Name
    -
    - Last Name required @@ -158,13 +152,11 @@ - Father Name required Invalid Father Name
    -
    -
    -
    - Alternate Mobile Number is required. Enter a Valid Phone Number @@ -204,7 +194,7 @@ Date Of Birth - @@ -219,7 +209,7 @@ Gender
    - + @@ -238,14 +228,14 @@ - + Permanent Address is required
    - + Current Address is required
    @@ -291,8 +281,8 @@ Caste - + Invalid Caste Name
    @@ -300,8 +290,8 @@ Category - + Invalid Category Name
    @@ -312,7 +302,7 @@ Religion - Invalid Religion Name
    @@ -321,7 +311,7 @@ Nationality - Invalid Nationality Name
    @@ -330,8 +320,8 @@ Pre Qualification - + Enter a Valid Qualification @@ -342,7 +332,7 @@ Occupation - Invalid Occupation @@ -351,7 +341,7 @@ Designation - Invalid Designation @@ -360,8 +350,8 @@ Company Name - + Invalid Company @@ -371,102 +361,128 @@ Referred By - Invalid Referred By
    - + Refer's Mobile Number is required. Enter a Valid Phone Number
    -
     {{ myModel | json }}
    +
    +
    + + +
    +
    + +
    +
    + +
    +
    + +
    +
    +
    +
    +
    Course Details - -
    -
    - - -
    -
    - -
    -
    - -
    -
    - -
    -
    -
    -
    -
    -
    -
    - - +
    -
    +
     {{ myModel | json }}
    + - - + + - - \ No newline at end of file + \ No newline at end of file From b2e81c9e12ef53e129a0bcebfb1d2de34bd69371 Mon Sep 17 00:00:00 2001 From: gandhi mathi Date: Tue, 28 Nov 2017 10:58:08 +0530 Subject: [PATCH 3/6] login ctrl --- Apollo/assets/js/controllers/loginCtrl.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Apollo/assets/js/controllers/loginCtrl.js b/Apollo/assets/js/controllers/loginCtrl.js index dbb4ec66..f8c5339a 100644 --- a/Apollo/assets/js/controllers/loginCtrl.js +++ b/Apollo/assets/js/controllers/loginCtrl.js @@ -1,6 +1,6 @@ 'use strict'; /** - * controllers for ng-table + * controllers for ng-table//commentgit * Simple table with sorting and filtering on AngularJS */ From 1d249219ad6e8529a23a51198660ac4f3d6f72f1 Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Tue, 28 Nov 2017 11:24:33 +0530 Subject: [PATCH 4/6] forgot password --- .../controllers/Forget_Controller.php | 82 +++++++++++ .../api/application/models/Forgot_model.php | 138 ++++++++++++++++++ Apollo/assets/js/controllers/forgetCtrl.js | 91 ++++++++++++ Apollo/assets/views/login_forgot.html | 27 ++-- 4 files changed, 328 insertions(+), 10 deletions(-) create mode 100644 Apollo/api/application/controllers/Forget_Controller.php create mode 100644 Apollo/api/application/models/Forgot_model.php create mode 100644 Apollo/assets/js/controllers/forgetCtrl.js diff --git a/Apollo/api/application/controllers/Forget_Controller.php b/Apollo/api/application/controllers/Forget_Controller.php new file mode 100644 index 00000000..3da21f75 --- /dev/null +++ b/Apollo/api/application/controllers/Forget_Controller.php @@ -0,0 +1,82 @@ +methods['forgetlogin_get']['limit'] = 500; // 500 requests per hour per user/key + $this->methods['forgetlogin_post']['limit'] = 500; // 500 requests per hour per user/key + + $this->methods['forgetlogin_delete']['limit'] = 50; // 50 requests per hour per user/key + + $this->load->model('Forgot_model', 'forgot_model'); + + } + + + public function forgetlogin_post() + { + //$userMobile = $this->post('userMobile'); + $details['MobileNumber'] = $this->post('userMobile'); + // $details['Password'] = $this->post('password'); + + + function generateRandomString($length = 8) { + $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; + $charactersLength = strlen($characters); + $randomString = ''; + for ($i = 0; $i < $length; $i++) { + $randomString .= $characters[rand(0, $charactersLength - 1)]; + } + return $randomString; + } + $password= generateRandomString(); + $details['Password'] = md5($password); + + $loginDetails = $this->forgot_model->forget($details, $password);// Check if the users data store contains users (in case the database result returns NULL) + if ($loginDetails) + { + $loginDetails['status'] = REST_Controller::HTTP_OK; + //Set the response and exit + $this->response($loginDetails, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code + + } + + + else + { + // Set the response and exit + $this->response([ + 'message' => 'No users were found', + 'status' => REST_Controller::HTTP_NOT_FOUND + ], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code + } + + + } + +} + diff --git a/Apollo/api/application/models/Forgot_model.php b/Apollo/api/application/models/Forgot_model.php new file mode 100644 index 00000000..ed744dca --- /dev/null +++ b/Apollo/api/application/models/Forgot_model.php @@ -0,0 +1,138 @@ + 7594aacdb21d8a9b29f71ea9163a5730 + */ + // + function forget($user=null, $password) + { + $this->db->select('ID,Emailid,MobileNumber,Password'); + $this->db->where('MobileNumber', $user['MobileNumber']); + + + + $forgotDetails = $this->db->get('T_Login')->first_row(); + //print_r ($forgotDetails) ; + //exit(); + + // $result = $query->result_array(); + if($forgotDetails){ + + $existUserID=$forgotDetails->ID; + $this->db->where('ID', $existUserID); + $upatePassword=$this->db->update('T_Login', $user); + // print_r ($upatePassword) ; + //exit(); + if($upatePassword) { + $result['forgotstatus'] = true; + $result['resPass'] = $password; + $result['message'] = "Password updated successfully"; + } + else{ + $result['forgotstatus'] = false; + $result['message'] = "Something went wrong!"; + } + + + } + else { + $result['forgotstatus'] = false; + $result['message'] = "User is not exist!"; + } + + return $result; + } + // public function change_Password( $userId, $newPassword, $oldPassword, $updateOn) { + // $this->db->select('Password'); + // $this->db->from(LOGIN); + // $this->db->where('ID', $userId); + // $loginDetails = $this->db->get()->first_row(); + // if ($loginDetails->Password == $oldPassword) { + // $sql = "UPDATE ".LOGIN." SET Password='$newPassword', UpdatedBy='$userId', UpdatedOn='$updateOn' WHERE ID='$userId'"; + // if($this->db->query($sql) == '1'){ + // $result['changePassStatus'] = true; + // $result['message'] = "Your Password Successfully changed !!"; + // } else { + // $result['changePassStatus'] = false; + // $result['message'] = "Please try Again !!"; + // } + // } else { + // $result['changePassStatus'] = false; + // $result['message'] = "Your Current Password miss match, Please try Again !!"; + // } + // return $result; + // } + +// + +// + //public function login($mobile = null) + //{ + // $this->db->select('MobileNumber'); + //$this->db->where('MobileNumber', $mobile); + //$this->db->where('IsActive', 1); + //$//loginDetails = $this->db->get(LOGIN)->first_row(); + //if($loginDetails){ + //if($mobile == $loginDetails->MobileNumber){ + + //if($password == $loginDetails->Password){ + //print_r($loginDetails);exit(); + //$this->db->select('t1.MobileNumber, t1.ListCode, t1.ID, t2.BranchCode'); + //$this->db->from(''.LOGIN.' as t1'); + //$this->db->where('t1.MobileNumber', $mobile); + //$this->db->join(''.STAFF.' as t2', 't1.StaffID = t2.StaffID', 'LEFT'); + //$responseDetails = $this->db->get()->first_row(); + //$result['loginStatus'] = true; + + //$result['details'] = $responseDetails; + + //} + //else { + //$result['loginStatus'] = false; + /* $result['message'] = "Please Enter Valid Password !!"; + } + } + else{ + $result['loginStatus'] = false; + $result['message'] = "Please Enter Register Mobile Number !!"; + } + } + else { + $result['loginStatus'] = false; + $result['message'] = "Something Went Wrong, Please try Again !!"; + } + + /*$this->db->join('areas a', 'a.id = e.id_area', 'inner'); + $this->db->join('horario h', 'h.id = e.id_horario', 'inner'); + $this->db->join('dia d', 'd.id = e.id_data', 'inner'); + $this->db->join('tipo_evento t', 't.id = e.id_tipo', 'inner'); + $this->db->join('campus c', 'c.id = e.id_unidade', 'inner'); + if ( $id != null ){ + $this->db->where('e.id', $id); + return $this->db->get('eventos')->first_row(); + } else { + return $this->db->get('eventos')->result(); + }*/ + + //return $result; + + // } + + +} \ No newline at end of file diff --git a/Apollo/assets/js/controllers/forgetCtrl.js b/Apollo/assets/js/controllers/forgetCtrl.js new file mode 100644 index 00000000..a9fe7935 --- /dev/null +++ b/Apollo/assets/js/controllers/forgetCtrl.js @@ -0,0 +1,91 @@ +'use strict'; +/** + * controllers for ng-table + * Simple table with sorting and filtering on AngularJS + */ + +app.controller('forgotCtrl', ["$scope", "$http", "API_POINTS", "$state", '$rootScope', '$cookies', 'md5','ipCookie', 'SweetAlert', function ($scope, $http, apiPoint, $state, $rootScope, $cookies, md5, ipCookie, SweetAlert) { + + /** + * login details capture + * by : srk + */ + // + + $scope.myModel = { + 'userMobile': '', + + }; + + + $scope.show = false; + + $scope.responseData = ''; + + $scope.forgotForm = { + submit: function (form) { + //alert("hi"); + 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(); + } else { + $scope.spin = ''; + var req = { + method: 'POST', + url: apiPoint.url + 'forgetlogin/', + headers: { + 'Content-Type': 'application/json' + }, + data: { + userMobile: $scope.myModel.userMobile, + // password: md5.createHash($scope.myModel.password || '') + } + }; + $http(req).then(function (response) { + if (response.data.forgotstatus == true) { + // $scope.responseData = response.data.forgotstatus; + //alert(response.data.message); + swal("Success!",response.data.resPass, "success"); + $state.go('login.signin'); + } else { + //alert(response.data.message); + swal("Failed!", response.data.message, "error"); + + // $scope.show = true; + // $(".alert").delay(200).addClass("in").fadeOut(3500); + } + }); + + // + + // + + } + }, + reset: function (form) { + $scope.myModel = angular.copy($scope.master); + form.$setPristine(true); + } + } +}]); + + + + + + + + +// forgetLogin -> Number(9876543210) -> (is he/she exist) yes---> genetate(md5(venba@123)) --> response(true check your mail, venba@123) +// no --> response(not exist) \ No newline at end of file diff --git a/Apollo/assets/views/login_forgot.html b/Apollo/assets/views/login_forgot.html index 789a49f6..27e5cb66 100644 --- a/Apollo/assets/views/login_forgot.html +++ b/Apollo/assets/views/login_forgot.html @@ -5,25 +5,32 @@ {{app.name}} -
    -
    +
    + + +
    Forget Password? -

    - Enter your e-mail address below to reset your password. +

    + Enter your Registered Mobile Number below to reset your password.

    -
    - - - -
    +
    + + + + + + mobile number is required. +
    +
    Log-In -
    From ea68cf8f298de2cd11063c300796a19bafba0a1e Mon Sep 17 00:00:00 2001 From: resicovenba Date: Tue, 28 Nov 2017 17:38:02 +0530 Subject: [PATCH 5/6] added student details --- Apollo/api/application/config/constants.php | 2 + Apollo/api/application/config/routes.php | 5 + .../controllers/Student_Controller.php | 160 +++++++- .../api/application/models/Student_model.php | 273 ++++++++++++- Apollo/assets/js/controllers/studentCtrl.js | 314 +++++++++++++- .../student/editStudentCourseDetails.html | 94 +++++ .../views/student/editStudentDetails.html | 385 ++++++++++++++++++ .../assets/views/student/student_details.html | 137 ++++--- 8 files changed, 1265 insertions(+), 105 deletions(-) create mode 100644 Apollo/assets/views/student/editStudentCourseDetails.html create mode 100644 Apollo/assets/views/student/editStudentDetails.html diff --git a/Apollo/api/application/config/constants.php b/Apollo/api/application/config/constants.php index e676e52d..940ae6c4 100644 --- a/Apollo/api/application/config/constants.php +++ b/Apollo/api/application/config/constants.php @@ -101,6 +101,8 @@ defined('LEAD_TRACKING') OR define('LEAD_TRACKING','T_Lead_Tracking'); defined('LEAD_TRACKING_FOLLOWUP') OR define('LEAD_TRACKING_FOLLOWUP','T_Lead_Tracking_Followup'); defined('PICK_LIST_DETAILS') OR define('PICK_LIST_DETAILS','T_PickListDetails'); defined('BATCH') OR define('BATCH','T_BatchMaster'); +defined('STUDENTCOURSE') OR define('STUDENTCOURSE','T_Student_CourseDetails'); +defined('STUDENTS') OR define('STUDENTS','T_StudentDetails'); //end of database table name diff --git a/Apollo/api/application/config/routes.php b/Apollo/api/application/config/routes.php index e68cdbe8..0ec723df 100644 --- a/Apollo/api/application/config/routes.php +++ b/Apollo/api/application/config/routes.php @@ -96,6 +96,11 @@ $route['changePassword'] = 'Login_Controller/changePassword'; // student $route['insertStudent'] = 'Student_Controller/addStudent'; $route['getCourseBatchForUniv'] = 'Student_Controller/getCourseBatch'; +$route['chkStudentExistDetail'] = 'Student_Controller/chkStudentExistDetail'; +$route['getStudentList'] = 'Student_Controller/getStudentList'; +$route['updateStudentExistDetail'] = 'Student_Controller/updateStudentExistDetail'; +$route['chkUpdateStuExistDetail'] = 'Student_Controller/chkUpdateStuExistDetail'; +$route['getStudentCourseDetails'] = 'Student_Controller/getStudentCourseDetails'; diff --git a/Apollo/api/application/controllers/Student_Controller.php b/Apollo/api/application/controllers/Student_Controller.php index dac2b884..5dff53dd 100644 --- a/Apollo/api/application/controllers/Student_Controller.php +++ b/Apollo/api/application/controllers/Student_Controller.php @@ -37,6 +37,126 @@ class Student_Controller extends REST_Controller { } + public function getStudentList_post() { + $reqData = $this->post('data'); + $loginUserId = $reqData['localUserID']; + $loginUserBranchId = $reqData['localBranchID']; + $loginUserType = $reqData['localType']; + + $studentListDetails = $this->student_model->get_student_list( $loginUserId, $loginUserBranchId, $loginUserType );// Check if the employee exist + if ($studentListDetails) + { + $studentListDetails['status'] = REST_Controller::HTTP_OK; + // Set the response and exit + $this->response($studentListDetails, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code + } + else + { + // Set the response and exit + $this->response([ + 'message' => 'No users were found', + 'status' => REST_Controller::HTTP_NOT_FOUND + ], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code + } + + } + + public function getStudentCourseDetails_post() { + $studentID = $this->post('studentID'); + $studentCourse = $this->student_model->get_student_course( $studentID );// Check if the employee exist + if ($studentCourse) + { + $studentCourse['status'] = REST_Controller::HTTP_OK; + // Set the response and exit + $this->response($studentCourse, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code + } + else + { + // Set the response and exit + $this->response([ + 'message' => 'No users were found', + 'status' => REST_Controller::HTTP_NOT_FOUND + ], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code + } + } + + public function chkUpdateStuExistDetail_post() { + $exceptId = $this->post('exceptId'); + $datas = $this->post('datas'); + $checkFor = $this->post('check'); + + $checkRes = $this->student_model->check_update_exist( $exceptId, $datas, $checkFor );// Check if the employee exist + if ($checkRes) + { + $checkRes['status'] = REST_Controller::HTTP_OK; + // Set the response and exit + $this->response($checkRes, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code + } + else + { + // Set the response and exit + $this->response([ + 'message' => 'No users were found', + 'status' => REST_Controller::HTTP_NOT_FOUND + ], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code + } + } + + public function updateStudentExistDetail_post(){ + $data = $this->post('data'); + $updatedBy = $this->post('updatedBy'); + $updateStudent = $data['StudentID']; + + $req['MobileNumber'] = $data['MobileNumber']; + $req['Firstname'] = $data['Firstname']; + $req['Lastname'] = $data['Lastname']; + $req['Fathername'] = $data['Fathername']; + $req['EmailID'] = $data['EmailID']; + $req['MotherName'] = $data['MotherName']; + + $req['AlternateNumber'] = $data['AlternateNumber']; + $req['Gender'] = $data['Gender']; + $req['DOB'] = $data['DOB']; + $req['PresentAddress'] = $data['PresentAddress']; + $req['PermanentAddress'] = $data['PermanentAddress']; + $req['AadharNumber'] = $data['AadharNumber']; + $req['OtherID'] = $data['OtherID']; + $req['OtherIDDetails'] = $data['OtherIDDetails']; + $req['Qualification'] = $data['Qualification']; + + $req['PreQualification'] = $data['PreQualification']; + $req['Caste'] = $data['Caste']; + $req['Category'] = $data['Category']; + $req['Religion'] = $data['Religion']; + $req['Nationality'] = $data['Nationality']; + $req['Occupation'] = $data['Occupation']; + $req['Designation'] = $data['Designation']; + $req['Companyname'] = $data['Companyname']; + $req['ReferredBy'] = $data['ReferredBy']; + $req['ReferersMobileNumber'] = $data['ReferersMobileNumber']; + + $req['IsActive'] = $data['IsActive']; + + $req['UpdatedBy'] = $updatedBy; + $date = date('Y-m-d H:i:s'); + $req['UpdatedOn'] = $date; + $studentUpdate = $this->student_model->update_student( $req, $updateStudent );// Check if the employee exist + if ($studentUpdate) + { + $studentUpdate['status'] = REST_Controller::HTTP_OK; + // Set the response and exit + $this->response($studentUpdate, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code + } + else + { + // Set the response and exit + $this->response([ + 'message' => 'No users were found', + 'status' => REST_Controller::HTTP_NOT_FOUND + ], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code + } + } + public function getCourseBatch_post() { $data = $this->post('data'); $getCourseBatchListDetails = $this->student_model->get_courseBatch_list($data);// Check if the employee exist @@ -55,9 +175,31 @@ class Student_Controller extends REST_Controller { ], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code } } + + public function chkStudentExistDetail_post() { + $data = $this->post('data'); + $checkData = $this->post('check'); + $checkRes = $this->student_model->check_exist( $data, $checkData );// Check if the employee exist + if ($checkRes) + { + $checkRes['status'] = REST_Controller::HTTP_OK; + // Set the response and exit + $this->response($checkRes, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code + } + else + { + // Set the response and exit + $this->response([ + 'message' => 'No users were found', + 'status' => REST_Controller::HTTP_NOT_FOUND + ], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code + } + + } // add student public function addStudent_post() { $data = $this->post('data'); + $coursedata = $this->post('coursedata'); $createdBy = $this->post('createdBy'); $createdBranch = $this->post('loginBranch'); @@ -86,12 +228,24 @@ class Student_Controller extends REST_Controller { $req['ReferersMobileNumber'] = $data['referredmobilenumber']; $req['PreQualification'] = $data['prequalification']; $req['IsActive'] = $data['switchsetting']; - + $req['CreatedBranch'] = $createdBranch; + $req['CreatedBy'] = $createdBy; $date = date('Y-m-d H:i:s'); $req['CreatedOn'] = $date; - print_r($req);exit(); - $studentAdd = $this->student_model->add_student( $req );// Check if the employee exist + + $reqCourse['UniversityID'] = $coursedata['university']; + $reqCourse['CourseID'] = $coursedata['course']; + $reqCourse['BatchCode'] = $coursedata['batch']; + $reqCourse['DOJ'] = $coursedata['dateofjoining']; + $reqCourse['BranchID'] = $createdBranch; + $reqCourse['IsActive'] = $data['switchsetting']; + $reqCourse['CreatedBy'] = $createdBy; + $date = date('Y-m-d H:i:s'); + $reqCourse['CreatedOn'] = $date; + + + $studentAdd = $this->student_model->add_student( $req , $reqCourse);// Check if the employee exist if ($studentAdd) { $studentAdd['status'] = REST_Controller::HTTP_OK; diff --git a/Apollo/api/application/models/Student_model.php b/Apollo/api/application/models/Student_model.php index d9ebc1d9..4544baf2 100644 --- a/Apollo/api/application/models/Student_model.php +++ b/Apollo/api/application/models/Student_model.php @@ -13,11 +13,106 @@ class Student_model extends CI_Model * * created by kdk * */ - + + // get student list based on login user + public function get_student_list($loginUserId, $loginUserBranchId, $loginUserType) + { + // echo $loginUserId, $loginUserBranchId, $loginUserType; exit(); + if ($loginUserType == SUPER_ADMIN) { + // list for super admin + // if ($loginUserBranchId == 'All') { + // // for getting all branch details + // $staffId = $this->selfGetEmpId($loginUserId); + // $this->db->select('*'); + // $this->db->order_by('CreatedOn', 'DESC'); + // $this->db->from(STAFF); + // // not for SuperAdmin and Student Role code + // $this->db->where_not_in('StaffID', $staffId); + // // $this->db->where('BranchCode', $loginUserBranchId); + // $empDetails = $this->db->get(); + // $checkArr = $empDetails->result(); + // if (count($checkArr) > 0) { + // $results['employeeList'] = true; + // $results['employees_details'] = $empDetails->result(); + // } else { + // $results['employeeList'] = false; + // $results['message'] = 'No record found'; + // } + // } else { + // $staffId = $this->selfGetEmpId($loginUserId); + // $this->db->select('*'); + // $this->db->order_by('CreatedOn', 'DESC'); + // $this->db->from(STAFF); + // // not for SuperAdmin and Student Role code + // $this->db->where_not_in('StaffID', $staffId); + // $this->db->where('BranchCode', $loginUserBranchId); + // $empDetails = $this->db->get(); + // $checkArr = $empDetails->result(); + // if (count($checkArr) > 0) { + // $results['employeeList'] = true; + // $results['employees_details'] = $empDetails->result(); + // } else { + // $results['employeeList'] = false; + // $results['message'] = 'No record found'; + // } + + // } + + } else if ($loginUserType == ADMIN) { + // list for admin + $this->db->select('*'); + $this->db->from(STUDENTS); + $this->db->order_by('CreatedOn', 'DESC'); + $this->db->where('CreatedBranch', $loginUserBranchId); + $stuDetails = $this->db->get(); + $checkArr = $stuDetails->result(); + if (count($checkArr) > 0) { + $results['studentList'] = true; + $results['student_details'] = $stuDetails->result(); + } else { + $results['studentList'] = false; + } + } else if ($loginUserType == STAFF) { + // list for staff + $this->db->select('*'); + $this->db->from(STUDENTS); + $this->db->order_by('CreatedOn', 'DESC'); + $this->db->where('CreatedBranch', $loginUserBranchId); + $stuDetails = $this->db->get(); + $checkArr = $stuDetails->result(); + if (count($checkArr) > 0) { + $results['studentList'] = true; + $results['student_details'] = $stuDetails->result(); + } else { + $results['studentList'] = false; + } + } else { + $results['studentList'] = false; + } + return $results; + } + + // get student course details + public function get_student_course($studentId) { + $this->db->select('*'); + $this->db->from(STUDENTCOURSE); + $this->db->where('StudentID', $studentId); + $courseDetails = $this->db->get(); + $checkArr = $courseDetails->result(); + if (count($checkArr) > 0) { + $result['stuCourseDetails'] = true; + $result['course_details'] = $courseDetails->result(); + } else { + $result['stuCourseDetails'] = false; + } + return $result; + } + + + //get course for university public function get_courseBatch_list($univId) { - $this->db->select('C.CourseID, C.CourseName'); $this->db->from(COURSE.' as C'); $this->db->where('UniversityID',$univId); @@ -46,41 +141,177 @@ class Student_model extends CI_Model return $result; } - // add student - public function add_employee($empArr, $createdBy) + // check exist + public function check_exist($data, $checkData) { - $this->db->insert(STAFF, $empArr); + if ($checkData == 'studentId') { + // check for student id + // $this->db->select('*'); + // $this->db->from(STAFF); + // $this->db->where('StaffID', $data); + // if ($this->db->get()->first_row()) { + // $result['existEmpId'] = true; + // $result['message'] = "This Employee ID is already exist!"; + // } else { + // $result['existEmpId'] = false; + // } + + } else if ($checkData == 'mobileNumber') { + // check for mobile number + $this->db->select('*'); + $this->db->from(STUDENTS); + $this->db->where('MobileNumber', $data); + if ($this->db->get()->first_row()) { + $result['existMobile'] = true; + $result['message'] = "This Mobile Number is already exist!"; + } else { + $this->db->select('*'); + $this->db->from(LOGIN); + $this->db->where('MobileNumber', $data); + if ($this->db->get()->first_row()) { + $result['existMobile'] = true; + $result['message'] = "This Mobile Number is already exist!"; + } else { + $result['existMobile'] = false; + } + } + + } else if ($checkData == 'emailId') { + // check for email id + $this->db->select('*'); + $this->db->from(STUDENTS); + $this->db->where('EmailID', $data); + if ($this->db->get()->first_row()) { + $result['existEmailId'] = true; + $result['message'] = "This EmailId is already exist!"; + } else { + $result['existEmailId'] = false; + } + } else { + } + return $result; + } + + // add student + public function add_student($Arr, $courseArr) + { + // print_r($Arr); + // print_r($courseArr);exit(); + $this->db->insert(STUDENTS, $Arr); + $insert_id = $this->db->insert_id('StudentID'); + $courseArr['StudentID'] = $insert_id; if ($this->db->affected_rows() == '1') { - $branchArr['StaffID'] = $empArr['StaffID']; - $branchArr['BranchCode'] = $empArr['BranchCode']; - $branchArr['IsActive'] = $empArr['IsActive']; - $branchArr['CreatedBy'] = $createdBy; - $this->db->insert(STAFF_BRANCH, $branchArr); + $this->db->insert(STUDENTCOURSE, $courseArr); if ($this->db->affected_rows() == '1') { - $loginArr['StaffID'] = $empArr['StaffID']; - $loginArr['ListCode'] = $empArr['ListCode']; - $loginArr['MobileNumber'] = $empArr['MobileNumber']; - $loginArr['EmailId'] = $empArr['EmailID']; - $loginArr['IsActive'] = $empArr['IsActive']; - $loginArr['CreatedBy'] = $createdBy; + $loginArr['StaffID'] = $courseArr['StudentID']; + $loginArr['ListCode'] = STUDENT; + $loginArr['MobileNumber'] = $Arr['MobileNumber']; + $loginArr['EmailId'] = $Arr['EmailID']; + $loginArr['IsActive'] = $Arr['IsActive']; + $loginArr['CreatedBy'] = $Arr['CreatedBy']; + $loginArr['CreatedOn'] = $Arr['CreatedOn']; $loginArr['Password'] = ENCR_PASSWORD; $this->db->insert(LOGIN, $loginArr); if ($this->db->affected_rows() == '1') { - $result['addEmpStatus'] = true; - $result['message'] = "Successfully employee details added"; + $result['addStudentStatus'] = true; + $result['message'] = "Successfully student details added"; } else { - $result['addEmpStatus'] = false; + $result['addStudentStatus'] = false; $result['message'] = "Something went wrong.please try again"; } } else { - $result['addEmpStatus'] = false; + $result['addStudentStatus'] = false; $result['message'] = "Something went wrong.please try again"; } } else { - $result['addEmpStatus'] = false; + $result['addStudentStatus'] = false; $result['message'] = "Something went wrong.please try again"; } return $result; } + // check existing data while update + public function check_update_exist($exceptId, $datas, $checkFor) + { + if ($checkFor == 'mobileNumber') { + // check update for mobile number + $this->db->select('*'); + $this->db->from(STUDENTS); + $this->db->where('MobileNumber', $datas); + $this->db->where_not_in('StudentID', $exceptId); + if ($this->db->get()->first_row()) { + $result['existMobile'] = true; + $this->db->select('MobileNumber'); + $this->db->from(STUDENTS); + $this->db->where('StudentID', $exceptId); + $result['resetValue'] = $this->db->get()->first_row(); + $result['message'] = "This Mobile Number is already exist!"; + } else { + // check login + $this->db->select('*'); + $this->db->from(LOGIN); + $this->db->where('MobileNumber', $datas); + $this->db->where_not_in('StaffID', $exceptId); + if($this->db->get()->first_row()) { + $result['existMobile'] = true; + $this->db->select('MobileNumber'); + $this->db->from(STUDENTS); + $this->db->where('StudentID', $exceptId); + $result['resetValue'] = $this->db->get()->first_row(); + $result['message'] = "This Mobile Number is already exist!"; + } else { + $result['existMobile'] = false; + } + } + + } else if ($checkFor == 'emailId') { + // check update for email + $this->db->select('*'); + $this->db->from(STUDENTS); + $this->db->where('EmailID', $datas); + $this->db->where_not_in('StudentID', $exceptId); + if ($this->db->get()->first_row()) { + $result['existEmailId'] = true; + $this->db->select('EmailID'); + $this->db->from(STUDENTS); + $this->db->where('StudentID', $exceptId); + $result['resetValue'] = $this->db->get()->first_row(); + $result['message'] = "This EmailId is already exist!"; + } else { + $result['existEmailId'] = false; + } + } else { + } + return $result; + } + // update student personal details + public function update_student($empArr, $updateFor) + { + // print_r($empArr); + // print_r($updateFor); + // exit(); + $this->db->where('StudentID', $updateFor); + $this->db->update(STUDENTS, $empArr); + if ($this->db->affected_rows() == '1') { + $mobile = $empArr['MobileNumber']; + $email = $empArr['EmailID']; + $active = $empArr['IsActive']; + $updatedBy = $empArr['UpdatedBy']; + $updatedOn = $empArr['UpdatedOn']; + $sql = "UPDATE ".LOGIN." SET MobileNumber='$mobile', EmailId='$email', IsActive='$active', UpdatedBy='$updatedBy', UpdatedOn='$updatedOn' WHERE StaffID='$updateFor'"; + if($this->db->query($sql) == '1'){ + $result['updateStuStatus'] = true; + $result['message'] = "Successfully student details Updated"; + } else { + $result['updateStuStatus'] = false; + $result['message'] = "Something went wrong.please try again"; + } + } else { + $result['updateStuStatus'] = false; + $result['message'] = "Something went wrong.please try again"; + } + return $result; + } + + } \ No newline at end of file diff --git a/Apollo/assets/js/controllers/studentCtrl.js b/Apollo/assets/js/controllers/studentCtrl.js index 657a899d..89bec977 100644 --- a/Apollo/assets/js/controllers/studentCtrl.js +++ b/Apollo/assets/js/controllers/studentCtrl.js @@ -32,11 +32,21 @@ app.controller('studentCtrl', ["$scope", "toaster", "$filter", "ngTableParams", 'occupation': '', 'designation': '', 'companyname': '', - 'referredby': '', + 'referredby': '', 'referredmobilenumber': '', 'switchsetting': true, }; - + + $scope.myModelCourse = { + 'university': '', + 'course': '', + 'batch': '', + 'dateofjoining': '', + 'enrollmentid': '' + }; + + + // 2017-11-23T00:00:00+0530 // sorting function for table params $scope.sort = function (keyname) { @@ -52,32 +62,88 @@ app.controller('studentCtrl', ["$scope", "toaster", "$filter", "ngTableParams", $scope.init = function () { if (localDetail != null) { $scope.currentDate = new Date(); + $scope.getStudentList(); $scope.getUniversityList(); - + // $scope.currentPage = 1; } else { } } - $scope.editId = -1; - $scope.editBranchId = -1; - $scope.setEditId = function (id) { - $scope.editId = id; - $scope.editBranchId = -1; + $scope.getStudentList = function () { + $scope.loader = true; + var empListreq = { + method: 'POST', + url: apiPoint.url + 'getStudentList/', + headers: { + 'Content-Type': 'application/json' + }, + data: { + data: localDetails + } + }; + $http(empListreq).then(function (response) { + if (response.data.studentList) { + $scope.loader = false; + $scope.studentData = true; + $scope.data = response.data.student_details; + } else { + $scope.loader = false; + $scope.studentData = false; + } + }); } - $scope.setEditBranchId = function (id) { - $scope.editBranchId = id; + $scope.editId = -1; + $scope.editCourseId = -1; + $scope.setEditId = function (id) { + $scope.editId = id; + $scope.editCourseId = -1; + } + + $scope.setEditCourseId = function (id) { + $scope.getStudentCourseDetails(id); + $scope.editCourseId = id; $scope.editId = -1; - $scope.branchEditLoading = true; + $scope.courseEditLoading = true; } $scope.cancel = function () { + $scope.getStudentList(); $scope.editId = -1; - $scope.editBranchId = -1; + $scope.editCourseId = -1; } - + $scope.getStudentCourseDetails = function (studentId) { + var req = { + method: 'POST', + url: apiPoint.url + 'getStudentCourseDetails/', + headers: { + 'Content-Type': 'application/json' + }, + data: { + studentID: studentId + } + }; + $http(req).then(function (response) { + if (response.data.stuCourseDetails) { + $scope.courseEditLoading = false; + $scope.studentCourse = response.data.course_details; + // $scope.branchArr = []; + // angular.forEach($scope.empBranchs, function (item, index) { + // // alert(item.BranchName); + // $scope.branchArr.push(item.BranchName); + // }); + // $scope.empBranchDetails = { + // arr: $scope.branchArr, + // } + // $scope.empRoleDetail = response.data.role_details[0]; + } else { + } + }); + } + + $scope.universityData = ''; $scope.getUniversityList = function () { @@ -99,21 +165,28 @@ app.controller('studentCtrl', ["$scope", "toaster", "$filter", "ngTableParams", }); } + $scope.onSlecetUnivEdit = function(id) { + // $scope.stucour.CourseID = ''; + // $scope.stucour.UniversityID = ''; + $scope.myModelCourse.university = id; + $scope.onSlecetUniv(); + } + $scope.courseData = ''; $scope.batchData = ''; $scope.courseLoading = false; - $scope.onSlecetUniv = function() { - $scope.myModel.course= ''; - $scope.myModel.batch= ''; - $scope.courseLoading = true; - var univListreq = { + $scope.onSlecetUniv = function () { + $scope.myModelCourse.course = ''; + $scope.myModelCourse.batch = ''; + $scope.courseLoading = true; + var univListreq = { method: 'POST', url: apiPoint.url + 'getCourseBatchForUniv/', headers: { 'Content-Type': 'application/json' }, data: { - data: $scope.myModel.university + data: $scope.myModelCourse.university } }; $http(univListreq).then(function (response) { @@ -127,9 +200,57 @@ app.controller('studentCtrl', ["$scope", "toaster", "$filter", "ngTableParams", }); } + + + + // check mobile number existing + $scope.checkMobileExist = function () { + var checkReq = { + method: 'POST', + url: apiPoint.url + 'chkStudentExistDetail/', + headers: { + 'Content-Type': 'application/json' + }, + data: { + data: $scope.myModel.primaryPhone, + check: 'mobileNumber' + } + }; + $http(checkReq).then(function (response) { + if (response.data.existMobile == true) { + swal("Warning!", response.data.message, "warning"); + $scope.myModel.primaryPhone = ''; + } else { + } + }); + } + + // check emailId existing + $scope.checkEmailExist = function () { + var checkReq = { + method: 'POST', + url: apiPoint.url + 'chkStudentExistDetail/', + headers: { + 'Content-Type': 'application/json' + }, + data: { + data: $scope.myModel.emailId, + check: 'emailId' + } + }; + $http(checkReq).then(function (response) { + if (response.data.existEmailId == true) { + swal("Warning!", response.data.message, "warning"); + $scope.myModel.emailId = ''; + } else { + } + }); + } + // add student $scope.studentFORM = { - submit: function (form, myModel) { + + submit: function (form, myModel, myModelCourse) { var firstError = null; if (form.$invalid) { var field = null, firstError = null; @@ -149,6 +270,7 @@ app.controller('studentCtrl', ["$scope", "toaster", "$filter", "ngTableParams", var formate = "dd-MM-yyyy"; $scope.myModel.switchsetting = $scope.myModel.switchsetting === true ? 1 : 0; $scope.myModel.dateofbirth = $filter('date')(new Date($scope.myModel.dateofbirth), formate); + $scope.myModelCourse.dateofjoining = $filter('date')(new Date($scope.myModelCourse.dateofjoining), formate); var req = { method: 'POST', url: apiPoint.url + 'insertStudent/', @@ -157,12 +279,13 @@ app.controller('studentCtrl', ["$scope", "toaster", "$filter", "ngTableParams", }, data: { data: $scope.myModel, + coursedata: $scope.myModelCourse, loginBranch: localDetails.localBranchID, createdBy: localDetails.localUserID, } }; $http(req).then(function (response) { - if (response.data.addEmpStatus == true) { + if (response.data.addStudentStatus == true) { swal("Success!", response.data.message, "success"); $state.go($state.current, {}, { reload: true }); } else { @@ -198,6 +321,155 @@ app.controller('studentCtrl', ["$scope", "toaster", "$filter", "ngTableParams", 'role': '', 'switchsetting': true, }; + }, resetCourse: function (form) { + form.$setPristine(true); + $scope.myModelCourse = { + 'university': '', + 'course': '', + 'batch': '', + 'dateofjoining': '', + 'enrollmentid': '' + }; + } + } + + + // update check mobile exist + $scope.updateCheckMobileExist = function (p) { + + var checkReq = { + method: 'POST', + url: apiPoint.url + 'chkUpdateStuExistDetail/', + headers: { + 'Content-Type': 'application/json' + }, + data: { + exceptId: p.StudentID, + datas: p.MobileNumber, + check: 'mobileNumber' + } + }; + $http(checkReq).then(function (response) { + if (response.data.existMobile == true) { + swal("Warning!", response.data.message, "warning"); + p.MobileNumber = response.data.resetValue.MobileNumber; + } else { + } + }); + } + + // update check email id exist + $scope.updateCheckEmailExist = function (p) { + var checkReq = { + method: 'POST', + url: apiPoint.url + 'chkUpdateStuExistDetail/', + headers: { + 'Content-Type': 'application/json' + }, + data: { + exceptId: p.StudentID, + datas: p.EmailID, + check: 'emailId' + } + }; + $http(checkReq).then(function (response) { + if (response.data.existEmailId == true) { + swal("Warning!", response.data.message, "warning"); + p.EmailID = response.data.resetValue.EmailID; + } else { + } + }); + } + + // update student details + $scope.updateStuDetails = function (form, p) { + 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 { + // alert(p.DOB); + var formate = "dd-MM-yyyy"; + var checkDOB = $filter('date')(new Date(p.DOB), formate); + p.IsActive = p.IsActive === true ? 1 : 0; + p.DOB = checkDOB == "NaN-NaN-0NaN" ? p.DOB : $filter('date')(new Date(p.DOB), formate); + var req = { + method: 'POST', + url: apiPoint.url + 'updateStudentExistDetail/', + headers: { + 'Content-Type': 'application/json' + }, + data: { + data: p, + updatedBy: localDetails.localUserID, + } + }; + $http(req).then(function (response) { + if (response.data.updateStuStatus = true) { + swal("Success!", response.data.message, "success"); + $scope.getStudentList(); + $scope.editId = -1; + } else { + // $scope.ldloading1[loading.replace('-', '_')] = false; + swal("Failed!", response.data.message, "error"); + } + }); + } + } + + $scope.updateStudentCourseDetails = function (form, datas) { + 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 { + // alert(p.DOB); + var formate = "dd-MM-yyyy"; + var checkDOB = $filter('date')(new Date(p.DOB), formate); + p.IsActive = p.IsActive === true ? 1 : 0; + p.DOB = checkDOB == "NaN-NaN-0NaN" ? p.DOB : $filter('date')(new Date(p.DOB), formate); + var req = { + method: 'POST', + url: apiPoint.url + 'updateStudentCourseDetail/', + headers: { + 'Content-Type': 'application/json' + }, + data: { + data: datas, + updatedBy: localDetails.localUserID, + } + }; + $http(req).then(function (response) { + if (response.data.updateStuStatus = true) { + swal("Success!", response.data.message, "success"); + $scope.getStudentList(); + $scope.editId = -1; + } else { + // $scope.ldloading1[loading.replace('-', '_')] = false; + swal("Failed!", response.data.message, "error"); + } + }); } } diff --git a/Apollo/assets/views/student/editStudentCourseDetails.html b/Apollo/assets/views/student/editStudentCourseDetails.html new file mode 100644 index 00000000..40cbda89 --- /dev/null +++ b/Apollo/assets/views/student/editStudentCourseDetails.html @@ -0,0 +1,94 @@ + +
    +
    +
    + +

    Fetching ...

    +
    +
    + +
    + + Course Details + +
     {{studentCourse | json }} 
    + +
    +
    +
    + + + University is required +
    +
    + + + Course is required +
    +
    + + + Batch is required +
    +
    + {{ stucour.ID}} + + + Invalid Entrollment ID +
    +
    + + + + + Date of Joining is required +
    +
    + +
    +
    +
    + + +
    +
    +
    +
    + +
    +
    +
    +
    + + \ No newline at end of file diff --git a/Apollo/assets/views/student/editStudentDetails.html b/Apollo/assets/views/student/editStudentDetails.html new file mode 100644 index 00000000..d1fe0489 --- /dev/null +++ b/Apollo/assets/views/student/editStudentDetails.html @@ -0,0 +1,385 @@ +
    +
    +
    +
    +
    + + Personal Details + + +
    +
    + + + Mobile Number is required. + Enter a Valid Phone Number +
    +
    + + + First Name required + Invalid First Name +
    +
    + + + Last Name required + Invalid Last Name +
    +
    +
    +
    + + + Father Name required + Invalid Father Name +
    +
    + + + + Mother Name required + Invalid Last Name +
    +
    + + + Email is required. + Please, enter a valid email address. +
    +
    +
    +
    + + + Alternate Mobile Number is required. + Enter a Valid Phone Number +
    + +
    +
    + + + + + Date of Birth is required. + Enter a Valid Date of Birth +
    +
    +
    + +
    + + + + + Gender is required. + +
    +
    +
    +
    +
    + + + Permanent Address is required +
    +
    + + + Current Address is required +
    +
    + + + Aadhar Number is required. + Enter a Valid Aadhar Number +
    +
    +
    + +
    +
    +
    + + + Aadhar Number is required. + Enter a Valid Details +
    +
    + + + Aadhar Number is required. + Enter a Valid Details +
    +
    +
    +
    + + + + Invalid Caste Name +
    +
    + + + + Invalid Category Name +
    +
    + +
    + +
    + + + + Invalid Religion Name +
    +
    + + + + Invalid Nationality Name +
    +
    + + + + Enter a Valid Qualification +
    +
    +
    + +
    + + + + Invalid Occupation +
    +
    + + + + Invalid Designation +
    +
    + + + + Invalid Company +
    +
    +
    +
    + + + + Invalid Referred By +
    +
    + + + Refer's Mobile Number is required. + Enter a Valid Phone Number +
    +
    +
    +
    + +
    + +
    +
    + +
    +
    +
    +
    + +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    + + + + + + diff --git a/Apollo/assets/views/student/student_details.html b/Apollo/assets/views/student/student_details.html index e22a626d..9cb1ab15 100644 --- a/Apollo/assets/views/student/student_details.html +++ b/Apollo/assets/views/student/student_details.html @@ -12,7 +12,7 @@
    - - - + + - - + + - @@ -89,7 +84,7 @@
    - --> + +

    + + + + + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Batch Code + + Batch Name + + University Name + + Action
    {{p.BatchCode}}{{p.BatchName}}{{p.UniversityName}} + + + + +
    + + +
    +
    + + + + + + + + + + +
    +
    +
    + +
    +
    + + Add New Batch Details + + +
    +
    + + + + Batch code is required + Invalid course id + +
    + + +
    + + + + Batch name is required + Invalid batch name + + +
    + +
    + + + University is required + +
    +
    + +
    +
    + + +
    +
    + + +
    + + +
    + + +
    +
    + +
    +
    +
    +
    + + + +
    +
    +
    +
    +
    +
    +
    +
    + + + + + + + + +