student details added
This commit is contained in:
parent
ddc523d71d
commit
ba395f572d
@ -108,6 +108,7 @@ $route['chkUpdateStuExistDetail'] = 'Student_Controller/chkUpdateStuExistDetail'
|
||||
$route['getStudentCourseList'] = 'Student_Controller/getStudentCourseList';
|
||||
$route['getStudentCourseDetails'] = 'Student_Controller/getStudentCourseDetails';
|
||||
$route['updateStudentCourseDetail'] = 'Student_Controller/updateStudentCourseDetail';
|
||||
$route['insertStudentCourse'] = 'Student_Controller/insertStudentCourse';
|
||||
|
||||
//batch
|
||||
$route['addBatchDetails'] = 'Batch_Controller/addBatchDetails';
|
||||
|
||||
@ -249,6 +249,44 @@ class Student_Controller extends REST_Controller {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// add new course for student
|
||||
public function insertStudentCourse_post(){
|
||||
$addStudent = $this->post('addStudent');
|
||||
$coursedata = $this->post('coursedata');
|
||||
$createdBy = $this->post('createdBy');
|
||||
$createdBranch = $this->post('loginBranch');
|
||||
|
||||
$reqCourse['StudentID'] = $addStudent;
|
||||
$reqCourse['UniversityID'] = $coursedata['university'];
|
||||
$reqCourse['CourseID'] = $coursedata['course'];
|
||||
$reqCourse['BatchCode'] = $coursedata['batch'];
|
||||
$reqCourse['DOJ'] = $coursedata['dateofjoining'];
|
||||
$reqCourse['BranchID'] = $createdBranch;
|
||||
$reqCourse['IsActive'] = '1';
|
||||
$reqCourse['CreatedBy'] = $createdBy;
|
||||
$date = date('Y-m-d H:i:s');
|
||||
$reqCourse['CreatedOn'] = $date;
|
||||
// print_r($reqCourse);exit();
|
||||
|
||||
|
||||
$studentAddCourse = $this->student_model->add_student_course( $addStudent , $reqCourse);// Check if the employee exist
|
||||
if ($studentAddCourse)
|
||||
{
|
||||
$studentAddCourse['status'] = REST_Controller::HTTP_OK;
|
||||
// Set the response and exit
|
||||
$this->response($studentAddCourse, 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
|
||||
}
|
||||
}
|
||||
|
||||
// add student
|
||||
public function addStudent_post() {
|
||||
$data = $this->post('data');
|
||||
|
||||
@ -209,6 +209,29 @@ class Student_model extends CI_Model
|
||||
return $result;
|
||||
}
|
||||
|
||||
// add student course
|
||||
public function add_student_course( $studID, $Arr) {
|
||||
$this->db->select('*');
|
||||
$this->db->from(STUDENTCOURSE);
|
||||
$this->db->where('StudentID', $studID);
|
||||
$this->db->where('CourseID', $Arr['CourseID']);
|
||||
|
||||
if($this->db->get()->first_row()) {
|
||||
$result['addStuCourseStatus'] = false;
|
||||
$result['message'] = "This Student Already exist for this course";
|
||||
} else {
|
||||
$this->db->insert(STUDENTCOURSE, $Arr);
|
||||
if ($this->db->affected_rows() == '1') {
|
||||
$result['addStuCourseStatus'] = true;
|
||||
$result['message'] = "Successfully Student Course Details Updated";
|
||||
} else {
|
||||
$result['addStuCourseStatus'] = false;
|
||||
$result['message'] = "Something went wrong.please try again";
|
||||
}
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
||||
// add student
|
||||
public function add_student($Arr, $courseArr)
|
||||
{
|
||||
|
||||
@ -19,7 +19,7 @@ app.controller('sessionCtrl', ["$scope", "$localStorage", "$state", 'ipCookie',
|
||||
if (localDetail.localType == 'R004') {
|
||||
$scope.getLoginDash = 'superAdmin';
|
||||
} else if (localDetail.localType == 'R003') {
|
||||
$scope.getLoginDash = 'superAdmin';
|
||||
$scope.getLoginDash = 'Admin';
|
||||
} else if (localDetail.localType == 'R002') {
|
||||
$scope.getLoginDash = 'staff';
|
||||
}
|
||||
|
||||
@ -45,6 +45,16 @@ app.controller('studentCtrl', ["$scope", "toaster", "$filter", "ngTableParams",
|
||||
'enrollmentid': ''
|
||||
};
|
||||
|
||||
$scope.addStudentView = function () {
|
||||
$scope.myModelCourse = {
|
||||
'university': '',
|
||||
'course': '',
|
||||
'batch': '',
|
||||
'dateofjoining': '',
|
||||
'enrollmentid': ''
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 2017-11-23T00:00:00+0530
|
||||
@ -64,7 +74,6 @@ app.controller('studentCtrl', ["$scope", "toaster", "$filter", "ngTableParams",
|
||||
$scope.currentDate = new Date();
|
||||
$scope.getStudentList();
|
||||
$scope.getUniversityList();
|
||||
|
||||
// $scope.currentPage = 1;
|
||||
} else {
|
||||
}
|
||||
@ -103,9 +112,9 @@ app.controller('studentCtrl', ["$scope", "toaster", "$filter", "ngTableParams",
|
||||
}
|
||||
|
||||
$scope.setEditCourseId = function (id) {
|
||||
|
||||
$scope.list = false;
|
||||
$scope.getStudentCourseList(id);
|
||||
$scope.currentStudentId = id;
|
||||
// $scope.getStudentCourseDetails(id);
|
||||
$scope.editCourseId = id;
|
||||
$scope.editId = -1;
|
||||
@ -118,9 +127,83 @@ app.controller('studentCtrl', ["$scope", "toaster", "$filter", "ngTableParams",
|
||||
$scope.editCourseId = -1;
|
||||
}
|
||||
|
||||
$scope.getStudentCourseList = function(studentId) {
|
||||
$scope.cancelCourseDetails = function () {
|
||||
$scope.getStudentCourseList($scope.currentStudentId);
|
||||
// $scope.editId = -1;
|
||||
// $scope.editCourseId = -1;
|
||||
}
|
||||
|
||||
$scope.addStudentCourse = function () {
|
||||
$scope.myModelCourse = {
|
||||
'university': '',
|
||||
'course': '',
|
||||
'batch': '',
|
||||
'dateofjoining': '',
|
||||
'enrollmentid': ''
|
||||
};
|
||||
$scope.list = false;
|
||||
$scope.courseEdit = false;
|
||||
$scope.courseAdd = true;
|
||||
}
|
||||
|
||||
// add student course
|
||||
$scope.addCourseFORM = {
|
||||
|
||||
submit: function (form, myModelCourse, p) {
|
||||
// alert();
|
||||
var firstError = null;
|
||||
if (form.$invalid) {
|
||||
var field = null, firstError = null;
|
||||
for (field in form) {
|
||||
if (field[0] != '$') {
|
||||
if (firstError === null && !form[field].$valid) {
|
||||
firstError = form[field].$name;
|
||||
}
|
||||
if (form[field].$pristine) {
|
||||
form[field].$dirty = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
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 {
|
||||
// alert(JSON.stringify(p.StudentID));
|
||||
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);
|
||||
$scope.myModelCourse.dateofjoining = $filter('date')(new Date($scope.myModelCourse.dateofjoining), formate);
|
||||
var req = {
|
||||
method: 'POST',
|
||||
url: apiPoint.url + 'insertStudentCourse/',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
data: {
|
||||
addStudent: p.StudentID,
|
||||
coursedata: $scope.myModelCourse,
|
||||
loginBranch: localDetails.localBranchID,
|
||||
createdBy: localDetails.localUserID,
|
||||
}
|
||||
};
|
||||
$http(req).then(function (response) {
|
||||
if (response.data.addStuCourseStatus == true) {
|
||||
swal("Success!", response.data.message, "success");
|
||||
$scope.getStudentCourseList($scope.currentStudentId);
|
||||
} else {
|
||||
swal("Failed!", response.data.message, "error");
|
||||
$scope.getStudentCourseList($scope.currentStudentId);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// get Student Course List
|
||||
$scope.getStudentCourseList = function (studentId) {
|
||||
$scope.courseEditLoading = true;
|
||||
$scope.list = true;
|
||||
$scope.courseEdit = false;
|
||||
$scope.courseAdd = false;
|
||||
var req = {
|
||||
method: 'POST',
|
||||
url: apiPoint.url + 'getStudentCourseList/',
|
||||
@ -141,9 +224,12 @@ app.controller('studentCtrl', ["$scope", "toaster", "$filter", "ngTableParams",
|
||||
});
|
||||
}
|
||||
|
||||
// get student particular course details : params : studentCourseID
|
||||
$scope.getStudentCourseDetails = function (studentcourseID) {
|
||||
$scope.courseEditLoading = true;
|
||||
$scope.stucour = '';
|
||||
$scope.list = false;
|
||||
$scope.courseAdd = false;
|
||||
$scope.courseEdit = true;
|
||||
var req = {
|
||||
method: 'POST',
|
||||
@ -159,15 +245,62 @@ app.controller('studentCtrl', ["$scope", "toaster", "$filter", "ngTableParams",
|
||||
if (response.data.stuCourseDetails) {
|
||||
$scope.courseEditLoading = false;
|
||||
$scope.studentCourse = response.data.course_details;
|
||||
$scope.stucour = $scope.studentCourse[0];
|
||||
$scope.stucour = $scope.studentCourse[0];
|
||||
} else {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// update sutdent course details
|
||||
$scope.updateStudentCourseDetails = function (form, datas) {
|
||||
if (form.$invalid) {
|
||||
var field = null, firstError = null;
|
||||
for (field in form) {
|
||||
if (field[0] != '$') {
|
||||
if (firstError === null && !form[field].$valid) {
|
||||
firstError = form[field].$name;
|
||||
}
|
||||
if (form[field].$pristine) {
|
||||
form[field].$dirty = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
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 {
|
||||
alert(datas.DOJ);
|
||||
var formate = "dd-MM-yyyy";
|
||||
var checkDOJ = $filter('date')(new Date(datas.DOJ), formate);
|
||||
datas.IsActive = datas.IsActive === true ? 1 : 0;
|
||||
datas.DOJ = checkDOJ == "NaN-NaN-0NaN" ? datas.DOJ : $filter('date')(new Date(datas.DOJ), formate);
|
||||
alert(datas.DOJ);
|
||||
var req = {
|
||||
method: 'POST',
|
||||
url: apiPoint.url + 'updateStudentCourseDetail/',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
data: {
|
||||
data: datas,
|
||||
updatedBy: localDetails.localUserID,
|
||||
}
|
||||
};
|
||||
$http(req).then(function (response) {
|
||||
if (response.data.updateStuCourseStatus) {
|
||||
swal("Success!", response.data.message, "success");
|
||||
$scope.getStudentCourseList($scope.currentStudentId);
|
||||
// $scope.editCourseId = false;
|
||||
} else {
|
||||
// $scope.ldloading1[loading.replace('-', '_')] = false;
|
||||
swal("Failed!", response.data.message, "error");
|
||||
$scope.getStudentCourseList($scope.currentStudentId);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$scope.universityData = '';
|
||||
|
||||
$scope.getUniversityList = function () {
|
||||
var empListreq = {
|
||||
method: 'POST',
|
||||
@ -187,11 +320,17 @@ app.controller('studentCtrl', ["$scope", "toaster", "$filter", "ngTableParams",
|
||||
});
|
||||
}
|
||||
|
||||
$scope.onSlecetUnivEdit = function(id) {
|
||||
$scope.onSlecetUnivEdit = function (id) {
|
||||
$scope.myModelCourse.university = id;
|
||||
$scope.onSlecetUniv();
|
||||
}
|
||||
|
||||
$scope.onChangeSlecetUnivEdit = function (id) {
|
||||
$scope.myModelCourse.university = id;
|
||||
$scope.onSlecetUniv();
|
||||
$scope.stucour.CourseID = '';
|
||||
$scope.stucour.BatchCode = '';
|
||||
}
|
||||
$scope.courseLoading = false;
|
||||
$scope.onSlecetUniv = function () {
|
||||
$scope.courseData = '';
|
||||
@ -349,7 +488,7 @@ app.controller('studentCtrl', ["$scope", "toaster", "$filter", "ngTableParams",
|
||||
}
|
||||
|
||||
|
||||
// update check mobile exist
|
||||
// update check mobile exist
|
||||
$scope.updateCheckMobileExist = function (p) {
|
||||
var checkReq = {
|
||||
method: 'POST',
|
||||
@ -394,11 +533,11 @@ app.controller('studentCtrl', ["$scope", "toaster", "$filter", "ngTableParams",
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// update student details
|
||||
$scope.updateStuDetails = function (form, p) {
|
||||
var firstError = null;
|
||||
if (form.$invalid) {
|
||||
if (form.$invalid) {
|
||||
var field = null, firstError = null;
|
||||
for (field in form) {
|
||||
if (field[0] != '$') {
|
||||
@ -412,7 +551,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 {
|
||||
} else {
|
||||
// alert(p.DOB);
|
||||
var formate = "dd-MM-yyyy";
|
||||
var checkDOB = $filter('date')(new Date(p.DOB), formate);
|
||||
@ -442,49 +581,6 @@ app.controller('studentCtrl', ["$scope", "toaster", "$filter", "ngTableParams",
|
||||
}
|
||||
}
|
||||
|
||||
$scope.updateStudentCourseDetails = function (form, datas) {
|
||||
if (form.$invalid) {
|
||||
var field = null, firstError = null;
|
||||
for (field in form) {
|
||||
if (field[0] != '$') {
|
||||
if (firstError === null && !form[field].$valid) {
|
||||
firstError = form[field].$name;
|
||||
}
|
||||
if (form[field].$pristine) {
|
||||
form[field].$dirty = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
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 {
|
||||
var formate = "dd-MM-yyyy";
|
||||
var checkDOJ = $filter('date')(new Date(datas.DOJ), formate);
|
||||
datas.IsActive = datas.IsActive === true ? 1 : 0;
|
||||
datas.DOJ = checkDOJ == "NaN-NaN-0NaN" ? datas.DOJ : $filter('date')(new Date(datas.DOJ), formate);
|
||||
|
||||
var req = {
|
||||
method: 'POST',
|
||||
url: apiPoint.url + 'updateStudentCourseDetail/',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
data: {
|
||||
data: datas,
|
||||
updatedBy: localDetails.localUserID,
|
||||
}
|
||||
};
|
||||
$http(req).then(function (response) {
|
||||
if (response.data.updateStuCourseStatus = true) {
|
||||
swal("Success!", response.data.message, "success");
|
||||
$scope.getStudentList();
|
||||
$scope.editCourseId = -1;
|
||||
} else {
|
||||
// $scope.ldloading1[loading.replace('-', '_')] = false;
|
||||
swal("Failed!", response.data.message, "error");
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}]);
|
||||
|
||||
@ -61,6 +61,104 @@
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
<!--<li ng-class="{'active open':$state.includes('app.student')}">
|
||||
<a href="javascript:void(0)">
|
||||
<div class="item-content">
|
||||
<div class="item-media">
|
||||
<i class="ti-user"></i>
|
||||
</div>
|
||||
<div class="item-inner">
|
||||
<span class="title" translate="sidebar.nav.student.MAIN"> STUDENT </span><i class="icon-arrow"></i>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
<ul class="sub-menu">
|
||||
<li ui-sref-active="active">
|
||||
<a ui-sref="app.student.studentDetails">
|
||||
<span class="title" translate="sidebar.nav.student.STUDENTDETAILS"> STUDENT DETAILS </span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>-->
|
||||
<li ng-class="{'active open':$state.includes('app.tracking')}">
|
||||
<a ui-sref="app.tracking">
|
||||
<div class="item-content">
|
||||
<div class="item-media">
|
||||
<i class="ti-layers-alt"></i>
|
||||
</div>
|
||||
<div class="item-inner">
|
||||
<span class="title" translate="sidebar.nav.tracking.MAIN">CALL TRACKING </span>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<!-- end: Super Admin -->
|
||||
|
||||
<!-- start: Admin -->
|
||||
|
||||
<ul class="main-navigation-menu" ng-if="getLoginDash == 'Admin'">
|
||||
<li ui-sref-active="active">
|
||||
<a ui-sref="app.dashboard">
|
||||
<div class="item-content">
|
||||
<div class="item-media">
|
||||
<i class="ti-home"></i>
|
||||
</div>
|
||||
<div class="item-inner">
|
||||
<span class="title" translate="sidebar.nav.dashboard.MAIN"> Dashboard </span>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<li ng-class="{'active open':$state.includes('app.master')}">
|
||||
<a href="javascript:void(0)">
|
||||
<div class="item-content">
|
||||
<div class="item-media">
|
||||
<i class="ti-settings"></i>
|
||||
</div>
|
||||
<div class="item-inner">
|
||||
<span class="title" translate="sidebar.nav.master.MAIN"> MASTER DETAILS </span><i class="icon-arrow"></i>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
<ul class="sub-menu">
|
||||
<li ui-sref-active="active">
|
||||
<a ui-sref="app.master.university">
|
||||
<span class="title" translate="sidebar.nav.master.UNIVERSITY"> UNIVERSITY DETAILS </span>
|
||||
</a>
|
||||
</li>
|
||||
<li ui-sref-active="active">
|
||||
<a ui-sref="app.master.course">
|
||||
<span class="title" translate="sidebar.nav.master.COURSE"> COURSE DETAILS </span>
|
||||
</a>
|
||||
</li>
|
||||
<li ui-sref-active="active">
|
||||
<a ui-sref="app.master.activity">
|
||||
<span class="title" translate="sidebar.nav.master.ACTIVITY"> ACTIVITY DETAILS </span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li ui-sref-active="active">
|
||||
<a ui-sref="app.master.batch">
|
||||
<span class="title" translate="sidebar.nav.master.BATCH"> BATCH DETAILS </span>
|
||||
</a>
|
||||
</li>
|
||||
<li ui-sref-active="active">
|
||||
<a ui-sref="app.master.branch">
|
||||
<span class="title" translate="sidebar.nav.master.BRANCH"> BRANCH DETAILS </span>
|
||||
</a>
|
||||
</li>
|
||||
<li ui-sref-active="active" >
|
||||
<a ui-sref="app.master.employee">
|
||||
<span class="title" translate="sidebar.nav.master.EMPLOYEE"> EMPLOYEE DETAILS </span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
<li ng-class="{'active open':$state.includes('app.student')}">
|
||||
@ -97,6 +195,10 @@
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<!-- end: Admin -->
|
||||
|
||||
<!-- start: Staff -->
|
||||
|
||||
<ul class="main-navigation-menu" ng-if="getLoginDash == 'staff'">
|
||||
<li ui-sref-active="active">
|
||||
<a ui-sref="app.dashboard">
|
||||
@ -110,35 +212,25 @@
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<!--<li ng-class="{'active open':$state.includes('app.master')}">
|
||||
<li ng-class="{'active open':$state.includes('app.student')}">
|
||||
<a href="javascript:void(0)">
|
||||
<div class="item-content">
|
||||
<div class="item-media">
|
||||
<i class="ti-settings"></i>
|
||||
<i class="ti-user"></i>
|
||||
</div>
|
||||
<div class="item-inner">
|
||||
<span class="title" translate="sidebar.nav.master.MAIN"> MASTER DETAILS </span><i class="icon-arrow"></i>
|
||||
<span class="title" translate="sidebar.nav.student.MAIN"> STUDENT </span><i class="icon-arrow"></i>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
<ul class="sub-menu">
|
||||
<li ui-sref-active="active">
|
||||
<a ui-sref="app.master.branch">
|
||||
<span class="title" translate="sidebar.nav.master.BRANCH"> BRANCH DETAILS </span>
|
||||
</a>
|
||||
</li>
|
||||
<li ui-sref-active="active" >
|
||||
<a ui-sref="app.master.employee">
|
||||
<span class="title" translate="sidebar.nav.master.EMPLOYEE"> EMPLOYEE DETAILS </span>
|
||||
</a>
|
||||
</li>
|
||||
<li ui-sref-active="active">
|
||||
<a ui-sref="app.master.activity">
|
||||
<span class="title" translate="sidebar.nav.master.ACTIVITY"> ACTIVITY DETAILS </span>
|
||||
<a ui-sref="app.student.studentDetails">
|
||||
<span class="title" translate="sidebar.nav.student.STUDENTDETAILS"> STUDENT DETAILS </span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>-->
|
||||
</li>
|
||||
<li ng-class="{'active open':$state.includes('app.tracking')}">
|
||||
<a ui-sref="app.tracking">
|
||||
<div class="item-content">
|
||||
@ -153,6 +245,9 @@
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<!-- end: Staff -->
|
||||
|
||||
<!-- end: MAIN NAVIGATION MENU -->
|
||||
<!-- start: CORE FEATURES -->
|
||||
|
||||
|
||||
@ -1,64 +1,67 @@
|
||||
<form name="Form" id="form" novalidate>
|
||||
<div class="row">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div ng-if="courseEditLoading == true" class="text-center">
|
||||
<!--<img src="assets/images/ajax_loader_blue.gif" style="width: 5%; height: 30%">-->
|
||||
<h3>Fetching ...</h3>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<div ng-if="courseEditLoading == true" class="text-center">
|
||||
<!--<img src="assets/images/ajax_loader_blue.gif" style="width: 5%; height: 30%">-->
|
||||
<h3>Fetching ...</h3>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
|
||||
<fieldset ng-if="courseEditLoading == false">
|
||||
<legend>
|
||||
Course Details
|
||||
</legend>
|
||||
<!--list of course details : start-->
|
||||
<div ng-if='list === true'>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>University
|
||||
</th>
|
||||
<th>Course
|
||||
</th>
|
||||
<th>Batch
|
||||
</th>
|
||||
<th>Date of Join
|
||||
</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody ng-repeat="s in studentCourseList">
|
||||
<tr>
|
||||
<td>{{s.UniversityName}}</td>
|
||||
<td>{{s.CourseName}}</td>
|
||||
<td>{{s.BatchName}}</td>
|
||||
<td>{{s.DOJ}}</td>
|
||||
<td ng-click="getStudentCourseDetails(s.ID)">Edit</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="pull-right">
|
||||
<button type="reset" class="btn btn-warning btn-wide" tabindex="9" ng-click="cancel()">
|
||||
<fieldset ng-if="courseEditLoading == false">
|
||||
<legend>
|
||||
Course Details
|
||||
</legend>
|
||||
<!--list of course details : start-->
|
||||
<div ng-if='list === true'>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>University
|
||||
</th>
|
||||
<th>Course
|
||||
</th>
|
||||
<th>Batch
|
||||
</th>
|
||||
<th>Date of Join
|
||||
</th>
|
||||
<th>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody ng-repeat="s in studentCourseList">
|
||||
<tr>
|
||||
<td>{{s.UniversityName}}</td>
|
||||
<td>{{s.CourseName}}</td>
|
||||
<td>{{s.BatchName}}</td>
|
||||
<td>{{s.DOJ}}</td>
|
||||
<td ng-click="getStudentCourseDetails(s.ID)"><i class="fa fa-edit"></i></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="pull-right">
|
||||
<button type="reset" class="btn btn-into btn-wide" tabindex="9" ng-click="addStudentCourse()">
|
||||
Add Course
|
||||
</button>
|
||||
<button type="reset" class="btn btn-warning btn-wide" tabindex="9" ng-click="cancel()">
|
||||
Cancel
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--list of course details : end-->
|
||||
|
||||
<!--<pre> {{studentCourse | json }} </pre>-->
|
||||
<!--Edit course details : Start-->
|
||||
<div ng-if='courseEdit === true'>
|
||||
</div>
|
||||
<!--list of course details : end-->
|
||||
<!--<pre> {{studentCourse | json }} </pre>-->
|
||||
<!--Edit course details : Start-->
|
||||
<div ng-if='courseEdit === true'>
|
||||
<form name="Form" id="form" novalidate>
|
||||
<div class="row">
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.univ.$dirty && Form.univ.$invalid, 'has-success':Form.univ.$valid}">
|
||||
<label>
|
||||
University <span class="symbol required"></span>
|
||||
</label>
|
||||
<select ng-init="onSlecetUnivEdit(stucour.UniversityID)" class="form-control" name="univ" ng-model="stucour.UniversityID"
|
||||
class="cs-select cs-skin-elastic" ng-change="onSlecetUnivEdit(stucour.UniversityID)" required>
|
||||
class="cs-select cs-skin-elastic" ng-change="onChangeSlecetUnivEdit(stucour.UniversityID)" required>
|
||||
|
||||
<option value="" disabled selected>Select University</option>
|
||||
<option ng-repeat="items in universityData" value="{{items.UniversityID}}" ng-selected="stucour.UniversityID == items.UniversityID">{{items.UniversityName}}</option>
|
||||
@ -134,18 +137,119 @@
|
||||
<button type="button" ladda="ldloading1.zoom_in" class="btn btn-wide btn-success" data-style="zoom-in" ng-click="updateStudentCourseDetails(Form, stucour)">
|
||||
Update
|
||||
</button>
|
||||
<button type="reset" class="btn btn-warning btn-wide" tabindex="9" ng-click="cancel()">
|
||||
<button type="reset" class="btn btn-warning btn-wide" tabindex="9" ng-click="cancelCourseDetails()">
|
||||
Cancel
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<!--Edit course details : Start-->
|
||||
</fieldset>
|
||||
</div>
|
||||
<!--Edit course details : Start-->
|
||||
|
||||
|
||||
|
||||
<div ng-if='courseAdd === true'>
|
||||
<!--Add course details : Start -->
|
||||
<form name="FormAdd" id="formAdd" novalidate ng-submit="addCourseFORM.submit(FormAdd, myModelCourse, p)" method="post">
|
||||
<div class="row">
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':FormAdd.university.$dirty && FormAdd.university.$invalid, 'has-success':FormAdd.university.$valid}">
|
||||
<label for="form-field-select-2">
|
||||
University <span class="symbol required"></span>
|
||||
</label>
|
||||
|
||||
<select class="form-control" tabindex="25" class="cs-select cs-skin-elastic" name="university" ng-model="myModelCourse.university"
|
||||
ng-change="onSlecetUniv()" required>
|
||||
<option value="" disabled selected>Select University</option>
|
||||
<option ng-repeat="item in universityData" value="{{item.UniversityID}}">{{item.UniversityName}}</option>
|
||||
</select>
|
||||
<span class="error text-small block" ng-if="FormAdd.university.$dirty && FormAdd.university.$error.required">University is Required</span>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':FormAdd.course.$dirty && FormAdd.course.$invalid, 'has-success':FormAdd.course.$valid}">
|
||||
|
||||
<label>
|
||||
Course <span class="symbol required"></span>
|
||||
</label>
|
||||
<div ng-if="courseLoading == true">
|
||||
<span style="padding: auto 0; color: #007AFF; font-weight: bold;">fetching...</span>
|
||||
</div>
|
||||
<div ng-if="courseLoading == false">
|
||||
<select class="form-control" tabindex="26" name="course" ng-model="myModelCourse.course" class="cs-select cs-skin-elastic"
|
||||
required>
|
||||
<option value="" disabled selected>Select Course</option>
|
||||
<option ng-repeat="item in courseData" value="{{item.CourseID}}">{{item.CourseName}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<span class="error text-small block" ng-if="FormAdd.course.$dirty && FormAdd.course.$error.required">Course is required</span>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':FormAdd.batch.$dirty && FormAdd.batch.$invalid, 'has-success':FormAdd.batch.$valid}">
|
||||
|
||||
<label>
|
||||
Batch <span class="symbol required"></span>
|
||||
</label>
|
||||
<div ng-if="courseLoading == true">
|
||||
<span style="padding: auto 0; color: #007AFF; font-weight: bold;">fetching...</span>
|
||||
</div>
|
||||
<div ng-if="courseLoading == false">
|
||||
<select class="form-control" tabindex="26" name="batch" ng-model="myModelCourse.batch" class="cs-select cs-skin-elastic"
|
||||
required>
|
||||
<option value="" disabled selected>Select Batch</option>
|
||||
<option ng-repeat="item in batchData" value="{{item.BatchCode}}">{{item.BatchName}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<span class="error text-small block" ng-if="FormAdd.batch.$dirty && FormAdd.batch.$error.required">Batch is required</span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':FormAdd.enrollmentid.$dirty && FormAdd.enrollmentid.$invalid}">
|
||||
<label>
|
||||
Enrollment ID
|
||||
</label>
|
||||
<input type="text" name="enrollmentid" tabindex="27" placeholder="Enter Entollment ID" class="form-control" ng-model="myModelCourse.enrollmentid"
|
||||
/>
|
||||
<span class="error text-small block" ng-if="FormAdd.enrollmentid.$dirty && FormAdd.enrollmentid.$error.required">Enrollment ID required</span>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':FormAdd.dateofjoining.$dirty && FormAdd.dateofjoining.$invalid, 'has-success':FormAdd.dateofjoining.$valid}">
|
||||
<label>
|
||||
Date of Joining <span class="symbol required"></span>
|
||||
</label>
|
||||
<style>
|
||||
.dropdown-menu {
|
||||
position: relative;
|
||||
/*top: -225px !important;*/
|
||||
}
|
||||
</style>
|
||||
<input type="text" tabindex="28" class="form-control" ng-click="startOpen = !startOpen" datepicker-popup="dd-MM-yyyy" ng-model="myModelCourse.dateofjoining"
|
||||
is-open="startOpen" ng-init="startOpen = false" name="dateofjoining" datepicker-options="dateOptions"
|
||||
placeholder="Select Date of Joining" close-text="Close" required="required" datepicker-position="top"
|
||||
/>
|
||||
|
||||
<span class="error text-small block" ng-if="FormAdd.dateofjoining.$dirty && FormAdd.dateofjoining.$error.required">Date of Joining required</span>
|
||||
</div>
|
||||
</div>
|
||||
<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">
|
||||
Submit
|
||||
</button>
|
||||
<button type="reset" tabindex="31" class="btn btn-warning btn-wide" tabindex="9" ng-click="cancelCourseDetails()">
|
||||
Cancel
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<!--Add course details : End -->
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<!-- class="editRowTd" -->
|
||||
@ -65,7 +65,7 @@
|
||||
<td style="text-align: center;">
|
||||
<input type=button class="btn btn-info btn-xs" ladda="ldloading1.zoom_in" id="editRowBtn{{p.StudentID}}" value="Personal Details"
|
||||
ng-click="setEditId(p.StudentID);">
|
||||
<!--<input type=button class="btn btn-blue btn-xs" id="editCourseRowBtn{{p.StaffID}}" value="Course Details" ng-click="setEditCourseId(p.StudentID);">-->
|
||||
<input type=button class="btn btn-blue btn-xs" id="editCourseRowBtn{{p.StaffID}}" value="Course Details" ng-click="setEditCourseId(p.StudentID);">
|
||||
</td>
|
||||
</tr>
|
||||
<tr ng-show="editId === p.StudentID" ng-if="editId === p.StudentID">
|
||||
@ -102,7 +102,7 @@
|
||||
</style>
|
||||
|
||||
|
||||
<tab heading="Add Student" id="addstudent">
|
||||
<tab heading="Add Student" id="addstudent" ng-click="addStudentView()">
|
||||
<div>
|
||||
<form name="Form" id="form" novalidate ng-submit="studentFORM.submit(Form, myModel)" method="post">
|
||||
<div class="row">
|
||||
@ -468,14 +468,21 @@
|
||||
/>
|
||||
<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 form-group" ng-class="{'has-error':Form.dateofjoining.$dirty && Form.dateofjoining.$invalid, 'has-success':Form.dateofjoining.$valid}">
|
||||
<label>
|
||||
Date of Joining <span class="symbol required"></span>
|
||||
</label>
|
||||
<input type="text" tabindex="28" class="form-control " ng-click="startOpen = !startOpen" datepicker-popup="dd-MM-yyyy" ng-model="myModelCourse.dateofjoining"
|
||||
<style>
|
||||
.dropdown-menu {
|
||||
position: relative;
|
||||
/*top: -225px !important;*/
|
||||
}
|
||||
</style>
|
||||
<input type="text" tabindex="28" class="form-control" ng-click="startOpen = !startOpen" datepicker-popup="dd-MM-yyyy" ng-model="myModelCourse.dateofjoining"
|
||||
is-open="startOpen" ng-init="startOpen = false" name="dateofjoining" datepicker-options="dateOptions"
|
||||
placeholder="Select Date of Joining" close-text="Close" required="required" />
|
||||
placeholder="Select Date of Joining" close-text="Close" required="required" datepicker-position="top"/>
|
||||
|
||||
<span class="error text-small block" ng-if="Form.dateofjoining.$dirty && Form.dateofjoining.$error.required">Date of Joining required</span>
|
||||
</div>
|
||||
</div>
|
||||
@ -492,8 +499,8 @@
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<pre> {{ myModel | json }}</pre>
|
||||
<pre> {{ myModelCourse | json }}</pre>
|
||||
<!--<pre> {{ myModel | json }}</pre>
|
||||
<pre> {{ myModelCourse | json }}</pre>-->
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user