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['getListofStuPendingDocDetails'] = 'Student_Controller/getListofStuPendingDocDetails';
$route['addStudentEnrollPendingDocDetails'] = 'Student_Controller/addStudentEnrollPendingDocDetails'; $route['addStudentEnrollPendingDocDetails'] = 'Student_Controller/addStudentEnrollPendingDocDetails';
$route['deleteDocPendingDetails'] = 'Student_Controller/deleteDocPendingDetails'; $route['deleteDocPendingDetails'] = 'Student_Controller/deleteDocPendingDetails';
$route['getEmployeeDetailsBranch'] = 'Student_Controller/getEmployeeDetailsBranch';
//batch //batch
$route['addBatchDetails'] = 'Batch_Controller/addBatchDetails'; $route['addBatchDetails'] = 'Batch_Controller/addBatchDetails';

View File

@ -393,6 +393,7 @@ class Student_Controller extends REST_Controller {
$req['ReferersMobileNumber'] = $data['ReferersMobileNumber']; $req['ReferersMobileNumber'] = $data['ReferersMobileNumber'];
$req['ProfilePicPath'] = $data['ProfilePicPath']; $req['ProfilePicPath'] = $data['ProfilePicPath'];
$req['Comments'] = $data['Comments']; $req['Comments'] = $data['Comments'];
$req['AdmittedBy'] = $data['AdmittedBy'];
$req['DeactiveComments'] = $data['IsActive'] == 1 ? '' : $data['DeactiveComments']; $req['DeactiveComments'] = $data['IsActive'] == 1 ? '' : $data['DeactiveComments'];
$req['IsActive'] = $data['IsActive'] == 1 ? "1" : "0"; $req['IsActive'] = $data['IsActive'] == 1 ? "1" : "0";
$req['LoginAccess'] = $data['LoginAccess'] == 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['PreQualification'] = $data['prequalification'];
$req['IsActive'] = $data['switchsetting']; $req['IsActive'] = $data['switchsetting'];
$req['Comments'] = $data['Comments']; $req['Comments'] = $data['Comments'];
$req['AdmittedBy'] = $data['admittedBy'];
$req['BranchCode'] = $createdBranch; $req['BranchCode'] = $createdBranch;
$req['DeactiveComments'] = $data['switchsetting'] == 1 ? '' : $data['DeactiveComments']; $req['DeactiveComments'] = $data['switchsetting'] == 1 ? '' : $data['DeactiveComments'];
$req['CreatedBy'] = $createdBy; $req['CreatedBy'] = $createdBy;
@ -593,6 +595,7 @@ class Student_Controller extends REST_Controller {
$req['PreQualification'] = $data['prequalification']; $req['PreQualification'] = $data['prequalification'];
$req['IsActive'] = $data['switchsetting']; $req['IsActive'] = $data['switchsetting'];
$req['Comments'] = $data['Comments']; $req['Comments'] = $data['Comments'];
$req['AdmittedBy'] = $data['admittedBy'];
$req['BranchCode'] = $createdBranch; $req['BranchCode'] = $createdBranch;
$req['DeactiveComments'] = $data['switchsetting'] == 1 ? '' : $data['DeactiveComments']; $req['DeactiveComments'] = $data['switchsetting'] == 1 ? '' : $data['DeactiveComments'];
$req['CreatedBy'] = $createdBy; $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; 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 // image upload in taget path
public function upload_image($imageSource, $size, $target) { public function upload_image($imageSource, $size, $target) {
$key2 = substr(str_shuffle('abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'), 0, 12); $key2 = substr(str_shuffle('abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'), 0, 12);
@ -1014,6 +1036,8 @@ class Student_model extends CI_Model {
} }
} }
/* /*
* update followup details for application status in call tracking * update followup details for application status in call tracking
* created by kms * created by kms
@ -1145,4 +1169,5 @@ class Student_model extends CI_Model {
curl_close($ch); curl_close($ch);
return $output; return $output;
} }
} }

View File

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

View File

@ -368,6 +368,19 @@
</div> </div>
</div> </div>
<div class="row"> <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"> <div class="col-md-4">
<label> <label>
Active/De-Active Active/De-Active

View File

@ -588,6 +588,19 @@
</div> </div>
</div> </div>
<div class="row"> <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"> <div class="col-md-4">
<label> <label>
Active/De-Active Active/De-Active