This commit is contained in:
resicovenba 2017-12-18 13:40:13 +05:30
commit 738e3d5793
11 changed files with 156 additions and 31 deletions

View File

@ -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

View File

@ -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';

View File

@ -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
}
}
}

View File

@ -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']= "";
}

View File

@ -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",

View File

@ -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'
},

View File

@ -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'),

View File

@ -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);
}

View File

@ -33,6 +33,11 @@
<span class="title" translate="sidebar.nav.master.STATUS"> STATUS DETAILS</span>
</a>
</li>
<li ui-sref-active="active" >
<a ui-sref="app.master.studentStatusUpdate">
<span class="title" translate="sidebar.nav.master.STUDENTSTATUS"> DEFAULT STUDENT ACTIVITY</span>
</a>
</li>
<li ui-sref-active="active">
<a ui-sref="app.master.activity">
<span class="title" translate="sidebar.nav.master.ACTIVITY"> ACTIVITY DETAILS </span>

View File

@ -32,7 +32,7 @@
</section>
<!-- end: PAGE TITLE -->
<!-- start: LIST GROUP -->
<div class="container-fluid container-fullw bg-white" ng-controller="feesStatusCtrl" data-ng-init="init(viewForm,myModel,'')">
<div class="container-fluid container-fullw bg-white" ng-controller="feesStatusCtrl" data-ng-init="init()">
<form name="Form" id="form" novalidate method="post">
<div class="row">
@ -59,10 +59,32 @@
<input type="text" placeholder="Search Student Name"
tabindex="2" class="form-control" name="studentname"
ng-model="myModel.studentName" ng-pattern="/^[a-zA-Z.\s]*$/"/>
ng-model="myModel.studentName" ng-pattern="/^[a-zA-Z.\s]*$/" ng-change="getStudentDetails(Form,myModel);" />
<span class="error text-small block"
ng-if="Form.studentname.$dirty && Form.studentname.$error.pattern">Invalid student name </span>
</div>
<div class="col-md-3 form-group">
<label>
University
</label>
<select class="form-control" name="university" tabindex="3" id="university"
ng-model="myModel.universityName"
ng-options="details.universityName for details in university" ng-change="getStudentDetails(Form,myModel);">
<option value=""> Select University</option>
</select>
</div>
<div class="col-md-3 form-group">
<label>
Course
</label>
<select class="form-control" name="course" tabindex="4" id="course"
ng-model="myModel.courseName"
ng-options="courseDetails.CourseID as courseDetails.CourseName for courseDetails in myModel.universityName.courseDetails" ng-change="getStudentDetails(Form,myModel);">
<option value=""> Select Course</option>
</select>
</div>
</div>
</fieldset>

View File

