student details update
This commit is contained in:
parent
2e3db5e639
commit
8825de2e9e
@ -134,6 +134,7 @@ class Student_Controller extends REST_Controller {
|
|||||||
$req['DOJ'] = $data['DOJ'];
|
$req['DOJ'] = $data['DOJ'];
|
||||||
$req['IsActive'] = $data['IsActive'];
|
$req['IsActive'] = $data['IsActive'];
|
||||||
$req['BranchID'] = $data['BranchID'];
|
$req['BranchID'] = $data['BranchID'];
|
||||||
|
$req['EnrollmentID'] = $data['EnrollmentID'];
|
||||||
$req['UpdatedBy'] = $updatedBy;
|
$req['UpdatedBy'] = $updatedBy;
|
||||||
$date = date('Y-m-d H:i:s');
|
$date = date('Y-m-d H:i:s');
|
||||||
$req['UpdatedOn'] = $date;
|
$req['UpdatedOn'] = $date;
|
||||||
@ -262,6 +263,7 @@ class Student_Controller extends REST_Controller {
|
|||||||
$reqCourse['CourseID'] = $coursedata['course'];
|
$reqCourse['CourseID'] = $coursedata['course'];
|
||||||
$reqCourse['BatchCode'] = $coursedata['batch'];
|
$reqCourse['BatchCode'] = $coursedata['batch'];
|
||||||
$reqCourse['DOJ'] = $coursedata['dateofjoining'];
|
$reqCourse['DOJ'] = $coursedata['dateofjoining'];
|
||||||
|
$reqCourse['EnrollmentID'] = $coursedata['enrollmentid'];
|
||||||
$reqCourse['BranchID'] = $createdBranch;
|
$reqCourse['BranchID'] = $createdBranch;
|
||||||
$reqCourse['IsActive'] = '1';
|
$reqCourse['IsActive'] = '1';
|
||||||
$reqCourse['CreatedBy'] = $createdBy;
|
$reqCourse['CreatedBy'] = $createdBy;
|
||||||
@ -329,22 +331,20 @@ class Student_Controller extends REST_Controller {
|
|||||||
$reqCourse['CourseID'] = $coursedata['course'];
|
$reqCourse['CourseID'] = $coursedata['course'];
|
||||||
$reqCourse['BatchCode'] = $coursedata['batch'];
|
$reqCourse['BatchCode'] = $coursedata['batch'];
|
||||||
$reqCourse['DOJ'] = $coursedata['dateofjoining'];
|
$reqCourse['DOJ'] = $coursedata['dateofjoining'];
|
||||||
$reqCourse['BranchID'] = $createdBranch;
|
$reqCourse['BranchID'] = $createdBranch;
|
||||||
$reqCourse['IsActive'] = $data['switchsetting'];
|
$reqCourse['IsActive'] = $data['switchsetting'];
|
||||||
|
$reqCourse['EnrollmentID'] = $coursedata['enrollmentid'];
|
||||||
$reqCourse['CreatedBy'] = $createdBy;
|
$reqCourse['CreatedBy'] = $createdBy;
|
||||||
$date = date('Y-m-d H:i:s');
|
$date = date('Y-m-d H:i:s');
|
||||||
$reqCourse['CreatedOn'] = $date;
|
$reqCourse['CreatedOn'] = $date;
|
||||||
|
|
||||||
|
|
||||||
$studentAdd = $this->student_model->add_student( $req , $reqCourse);// Check if the employee exist
|
$studentAdd = $this->student_model->add_student( $req , $reqCourse);// Check if the employee exist
|
||||||
if ($studentAdd)
|
if ($studentAdd) {
|
||||||
{
|
|
||||||
$studentAdd['status'] = REST_Controller::HTTP_OK;
|
$studentAdd['status'] = REST_Controller::HTTP_OK;
|
||||||
// Set the response and exit
|
// Set the response and exit
|
||||||
$this->response($studentAdd, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code
|
$this->response($studentAdd, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
// Set the response and exit
|
// Set the response and exit
|
||||||
$this->response([
|
$this->response([
|
||||||
'message' => 'No users were found',
|
'message' => 'No users were found',
|
||||||
|
|||||||
@ -422,6 +422,7 @@ app.controller('studentCtrl', ["$scope", "toaster", "$filter", "ngTableParams",
|
|||||||
angular.element('.ng-invalid[name=' + firstError + ']').focus();
|
angular.element('.ng-invalid[name=' + firstError + ']').focus();
|
||||||
// swal("The form cannot be submitted because it contains validation errors!", "Errors are marked with a red, dashed border!", "error");
|
// swal("The form cannot be submitted because it contains validation errors!", "Errors are marked with a red, dashed border!", "error");
|
||||||
} else {
|
} else {
|
||||||
|
$scope.disableButton = true;
|
||||||
var formate = "dd-MM-yyyy";
|
var formate = "dd-MM-yyyy";
|
||||||
$scope.myModel.switchsetting = $scope.myModel.switchsetting === true ? 1 : 0;
|
$scope.myModel.switchsetting = $scope.myModel.switchsetting === true ? 1 : 0;
|
||||||
$scope.myModel.dateofbirth = $filter('date')(new Date($scope.myModel.dateofbirth), formate);
|
$scope.myModel.dateofbirth = $filter('date')(new Date($scope.myModel.dateofbirth), formate);
|
||||||
@ -442,8 +443,10 @@ app.controller('studentCtrl', ["$scope", "toaster", "$filter", "ngTableParams",
|
|||||||
$http(req).then(function (response) {
|
$http(req).then(function (response) {
|
||||||
if (response.data.addStudentStatus == true) {
|
if (response.data.addStudentStatus == true) {
|
||||||
swal("Success!", response.data.message, "success");
|
swal("Success!", response.data.message, "success");
|
||||||
|
$scope.disableButton = false;
|
||||||
$state.go($state.current, {}, { reload: true });
|
$state.go($state.current, {}, { reload: true });
|
||||||
} else {
|
} else {
|
||||||
|
$scope.disableButton = false;
|
||||||
swal("Failed!", response.data.message, "error");
|
swal("Failed!", response.data.message, "error");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@ -21,7 +21,7 @@
|
|||||||
</th>
|
</th>
|
||||||
<th>Batch
|
<th>Batch
|
||||||
</th>
|
</th>
|
||||||
<th>Date of Join
|
<th>Date of Joining
|
||||||
</th>
|
</th>
|
||||||
<th>
|
<th>
|
||||||
</th>
|
</th>
|
||||||
@ -117,6 +117,16 @@
|
|||||||
|
|
||||||
<span class="error text-small block" ng-if="Form.dateofjoining.$dirty && Form.dateofjoining.$error.required">Date of Joining is required</span>
|
<span class="error text-small block" ng-if="Form.dateofjoining.$dirty && Form.dateofjoining.$error.required">Date of Joining is required</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-4 form-group" ng-class="{'has-error':Form.enrollmentid.$dirty && Form.enrollmentid.$invalid}">
|
||||||
|
<label>
|
||||||
|
Enrollment ID
|
||||||
|
</label>
|
||||||
|
<input type="text" name="enrollmentid" tabindex="27" placeholder="Enter Entollment ID" class="form-control" ng-model="stucour.EnrollmentID"
|
||||||
|
/>
|
||||||
|
<span class="error text-small block" ng-if="Form.enrollmentid.$dirty && Form.enrollmentid.$error.required">Enrollment ID required</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
<label>
|
<label>
|
||||||
Active/De-Active
|
Active/De-Active
|
||||||
|
|||||||
@ -489,7 +489,7 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="pull-right">
|
<div class="pull-right">
|
||||||
<button type="submit" tabindex="30" ladda="ldloading1.zoom_in" class="btn btn-wide btn-success" data-style="zoom-in">
|
<button type="submit" ng-disabled="disableButton" tabindex="30" ladda="ldloading1.zoom_in" class="btn btn-wide btn-success" data-style="zoom-in">
|
||||||
Submit
|
Submit
|
||||||
</button>
|
</button>
|
||||||
<button type="reset" tabindex="31" class="btn btn-warning btn-wide" tabindex="9" ng-click="employeeForm.resetCourse(Form)">
|
<button type="reset" tabindex="31" class="btn btn-warning btn-wide" tabindex="9" ng-click="employeeForm.resetCourse(Form)">
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user