student update screen changes: kdk
This commit is contained in:
parent
cae1beaa2c
commit
43e679ef79
@ -553,6 +553,7 @@ $scope.studentListLength = 0;
|
|||||||
// add student
|
// add student
|
||||||
$scope.studentFORM = {
|
$scope.studentFORM = {
|
||||||
submit: function (form, myModel, myModelCourseAdd) {
|
submit: function (form, myModel, myModelCourseAdd) {
|
||||||
|
|
||||||
var firstError = null;
|
var firstError = null;
|
||||||
if (form.$invalid) {
|
if (form.$invalid) {
|
||||||
var field = null, firstError = null;
|
var field = null, firstError = null;
|
||||||
@ -596,6 +597,7 @@ $scope.studentListLength = 0;
|
|||||||
} else {
|
} else {
|
||||||
// $scope.ldloading1[loading.replace('-', '_')] = false;
|
// $scope.ldloading1[loading.replace('-', '_')] = false;
|
||||||
swal("Failed!", data.message, "error");
|
swal("Failed!", data.message, "error");
|
||||||
|
// $scope.disableButton = false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
@ -618,7 +620,7 @@ $scope.studentListLength = 0;
|
|||||||
$scope.disableButton = false;
|
$scope.disableButton = false;
|
||||||
$state.go($state.current, {}, { reload: true });
|
$state.go($state.current, {}, { reload: true });
|
||||||
} else {
|
} else {
|
||||||
$scope.disableButton = false;
|
// $scope.disableButton = false;
|
||||||
swal("Failed!", response.data.message, "error");
|
swal("Failed!", response.data.message, "error");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -628,31 +630,35 @@ $scope.studentListLength = 0;
|
|||||||
reset: function (form) {
|
reset: function (form) {
|
||||||
// $scope.myModel = angular.copy($scope.master);
|
// $scope.myModel = angular.copy($scope.master);
|
||||||
form.$setPristine(true);
|
form.$setPristine(true);
|
||||||
$scope.myModel = {
|
$scope.myModel = {
|
||||||
'employeeId': '',
|
'primaryPhone': '',
|
||||||
'firstname': '',
|
'firstname': '',
|
||||||
'lastname': '',
|
'lastname': '',
|
||||||
'fathername': '',
|
'fathername': '',
|
||||||
'mothername': '',
|
'mothername': '',
|
||||||
'emailId': '',
|
'emailId': '',
|
||||||
'primaryPhone': '',
|
'secondaryPhone': '',
|
||||||
'secondaryPhone': '',
|
'dateofbirth': '',
|
||||||
'dateofbirth': '',
|
'gender': '',
|
||||||
'gender': '',
|
'aadharNumber': '',
|
||||||
'qualificaion': '',
|
'otherId': '',
|
||||||
'aadharNumber': '',
|
'otherIdDetails': '',
|
||||||
'otherId': '',
|
'address1': '',
|
||||||
'otherIdDetails': '',
|
'address2': '',
|
||||||
'address1': '',
|
'caste': '',
|
||||||
'address2': '',
|
'category': '',
|
||||||
'homeBranch': '',
|
'religion': '',
|
||||||
'dateofjoining': '',
|
'nationality': '',
|
||||||
'dateofjoining': '',
|
'prequalification': '',
|
||||||
'role': '',
|
'occupation': '',
|
||||||
'switchsetting': true,
|
'designation': '',
|
||||||
'DeactiveComments': '',
|
'companyname': '',
|
||||||
'Comments': ''
|
'referredby': '',
|
||||||
};
|
'referredmobilenumber': '',
|
||||||
|
'switchsetting': true,
|
||||||
|
'DeactiveComments': '',
|
||||||
|
'Comments': ''
|
||||||
|
};
|
||||||
}, resetCourse: function (form) {
|
}, resetCourse: function (form) {
|
||||||
form.$setPristine(true);
|
form.$setPristine(true);
|
||||||
$scope.myModelCourse = {
|
$scope.myModelCourse = {
|
||||||
@ -1429,31 +1435,35 @@ $scope.myUnivSearch = "";
|
|||||||
|
|
||||||
$scope.myActivateDiv = function() {
|
$scope.myActivateDiv = function() {
|
||||||
$scope.viewStudentDetailsPage = false;
|
$scope.viewStudentDetailsPage = false;
|
||||||
$scope.myModel = {
|
$scope.myModel = {
|
||||||
'employeeId': '',
|
'primaryPhone': '',
|
||||||
'firstname': '',
|
'firstname': '',
|
||||||
'lastname': '',
|
'lastname': '',
|
||||||
'fathername': '',
|
'fathername': '',
|
||||||
'mothername': '',
|
'mothername': '',
|
||||||
'emailId': '',
|
'emailId': '',
|
||||||
'primaryPhone': '',
|
'secondaryPhone': '',
|
||||||
'secondaryPhone': '',
|
'dateofbirth': '',
|
||||||
'dateofbirth': '',
|
'gender': '',
|
||||||
'gender': '',
|
'aadharNumber': '',
|
||||||
'qualificaion': '',
|
'otherId': '',
|
||||||
'aadharNumber': '',
|
'otherIdDetails': '',
|
||||||
'otherId': '',
|
'address1': '',
|
||||||
'otherIdDetails': '',
|
'address2': '',
|
||||||
'address1': '',
|
'caste': '',
|
||||||
'address2': '',
|
'category': '',
|
||||||
'homeBranch': '',
|
'religion': '',
|
||||||
'dateofjoining': '',
|
'nationality': '',
|
||||||
'dateofjoining': '',
|
'prequalification': '',
|
||||||
'role': '',
|
'occupation': '',
|
||||||
'switchsetting': true,
|
'designation': '',
|
||||||
'DeactiveComments': '',
|
'companyname': '',
|
||||||
'Comments': ''
|
'referredby': '',
|
||||||
};
|
'referredmobilenumber': '',
|
||||||
|
'switchsetting': true,
|
||||||
|
'DeactiveComments': '',
|
||||||
|
'Comments': ''
|
||||||
|
};
|
||||||
$scope.myModelCourseAdd = {
|
$scope.myModelCourseAdd = {
|
||||||
'university': '',
|
'university': '',
|
||||||
'course': '',
|
'course': '',
|
||||||
@ -1469,6 +1479,7 @@ $scope.myUnivSearch = "";
|
|||||||
// add student
|
// add student
|
||||||
$scope.studentFORM = {
|
$scope.studentFORM = {
|
||||||
submit: function (form, myModel, myModelCourseAdd) {
|
submit: function (form, myModel, myModelCourseAdd) {
|
||||||
|
alert(JSON.stringify(myModelCourseAdd));
|
||||||
var firstError = null;
|
var firstError = null;
|
||||||
if (form.$invalid) {
|
if (form.$invalid) {
|
||||||
var field = null, firstError = null;
|
var field = null, firstError = null;
|
||||||
@ -1487,16 +1498,16 @@ $scope.myUnivSearch = "";
|
|||||||
} else {
|
} else {
|
||||||
$scope.disableButton = true;
|
$scope.disableButton = true;
|
||||||
var formate = "dd-MM-yyyy";
|
var formate = "dd-MM-yyyy";
|
||||||
$scope.myModel.switchsetting = $scope.myModel.switchsetting === true ? 1 : 0;
|
myModel.switchsetting = myModel.switchsetting === true ? 1 : 0;
|
||||||
$scope.myModelCourseAdd.dateofjoining = $filter('date')(new Date($scope.myModelCourseAdd.dateofjoining), formate);
|
myModelCourseAdd.dateofjoining = $filter('date')(new Date(myModelCourseAdd.dateofjoining), formate);
|
||||||
var idStuProof = $scope.files[0];
|
var idStuProof = $scope.files[0];
|
||||||
|
|
||||||
if (idStuProof !== undefined) {
|
if (idStuProof !== undefined) {
|
||||||
var formData = new FormData();
|
var formData = new FormData();
|
||||||
var idProof = $scope.files[0];
|
var idProof = $scope.files[0];
|
||||||
// alert(idProof);
|
// alert(idProof);
|
||||||
formData.append("data", JSON.stringify($scope.myModel));
|
formData.append("data", JSON.stringify(myModel));
|
||||||
formData.append("coursedata", JSON.stringify($scope.myModelCourseAdd));
|
formData.append("coursedata", JSON.stringify(myModelCourseAdd));
|
||||||
formData.append("createdBy", localDetails.localUserID);
|
formData.append("createdBy", localDetails.localUserID);
|
||||||
formData.append("loginBranch", localDetails.localBranchID);
|
formData.append("loginBranch", localDetails.localBranchID);
|
||||||
formData.append('idStuProof', idStuProof);
|
formData.append('idStuProof', idStuProof);
|
||||||
@ -1527,8 +1538,8 @@ $scope.myUnivSearch = "";
|
|||||||
'Content-Type': 'application/json'
|
'Content-Type': 'application/json'
|
||||||
},
|
},
|
||||||
data: {
|
data: {
|
||||||
data: $scope.myModel,
|
data: myModel,
|
||||||
coursedata: $scope.myModelCourseAdd,
|
coursedata: myModelCourseAdd,
|
||||||
loginBranch: localDetails.localBranchID,
|
loginBranch: localDetails.localBranchID,
|
||||||
createdBy: localDetails.localUserID,
|
createdBy: localDetails.localUserID,
|
||||||
}
|
}
|
||||||
@ -1545,7 +1556,7 @@ $scope.myUnivSearch = "";
|
|||||||
|
|
||||||
// $scope.tabActive('tabactive1');
|
// $scope.tabActive('tabactive1');
|
||||||
} else {
|
} else {
|
||||||
$scope.disableButton = false;
|
// $scope.disableButton = false;
|
||||||
swal("Failed!", response.data.message, "error");
|
swal("Failed!", response.data.message, "error");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -1556,30 +1567,34 @@ $scope.myUnivSearch = "";
|
|||||||
// $scope.myModel = angular.copy($scope.master);
|
// $scope.myModel = angular.copy($scope.master);
|
||||||
form.$setPristine(true);
|
form.$setPristine(true);
|
||||||
$scope.myModel = {
|
$scope.myModel = {
|
||||||
'employeeId': '',
|
'primaryPhone': '',
|
||||||
'firstname': '',
|
'firstname': '',
|
||||||
'lastname': '',
|
'lastname': '',
|
||||||
'fathername': '',
|
'fathername': '',
|
||||||
'mothername': '',
|
'mothername': '',
|
||||||
'emailId': '',
|
'emailId': '',
|
||||||
'primaryPhone': '',
|
'secondaryPhone': '',
|
||||||
'secondaryPhone': '',
|
'dateofbirth': '',
|
||||||
'dateofbirth': '',
|
'gender': '',
|
||||||
'gender': '',
|
'aadharNumber': '',
|
||||||
'qualificaion': '',
|
'otherId': '',
|
||||||
'aadharNumber': '',
|
'otherIdDetails': '',
|
||||||
'otherId': '',
|
'address1': '',
|
||||||
'otherIdDetails': '',
|
'address2': '',
|
||||||
'address1': '',
|
'caste': '',
|
||||||
'address2': '',
|
'category': '',
|
||||||
'homeBranch': '',
|
'religion': '',
|
||||||
'dateofjoining': '',
|
'nationality': '',
|
||||||
'dateofjoining': '',
|
'prequalification': '',
|
||||||
'role': '',
|
'occupation': '',
|
||||||
'switchsetting': true,
|
'designation': '',
|
||||||
'DeactiveComments': '',
|
'companyname': '',
|
||||||
'Comments': ''
|
'referredby': '',
|
||||||
};
|
'referredmobilenumber': '',
|
||||||
|
'switchsetting': true,
|
||||||
|
'DeactiveComments': '',
|
||||||
|
'Comments': ''
|
||||||
|
};
|
||||||
}, resetCourse: function (form) {
|
}, resetCourse: function (form) {
|
||||||
form.$setPristine(true);
|
form.$setPristine(true);
|
||||||
$scope.myModelCourse = {
|
$scope.myModelCourse = {
|
||||||
|
|||||||
@ -245,7 +245,7 @@
|
|||||||
<!--<button ng-click="tabActive('0')" value="Tab1">Tab1</button>-->
|
<!--<button ng-click="tabActive('0')" value="Tab1">Tab1</button>-->
|
||||||
<div>
|
<div>
|
||||||
<!--<button ng-click="myActivateDiv()">Click Me</button>-->
|
<!--<button ng-click="myActivateDiv()">Click Me</button>-->
|
||||||
<form name="Form" id="form" novalidate ng-submit="studentFORM.submit(Form, myModel)" method="post">
|
<form name="Form" id="form" novalidate ng-submit="studentFORM.submit(Form, myModel, myModelCourseAdd)" method="post">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<fieldset style="background-color: #eaeaea;">
|
<fieldset style="background-color: #eaeaea;">
|
||||||
@ -256,7 +256,7 @@
|
|||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
<form name="Form" id="form1" novalidate ng-submit="form.submit(Form,myModel)" method="post">
|
<form name="Form" id="form1" novalidate ng-submit="form.submit(Form,myModel, myModelCourseAdd)" method="post">
|
||||||
<div class="file-upload">
|
<div class="file-upload">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user