From debfe38adf0be13f960926d1b8c111b3a609fdb9 Mon Sep 17 00:00:00 2001 From: velz Date: Thu, 7 Jun 2018 18:55:01 +0530 Subject: [PATCH] NEW ROLE TRAINEE --- Apollo/api/application/config/constants.php | 1 + Apollo/api/application/models/Login_model.php | 2 +- .../api/application/models/Student_model.php | 2 +- .../assets/js/controllers/feesStatusCtrl.js | 7 + Apollo/assets/js/controllers/studentCtrl.js | 2 +- Apollo/assets/views/partials/nav.html | 225 ++++++++++++++++++ .../views/status-update/fees_status.html | 4 +- 7 files changed, 238 insertions(+), 5 deletions(-) diff --git a/Apollo/api/application/config/constants.php b/Apollo/api/application/config/constants.php index 3e81960a..ab3fa057 100755 --- a/Apollo/api/application/config/constants.php +++ b/Apollo/api/application/config/constants.php @@ -88,6 +88,7 @@ defined('SUPER_ADMIN') OR define('SUPER_ADMIN','R004'); defined('ADMIN') OR define('ADMIN','R003'); defined('EMPLOYEE') OR define('EMPLOYEE','R002'); defined('STUDENT') OR define('STUDENT','R001'); +defined('TRAINEE') OR define('TRAINEE','R005'); //status code defined('OPEN') OR define('OPEN','S001'); defined('CLOSE') OR define('CLOSE','S002'); diff --git a/Apollo/api/application/models/Login_model.php b/Apollo/api/application/models/Login_model.php index 58344f96..ce271f08 100755 --- a/Apollo/api/application/models/Login_model.php +++ b/Apollo/api/application/models/Login_model.php @@ -74,7 +74,7 @@ class Login_model extends CI_Model $result['loginStatus'] = false; $result['message'] = "Your login is de-activated."; } - } else if ($loginDetails->ListCode == ADMIN || $loginDetails->ListCode == EMPLOYEE) { + } else if ($loginDetails->ListCode == ADMIN || $loginDetails->ListCode == EMPLOYEE || $loginDetails->ListCode == TRAINEE) { //print_r($loginDetails);exit(); $this->db->select('t1.MobileNumber, t3.ListCode, t1.ID, t3.BranchCode, t3.FinanceModuleAccess'); $this->db->from('' . LOGIN . ' as t1'); diff --git a/Apollo/api/application/models/Student_model.php b/Apollo/api/application/models/Student_model.php index f03ca971..2f76ba8f 100755 --- a/Apollo/api/application/models/Student_model.php +++ b/Apollo/api/application/models/Student_model.php @@ -232,7 +232,7 @@ class Student_model extends CI_Model { $results['studentList'] = false; } } - } else if ($loginUserType == EMPLOYEE) { + } else if ($loginUserType == EMPLOYEE || $loginUserType == TRAINEE) { // list for staff if ($getSearchData["University"] === '' && $getSearchData["Course"] === '' && $getSearchData["Status"] === '') { $this->db->select("S.*, IF(SFP.ID > 0, '1' , '0') as Fee_paid_exist , SC.id as Student_Course_id , U.UniversityName, C.CourseName"); diff --git a/Apollo/assets/js/controllers/feesStatusCtrl.js b/Apollo/assets/js/controllers/feesStatusCtrl.js index 254e6c62..b964c820 100755 --- a/Apollo/assets/js/controllers/feesStatusCtrl.js +++ b/Apollo/assets/js/controllers/feesStatusCtrl.js @@ -91,6 +91,13 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n * created by kms * */ $scope.init = function () { + $scope.isTrainee = false; + var localUserType = JSON.parse(localStorage.getItem('localObj')).localType; + if(localUserType === 'R005') + { + $scope.isTrainee = true; + } + var getUniv = { method: 'POST', url: apiPoint.url + 'getUniversityCourseForFees/', diff --git a/Apollo/assets/js/controllers/studentCtrl.js b/Apollo/assets/js/controllers/studentCtrl.js index d205956d..d917af12 100755 --- a/Apollo/assets/js/controllers/studentCtrl.js +++ b/Apollo/assets/js/controllers/studentCtrl.js @@ -57,7 +57,7 @@ app.controller('studentCtrl', ["$scope", "toaster", "$filter", "ngTableParams", sixteenYearsInMS = 1000 * 60 * 60 * 24 * 365 * 16, sixteenYearsBeforeNow = new Date(nowInMS - sixteenYearsInMS); if (localDetail != null) { - if (localDetails.localType === 'R003' || localDetails.localType === 'R002') { + if (localDetails.localType === 'R003' || localDetails.localType === 'R002' || localDetails.localType === 'R005') { // $scope.currentDate = new Date(sixteenYearsBeforeNow); $scope.currentDate = new Date(); $scope.getStudentList(); diff --git a/Apollo/assets/views/partials/nav.html b/Apollo/assets/views/partials/nav.html index da255176..38377e1a 100755 --- a/Apollo/assets/views/partials/nav.html +++ b/Apollo/assets/views/partials/nav.html @@ -991,6 +991,231 @@ + + + + + + + + + diff --git a/Apollo/assets/views/status-update/fees_status.html b/Apollo/assets/views/status-update/fees_status.html index a7b19941..afda8dd2 100755 --- a/Apollo/assets/views/status-update/fees_status.html +++ b/Apollo/assets/views/status-update/fees_status.html @@ -121,10 +121,10 @@ {{user.CourseName}} - + - +