diff --git a/Apollo/api/application/config/constants.php b/Apollo/api/application/config/constants.php index d2cb6063..ce687749 100755 --- a/Apollo/api/application/config/constants.php +++ b/Apollo/api/application/config/constants.php @@ -117,6 +117,8 @@ defined('STUDENTS_FEES_STATUS') OR define('STUDENTS_FEES_STATUS','T_Students_Fee defined('STUDENTS_FEES_PAID') OR define('STUDENTS_FEES_PAID','T_Students_Fees_PaidDetails'); defined('STUDY_MATERIAL_STATUS') OR define('STUDY_MATERIAL_STATUS','T_StudyMaterialStatus'); defined('CERTIFICATION') OR define('CERTIFICATION','T_CertificationMaster'); +defined('DEFAULTACTIVITY') OR define('DEFAULTACTIVITY','T_StatusMaster'); + //end of database table name diff --git a/Apollo/api/application/config/routes.php b/Apollo/api/application/config/routes.php index 54a8db30..e286ea0f 100755 --- a/Apollo/api/application/config/routes.php +++ b/Apollo/api/application/config/routes.php @@ -148,6 +148,13 @@ $route['getStudentFeesStructure'] = 'Fees_Status_Controller/getFeesStructure'; /*update fees details for student*/ $route['updateFeesDetails'] = 'Fees_Status_Controller/updateFeesDetails'; $route['getUniversityCourseForFees'] = 'Fees_Status_Controller/getUniversityCourseForFees'; +/* + * get default activity details + * */ +$route['getDefaultActivityDetails'] = 'University_Controller/getDefaultActivityDetails'; +$route['updateDefaultActivityDetails'] = 'University_Controller/updateDefaultActivityDetails'; + + diff --git a/Apollo/api/application/controllers/Fees_Status_Controller.php b/Apollo/api/application/controllers/Fees_Status_Controller.php index 7d8a998b..dc80db80 100755 --- a/Apollo/api/application/controllers/Fees_Status_Controller.php +++ b/Apollo/api/application/controllers/Fees_Status_Controller.php @@ -36,6 +36,7 @@ class Fees_Status_Controller extends REST_Controller { $this->methods['getStudentList_delete']['limit'] = 50; // 50 requests per hour per user/key $this->methods['getFeesStructure_post']['limit'] = 1000; // 1000 requests per hour per user/key $this->methods['updateFeesDetails_post']['limit'] = 1000; // 1000 requests per hour per user/key + $this->methods['getUniversityCourseForFees_post']['limit'] = 1000; // 1000 requests per hour per user/key // load the model $this->load->model('Fees_status_model', 'Fees_model'); @@ -52,6 +53,8 @@ class Fees_Status_Controller extends REST_Controller { $search['requestedBy'] = $this->post('requestedtBy'); $search['Firstname'] = $this->post('studentName'); $search['MobileNumber'] = $this->post('mobileNumber'); + $search['UniversityID'] = $this->post('university'); + $search['CourseID'] = $this->post('course'); $getStudentDetails = $this->Fees_model->getStudentList($search); if ($getStudentDetails) { @@ -147,6 +150,32 @@ class Fees_Status_Controller extends REST_Controller { } + /* + * get university and course details for fees update + * created by kms + * */ + public function getUniversityCourseForFees_post() + { + $getUnivDetails = $this->Fees_model->getUniversityDetails(); + if ($getUnivDetails) + { + $getUnivDetails['status'] = REST_Controller::HTTP_OK; + // Set the response and exit + $this->response($getUnivDetails, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code + } + else + { + // Set the response and exit + $this->response([ + 'message' => 'No records found!', + 'status' => REST_Controller::HTTP_NOT_FOUND + ], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code + } + + + } + + } \ No newline at end of file diff --git a/Apollo/api/application/models/Fees_status_model.php b/Apollo/api/application/models/Fees_status_model.php index 2363df2f..0977d6a7 100755 --- a/Apollo/api/application/models/Fees_status_model.php +++ b/Apollo/api/application/models/Fees_status_model.php @@ -16,7 +16,7 @@ class Fees_status_model extends CI_Model * */ public function getStudentList($search=null) { - if($search['MobileNumber']!='' OR $search['Firstname']!=''){ + if($search['MobileNumber']!='' OR $search['Firstname']!='' OR $search['UniversityID']!='' OR $search['CourseID']!=''){ $this->db->select('ST.StudentID,ST.MobileNumber,ST.Firstname,ST.Fathername,ST.EmailID,STC.ID,US.UniversityID,US.UniversityName,CU.CourseID,CU.CourseName,BA.BatchCode,BA.BatchName'); $this->db->from(STUDENTS.' as ST'); $this->db->join(STUDENTCOURSE.' as STC', 'STC.StudentID = ST.StudentID'); @@ -25,7 +25,19 @@ class Fees_status_model extends CI_Model $this->db->join(UNIVERSITY.' as US', 'US.UniversityID = CU.UniversityID'); $this->db->where('ST.IsActive','1'); $this->db->where('STC.IsActive','1'); - if($search['MobileNumber']!='' AND $search['Firstname']==''){ + if($search['MobileNumber']!=''){ + $this->db->where('ST.MobileNumber',$search['MobileNumber']); + } + if($search['Firstname']!=''){ + $this->db->where('ST.Firstname',$search['Firstname']); + } + if($search['UniversityID']!=''){ + $this->db->where('STC.UniversityID',$search['UniversityID']); + } + if($search['CourseID']!=''){ + $this->db->where('STC.CourseID',$search['CourseID']); + } + /* if($search['MobileNumber']!='' AND $search['Firstname']==''){ $this->db->where('ST.MobileNumber',$search['MobileNumber']); } else if($search['MobileNumber']=='' AND $search['Firstname']!=''){ @@ -34,7 +46,7 @@ class Fees_status_model extends CI_Model else if($search['MobileNumber']!='' AND $search['Firstname']!=''){ $this->db->where('ST.MobileNumber',$search['MobileNumber']); $this->db->where('ST.Firstname',$search['Firstname']); - } + }*/ $searchDetails = $this->db->get(); if($searchDetails->result()) { @@ -235,22 +247,23 @@ class Fees_status_model extends CI_Model if($unviversityDetails->result()){ $result_university = array(); + $result_university['universityStatus'] = true; foreach ($unviversityDetails->result() as $row) { - $university_array['universityStatus'] = true; + $university_array['universityID'] = $row->UniversityID; $university_array['universityName'] = $row->UniversityName; $university_array['courseDetails']= $this->getCourseDetails($row->UniversityID); - $result_university[]=$university_array; + $result_array[]=$university_array; } + $result_university['univerSityDetails']= $result_array; } else { - $university_array['universityStatus'] = false; - $university_array['message'] = "No records found!"; - $university_array['universityID'] = ""; - $university_array['universityName'] = ""; - $university_array['courseDetails']= ""; - $result_university[]=$university_array; + $result_university['universityStatus'] = false; + $result_university['message'] = "No records found!"; + $result_university['universityID'] = ""; + $result_university['universityName'] = ""; + $result_university['courseDetails']= ""; } diff --git a/Apollo/assets/i18n/en.json b/Apollo/assets/i18n/en.json index 9d2c5d5d..7202906e 100755 --- a/Apollo/assets/i18n/en.json +++ b/Apollo/assets/i18n/en.json @@ -66,7 +66,8 @@ "ACTIVITY": "ACTIVITY DETAILS", "EMPLOYEE": "EMPLOYEE DETAILS", "ANNOUNCEMENT": "ANNOUNCEMENT DETAILS", - "STATUS": "STATUS DETAILS" + "STATUS": "STATUS DETAILS", + "STUDENTSTATUS": "DEFAULT STUDENT ACTIVITY" }, "student": { "MAIN": "MANAGE STUDENTS", diff --git a/Apollo/assets/js/config.constant.js b/Apollo/assets/js/config.constant.js index 844dee87..e4d62d21 100755 --- a/Apollo/assets/js/config.constant.js +++ b/Apollo/assets/js/config.constant.js @@ -129,6 +129,9 @@ app.constant('JS_REQUIRES', { * fees status ctrl * */ 'feesStatusCtrl':'assets/js/controllers/feesStatusCtrl.js', + /*student status update*/ + + 'studentStatusUpdateCtrl':'assets/js/controllers/studentStatusUpdateCtrl.js', //*** Filters 'htmlToPlaintext': 'assets/js/filters/htmlToPlaintext.js' }, diff --git a/Apollo/assets/js/config.router.js b/Apollo/assets/js/config.router.js index f77b3dfa..c685e44b 100755 --- a/Apollo/assets/js/config.router.js +++ b/Apollo/assets/js/config.router.js @@ -149,7 +149,15 @@ app.config(['$stateProvider', '$urlRouterProvider', '$controllerProvider', '$com ncyBreadcrumb: { label: 'Status' }, - }).state('app.master.activity', { + }).state('app.master.studentStatusUpdate', { + url: '/default activity', + templateUrl: "assets/views/studentStatusUpdate.html", + resolve: loadSequence('studentStatusUpdateCtrl','ngTable', 'ladda', 'angular-ladda'), + title: 'Status', + ncyBreadcrumb: { + label: 'Status' + }, + }).state('app.master.activity', { url: '/activity', templateUrl: "assets/views/activity.html", resolve: loadSequence('ui.select','activityCtrl','ngTable', 'ladda', 'angular-ladda'), diff --git a/Apollo/assets/js/controllers/feesStatusCtrl.js b/Apollo/assets/js/controllers/feesStatusCtrl.js index b60c8a72..0188d93c 100755 --- a/Apollo/assets/js/controllers/feesStatusCtrl.js +++ b/Apollo/assets/js/controllers/feesStatusCtrl.js @@ -8,6 +8,8 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n $scope.myModel = { "studentName": "", "mobileNumber": "", + "universityName":"", + "courseName":"" }; /* @@ -53,12 +55,45 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n $scope.reverse = !$scope.reverse; //if true make it false and vice versa } + /* + * init function + * created by kms + * */ + $scope.init = function () { + var getUniv = { + method: 'POST', + url: apiPoint.url + 'getUniversityCourseForFees/', + headers: { + 'Content-Type': 'application/json' + }, + data: { + requestedBy: JSON.parse(localStorage.getItem('localObj')).localUserID + } + }; + $http(getUniv).then(function (response) { + if (response.data.status==200 && response.data.universityStatus) { + $scope.university=response.data.univerSityDetails; + + + } else { + $scope.university=""; + + } + }); + } + /* * get student details * created by kms * */ $scope.studentInfo=""; $scope.getStudentDetails = function (form,myModel) { + if(myModel.universityName == null || myModel.universityName == '' || myModel.universityName == undefined){ + $scope.univId = ""; + } + else{ + $scope.univId = myModel.universityName.universityID; + } var firstError = null; if (form.$invalid) { @@ -85,6 +120,8 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n data: { studentName: myModel.studentName, mobileNumber: myModel.mobileNumber, + university: $scope.univId, + course:myModel.courseName, requestedtBy: JSON.parse(localStorage.getItem('localObj')).localUserID } }; @@ -249,7 +286,6 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n $http(updateFees).then(function (response) { if (response.data.status==200 && response.data.paidStatus) { $scope.ldloading[loading.replace('-', '_')] = false; - // $rootScope.init(); swal("Success!", response.data.message, "success"); $scope.getStudentFeesStructure(myModel.ID,myModel.CourseID,myModel.StudentID); @@ -271,7 +307,6 @@ app.controller('feesStatusCtrl', ["$scope","$rootScope","toaster", "$filter", "n } else { $scope.ldloading[loading.replace('-', '_')] = false; - //$rootScope.init(); swal("Failed!", response.data.message, "error"); $scope.getStudentFeesStructure(myModel.ID,myModel.CourseID,myModel.StudentID); } diff --git a/Apollo/assets/views/partials/nav.html b/Apollo/assets/views/partials/nav.html index 8a52f52b..40ae9422 100755 --- a/Apollo/assets/views/partials/nav.html +++ b/Apollo/assets/views/partials/nav.html @@ -33,6 +33,11 @@ STATUS DETAILS +
  • + + DEFAULT STUDENT ACTIVITY + +
  • ACTIVITY DETAILS diff --git a/Apollo/assets/views/status-update/fees_status.html b/Apollo/assets/views/status-update/fees_status.html index e0f9c1b0..de6e9624 100755 --- a/Apollo/assets/views/status-update/fees_status.html +++ b/Apollo/assets/views/status-update/fees_status.html @@ -32,7 +32,7 @@ -
    +
    @@ -59,10 +59,32 @@ + ng-model="myModel.studentName" ng-pattern="/^[a-zA-Z.\s]*$/" ng-change="getStudentDetails(Form,myModel);" /> Invalid student name
    +
    + + + +
    +
    + + + +
    diff --git a/Apollo/assets/views/status-update/updateFeesStatus.html b/Apollo/assets/views/status-update/updateFeesStatus.html index 21a4868c..6375bde9 100644 --- a/Apollo/assets/views/status-update/updateFeesStatus.html +++ b/Apollo/assets/views/status-update/updateFeesStatus.html @@ -16,7 +16,7 @@ - Session name is required @@ -49,7 +49,7 @@ Bill no is required @@ -187,7 +187,7 @@ Mode Of Payment -