@ -16,7 +16,7 @@
<label>
Fees Type <span class="symbol required"></span>
</label>
<select class="form-control" name="feesType" tabindex="3" id="feesType"
<select class="form-control" name="feesType" tabindex="7" id="feesType"
ng-model="updateModel.feesType"
ng-options="fees.Sem_Year for fees in studentFeesInfo"
required ng-change="changeTotalFees(updateModel,'0');">
@ -32,7 +32,7 @@
</label>
<input type="text" placeholder="Enter Session Name"
tabindex="4" class="form-control" name="sessionname"
tabindex="8" class="form-control" name="sessionname"
ng-model="updateModel.sessionName" ng-pattern="/^[a-zA-Z0-9-./\s]*$/" required />
<span class="error text-small block"
ng-if="Form.sessionname.$dirty && Form.sessionname.$error.required">Session name is required</span>
@ -49,7 +49,7 @@
</label>
<input type="text" placeholder="Enter Fees Amount"
autofocus tabindex="5" class="form-control" name="feesAmount" id="feesAmount" ng-maxlength="9"
autofocus tabindex="9" class="form-control" name="feesAmount" id="feesAmount" ng-maxlength="9"
ng-model="updateModel.feesType.PendingFees" ng-pattern="/^[0-9]*$/" required ng-change="changeTotalFees(updateModel,'1');"/>
<span class="error text-small block"
ng-if="Form.feesAmount.$dirty && Form.feesAmount.$invalid"
@ -65,7 +65,7 @@
</label>
<input type="text" placeholder="Enter STF/WR Amount"
autofocus tabindex="6" class="form-control" name="STF" id="STF" ng-maxlength="9"
autofocus tabindex="10" class="form-control" name="STF" id="STF" ng-maxlength="9"
ng-model="updateModel.STF_WR" ng-pattern="/^[0-9]*$/" ng-change="changeTotalFees(updateModel,'1');" />
<span class="error text-small block"
ng-if="Form.STF.$dirty && Form.STF.$invalid"
@ -81,7 +81,7 @@
</label>
<input type="text" placeholder="Enter Other Amount"
autofocus tabindex="7" class="form-control" name="others" id="others" ng-maxlength="9"
autofocus tabindex="11" class="form-control" name="others" id="others" ng-maxlength="9"
ng-model="updateModel.others" ng-pattern="/^[0-9]*$/" ng-change="changeTotalFees(updateModel,'1');"/>
<span class="error text-small block"
ng-if="Form.others.$dirty && Form.others.$invalid"
@ -97,7 +97,7 @@
</label>
<input type="text" placeholder="Enter Waiver Amount"
autofocus tabindex="8" class="form-control" name="waiver" id="waiver" ng-maxlength="9"
autofocus tabindex="12" class="form-control" name="waiver" id="waiver" ng-maxlength="9"
ng-model="updateModel.waiver" ng-pattern="/^[0-9]*$/" ng-change="changeTotalFees(updateModel,'1');"/>
<span class="error text-small block"
ng-if="Form.waiver.$dirty && Form.waiver.$invalid"
@ -113,7 +113,7 @@
</label>
<input type="text" placeholder="Enter Total Amount"
autofocus tabindex="9" class="form-control" name="total" id="total" ng-maxlength="9"
autofocus tabindex="13" class="form-control" name="total" id="total" ng-maxlength="9"
ng-model="updateModel.total" ng-pattern="/^[0-9]*$/"/>
<span class="error text-small block"
ng-if="Form.total.$dirty && Form.total.$invalid"
@ -173,7 +173,7 @@
</label>
<input type="text" placeholder="Enter Bill No"
tabindex="10" class="form-control" name="billno"
tabindex="14" class="form-control" name="billno"
ng-model="updateModel.billNo" ng-pattern="/^[a-zA-Z0-9-./\s]*$/" required/>
<span class="error text-small block"
ng-if="Form.billno.$dirty && Form.billno.$error.required">Bill no is required</span>
@ -187,7 +187,7 @@
</label>
<input type="text" placeholder="Enter Fees Amount"
autofocus tabindex="11" class="form-control" name="billAmount" id="billAmount" ng-maxlength="9"
autofocus tabindex="15" class="form-control" name="billAmount" id="billAmount" ng-maxlength="9"
ng-model="updateModel.billAmount" ng-pattern="/^[0-9]*$/" required/>
<span class="error text-small block"
ng-if="Form.billAmount.$dirty && Form.billAmount.$invalid"
@ -202,7 +202,7 @@
<label>
Mode Of Payment <span class="symbol required"></span>
</label>
<select class="form-control" name="paymentOn" tabindex="12" id="paymentOn"
<select class="form-control" name="paymentOn" tabindex="16" id="paymentOn"
ng-model="updateModel.paymentOn"
ng-options="payment.paymentOn for payment in paymentOptions"
required>
@ -217,7 +217,7 @@
<label>
Comments For Student
</label>
<textarea placeholder="Enter Comments" tabindex="13"
<textarea placeholder="Enter Comments" tabindex="17"
class="form-control textdsc" name="studcomments"
ng-model="updateModel.studComments" required></textarea>
<!--<span class="error text-small block"
@ -230,7 +230,7 @@
<label>
Comments For Internal
</label>
<textarea placeholder="Enter Comments" tabindex="14"
<textarea placeholder="Enter Comments" tabindex="18"
class="form-control textdsc" name="internalcomments"
ng-model="updateModel.internalComments" required></textarea>
<!--<span class="error text-small block"
@ -289,11 +289,11 @@
<div class="row">
<div class="col-md-12">
<div class="pull-right">
<button type="submit" ladda="ldloading.zoom_in" tabindex="15" class="btn btn-wide btn-success" data-style="zoom-in" ng-click="saveFees(user,Form,updateModel,'zoom-in')">
<button type="submit" ladda="ldloading.zoom_in" tabindex="19" class="btn btn-wide btn-success" data-style="zoom-in" ng-click="saveFees(user,Form,updateModel,'zoom-in')">
Save
</button>
<input type="button" class="btn btn-warning btn-wide" tabindex="16" value="Cancel"
<input type="button" class="btn btn-warning btn-wide" tabindex="20" value="Cancel"
ng-click="cancel();">
</input>