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['IsActive'] = $data['IsActive'];
|
||||
$req['BranchID'] = $data['BranchID'];
|
||||
$req['EnrollmentID'] = $data['EnrollmentID'];
|
||||
$req['UpdatedBy'] = $updatedBy;
|
||||
$date = date('Y-m-d H:i:s');
|
||||
$req['UpdatedOn'] = $date;
|
||||
@ -262,6 +263,7 @@ class Student_Controller extends REST_Controller {
|
||||
$reqCourse['CourseID'] = $coursedata['course'];
|
||||
$reqCourse['BatchCode'] = $coursedata['batch'];
|
||||
$reqCourse['DOJ'] = $coursedata['dateofjoining'];
|
||||
$reqCourse['EnrollmentID'] = $coursedata['enrollmentid'];
|
||||
$reqCourse['BranchID'] = $createdBranch;
|
||||
$reqCourse['IsActive'] = '1';
|
||||
$reqCourse['CreatedBy'] = $createdBy;
|
||||
@ -329,22 +331,20 @@ class Student_Controller extends REST_Controller {
|
||||
$reqCourse['CourseID'] = $coursedata['course'];
|
||||
$reqCourse['BatchCode'] = $coursedata['batch'];
|
||||
$reqCourse['DOJ'] = $coursedata['dateofjoining'];
|
||||
$reqCourse['BranchID'] = $createdBranch;
|
||||
$reqCourse['BranchID'] = $createdBranch;
|
||||
$reqCourse['IsActive'] = $data['switchsetting'];
|
||||
$reqCourse['EnrollmentID'] = $coursedata['enrollmentid'];
|
||||
$reqCourse['CreatedBy'] = $createdBy;
|
||||
$date = date('Y-m-d H:i:s');
|
||||
$reqCourse['CreatedOn'] = $date;
|
||||
|
||||
|
||||
$studentAdd = $this->student_model->add_student( $req , $reqCourse);// Check if the employee exist
|
||||
if ($studentAdd)
|
||||
{
|
||||
if ($studentAdd) {
|
||||
$studentAdd['status'] = REST_Controller::HTTP_OK;
|
||||
// Set the response and exit
|
||||
$this->response($studentAdd, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
// Set the response and exit
|
||||
$this->response([
|
||||
'message' => 'No users were found',
|
||||
|
||||
@ -422,6 +422,7 @@ app.controller('studentCtrl', ["$scope", "toaster", "$filter", "ngTableParams",
|
||||
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");
|
||||
} else {
|
||||
$scope.disableButton = true;
|
||||
var formate = "dd-MM-yyyy";
|
||||
$scope.myModel.switchsetting = $scope.myModel.switchsetting === true ? 1 : 0;
|
||||
$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) {
|
||||
if (response.data.addStudentStatus == true) {
|
||||
swal("Success!", response.data.message, "success");
|
||||
$scope.disableButton = false;
|
||||
$state.go($state.current, {}, { reload: true });
|
||||
} else {
|
||||
$scope.disableButton = false;
|
||||
swal("Failed!", response.data.message, "error");
|
||||
}
|
||||
});
|
||||
|
||||
@ -21,7 +21,7 @@
|
||||
</th>
|
||||
<th>Batch
|
||||
</th>
|
||||
<th>Date of Join
|
||||
<th>Date of Joining
|
||||
</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>
|
||||
</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">
|
||||
<label>
|
||||
Active/De-Active
|
||||
|
||||
@ -489,7 +489,7 @@
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<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
|
||||
</button>
|
||||
<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