student admitted employee details capturing while student entrollment : kdk

This commit is contained in:
dineshkumarkannan 2018-06-07 12:30:50 +05:30
parent 6ea6657fb0
commit d43efd8bec
6 changed files with 100 additions and 4 deletions

View File

@ -135,6 +135,7 @@ $route['deleteStuDocDetails'] = 'Student_Controller/deleteStuDocDetails';
$route['getListofStuPendingDocDetails'] = 'Student_Controller/getListofStuPendingDocDetails';
$route['addStudentEnrollPendingDocDetails'] = 'Student_Controller/addStudentEnrollPendingDocDetails';
$route['deleteDocPendingDetails'] = 'Student_Controller/deleteDocPendingDetails';
$route['getEmployeeDetailsBranch'] = 'Student_Controller/getEmployeeDetailsBranch';
//batch
$route['addBatchDetails'] = 'Batch_Controller/addBatchDetails';

View File

@ -393,6 +393,7 @@ class Student_Controller extends REST_Controller {
$req['ReferersMobileNumber'] = $data['ReferersMobileNumber'];
$req['ProfilePicPath'] = $data['ProfilePicPath'];
$req['Comments'] = $data['Comments'];
$req['AdmittedBy'] = $data['AdmittedBy'];
$req['DeactiveComments'] = $data['IsActive'] == 1 ? '' : $data['DeactiveComments'];
$req['IsActive'] = $data['IsActive'] == 1 ? "1" : "0";
$req['LoginAccess'] = $data['LoginAccess'] == 1 ? "1" : "0";
@ -528,6 +529,7 @@ class Student_Controller extends REST_Controller {
$req['PreQualification'] = $data['prequalification'];
$req['IsActive'] = $data['switchsetting'];
$req['Comments'] = $data['Comments'];
$req['AdmittedBy'] = $data['admittedBy'];
$req['BranchCode'] = $createdBranch;
$req['DeactiveComments'] = $data['switchsetting'] == 1 ? '' : $data['DeactiveComments'];
$req['CreatedBy'] = $createdBy;
@ -593,6 +595,7 @@ class Student_Controller extends REST_Controller {
$req['PreQualification'] = $data['prequalification'];
$req['IsActive'] = $data['switchsetting'];
$req['Comments'] = $data['Comments'];
$req['AdmittedBy'] = $data['admittedBy'];
$req['BranchCode'] = $createdBranch;
$req['DeactiveComments'] = $data['switchsetting'] == 1 ? '' : $data['DeactiveComments'];
$req['CreatedBy'] = $createdBy;
@ -622,4 +625,21 @@ class Student_Controller extends REST_Controller {
}
}
public function getEmployeeDetailsBranch_post() {
$data = $this->post('data');
$loginUserId = $data['localUserID'];
$loginBranchId = $data['localBranchID'];
$loginUserType = $data['localType'];
$getLoginBranchEmpList = $this->student_model->get_login_branch_Emp_list($loginUserId, $loginBranchId, $loginUserType); // Check if the employee exist
if ($getLoginBranchEmpList) {
$getLoginBranchEmpList['status'] = REST_Controller::HTTP_OK;
// Set the response and exit
$this->response($getLoginBranchEmpList, 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
}
}
}

View File

@ -999,6 +999,28 @@ class Student_model extends CI_Model {
return $result;
}
//get login branch employee list
public function get_login_branch_Emp_list($loginUserId, $loginBranchId, $loginUserType){
$this->db->select('t2.StaffID, t2.Firstname, t2.Lastname');
$this->db->from('' . STAFF_BRANCH . ' as t1');
$this->db->join('' . STAFF . ' as t2', 't2.StaffID = t1.StaffID', 'LEFT');
$this->db->group_by('t1.StaffID');
$this->db->where('t1.BranchCode', $loginBranchId);
// $this->db->where('t1.ListCode', EMPLOYEE);
$this->db->order_by('t1.CreatedOn', 'DESC');
$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';
}
return $results;
}
// image upload in taget path
public function upload_image($imageSource, $size, $target) {
$key2 = substr(str_shuffle('abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'), 0, 12);
@ -1013,6 +1035,8 @@ class Student_model extends CI_Model {
return $result;
}
}
/*
* update followup details for application status in call tracking
@ -1145,4 +1169,5 @@ class Student_model extends CI_Model {
curl_close($ch);
return $output;
}
}

View File

@ -63,6 +63,7 @@ app.controller('studentCtrl', ["$scope", "toaster", "$filter", "ngTableParams",
$scope.getStudentList();
$scope.getUniversityList();
$scope.getUniversitySearchList();
$scope.getEmployeeList();
$scope.myModelCourseAdd.dateofjoining = $filter('date')($scope.currentDate, 'dd-MM-yyyy');
$scope.myModelCourse.dateofjoining = $filter('date')($scope.currentDate, 'dd-MM-yyyy');
} else {
@ -73,6 +74,27 @@ app.controller('studentCtrl', ["$scope", "toaster", "$filter", "ngTableParams",
} else {
}
}
$scope.employeeList = '';
$scope.getEmployeeList = function() {
var getEmpListBranch = {
method: 'POST',
url: apiPoint.url + 'getEmployeeDetailsBranch/',
headers: {
'Content-Type': 'application/json'
},
data: {
data: localDetails
}
};
$http(getEmpListBranch).then(function (response) {
if (response.data.employeeList) {
$scope.employeeList = response.data.employees_details;
} else {
$scope.employeeList = '';
}
});
}
// get University List
$scope.universitySearchData = '';
@ -190,7 +212,8 @@ app.controller('studentCtrl', ["$scope", "toaster", "$filter", "ngTableParams",
'referredmobilenumber': '',
'switchsetting': true,
'DeactiveComments': '',
'Comments': ''
'Comments': '',
'admittedBy': ''
};
$scope.myModelCourse = {
@ -586,7 +609,7 @@ app.controller('studentCtrl', ["$scope", "toaster", "$filter", "ngTableParams",
} else {
var req = {
method: 'POST',
url: apiPoint.url + 'insertStudent/',
url: apiPoint.url + 'insertStudent1/',
headers: {
'Content-Type': 'application/json'
},
@ -639,7 +662,8 @@ app.controller('studentCtrl', ["$scope", "toaster", "$filter", "ngTableParams",
'referredmobilenumber': '',
'switchsetting': true,
'DeactiveComments': '',
'Comments': ''
'Comments': '',
'admittedBy': ''
};
$scope.myModelCourseAdd = {
'university': '',

View File

@ -368,6 +368,19 @@
</div>
</div>
<div class="row">
<div class="col-md-4" ng-class="{'has-error':Form.admittedBy.$dirty && Form.admittedBy.$invalid, 'has-success':Form.admittedBy.$valid}">
<label>
Admitted by <span class="symbol required"></span>
</label>
<select class="form-control" tabindex="27" class="cs-select cs-skin-elastic" name="admittedBy" ng-model="p.AdmittedBy"
required>
<option value="" disabled selected>Select Admitted By</option>
<option ng-repeat="item in employeeList" ng-selected="item.StaffID == p.AdmittedBy" value="{{item.StaffID}}">{{item.Firstname}} {{item.Lastname}}</option>
</select>
<span class="error text-small block" ng-if="Form.admittedBy.$dirty && Form.admittedBy.$error.required">Admitted By is Required</span>
</div>
<div class="col-md-4">
<label>
Active/De-Active

View File

@ -588,9 +588,22 @@
</div>
</div>
<div class="row">
<div class="col-md-4" ng-class="{'has-error':Form.admittedBy.$dirty && Form.admittedBy.$invalid, 'has-success':Form.admittedBy.$valid}">
<label>
Admitted by <span class="symbol required"></span>
</label>
<select class="form-control" tabindex="27" class="cs-select cs-skin-elastic" name="admittedBy" ng-model="myModel.admittedBy"
required>
<option value="" disabled selected>Select Admitted By</option>
<option ng-repeat="item in employeeList" value="{{item.StaffID}}">{{item.Firstname}} {{item.Lastname}}</option>
</select>
<span class="error text-small block" ng-if="Form.admittedBy.$dirty && Form.admittedBy.$error.required">Admitted By is Required</span>
</div>
<div class="col-md-4">
<label>
Active/De-Active
Active/De-Active
</label>
<div ng-switch="myModel.switchsetting">