activity added

This commit is contained in:
resicovenba 2017-12-04 13:06:26 +05:30
parent 2fe537eaa2
commit b9beccaa57
8 changed files with 46 additions and 4 deletions

View File

@ -102,6 +102,7 @@ $route['changePassword'] = 'Login_Controller/changePassword';
// student
$route['insertStudent'] = 'Student_Controller/addStudent';
$route['getStudentUniversity'] = 'Student_Controller/getStudentUniversity';
$route['getCourseBatchForUniv'] = 'Student_Controller/getCourseBatch';
$route['chkStudentExistDetail'] = 'Student_Controller/chkStudentExistDetail';
$route['getStudentList'] = 'Student_Controller/getStudentList';

View File

@ -61,6 +61,27 @@ class Student_Controller extends REST_Controller {
}
public function getStudentUniversity_post() {
$reqData = $this->post('data');
$loginUserId = $reqData['localUserID'];
$loginUserBranchId = $reqData['localBranchID'];
$loginUserType = $reqData['localType'];
$getUniversityListDetails = $this->student_model->get_university_list();// Check if the employee exist
if ($getUniversityListDetails)
{
$getUniversityListDetails['status'] = REST_Controller::HTTP_OK;
// Set the response and exit
$this->response($getUniversityListDetails, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code
}
else
{
// Set the response and exit
$this->response([
'message' => 'No list were found',
'status' => REST_Controller::HTTP_NOT_FOUND
], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code
}
}
public function getStudentCourseList_post() {
$studentID = $this->post('studentID');

View File

@ -121,6 +121,7 @@ class Calltracking_model extends CI_Model {
{
$this->db->select('ListCode,ListName');
$this->db->where('ListGroup','2');
$this->db->where('IsActive','1');
$this->db->order_by('ListCode','ASC');
$activity = $this->db->get(PICK_LIST_DETAILS);
return $activity->result();

View File

@ -128,6 +128,24 @@ class Student_model extends CI_Model
return $result;
}
// get university list
public function get_university_list() {
$this->db->select('*');
$this->db->order_by('CreatedOn', 'DESC');
$this->db->from(UNIVERSITY);
$this->db->where('IsActive',1);
$univDetails = $this->db->get();
$universityDetails = $univDetails->result();
if (count($universityDetails) > 0) {
$results['univList'] = true;
$results['university_details'] = $universityDetails;
} else {
$results['univList'] = false;
$results['message'] = 'No record found';
}
return $results;
}
//get course for university

View File

@ -100,6 +100,7 @@ app.controller('topnavCtrl', ["$scope", "$http", "API_POINTS", "$localStorage",
$scope.upDateLocalBran = function (Id) {
localDetail.localBranchID = Id;
localDetails.localBranchID = Id;
ipCookie('cookiechk', localDetails, { expires: 21 });

View File

@ -314,7 +314,7 @@ app.controller('studentCtrl', ["$scope", "toaster", "$filter", "ngTableParams",
$scope.getUniversityList = function () {
var empListreq = {
method: 'POST',
url: apiPoint.url + 'getUniversity/',
url: apiPoint.url + 'getStudentUniversity/',
headers: {
'Content-Type': 'application/json'
},

View File

@ -21,7 +21,7 @@
</section>
<div class="container-fluid container-fullw bg-white">
<div ng-controller="activityCtrl">
<form class="form-horizontal" role="form" id="form" name="Form" ng-submit="activityForm.submit(Form, companies, 'zoom-in')" method="post">
<form class="form-horizontal" role="form" id="form" name="Form" ng-submit="activityForm.submit(Form, companies, 'zoom-in')" method="post" novalidate>
<!-- Start :Auto Generate Activity ID -->
<div class="form-group" style="display:none">
@ -42,7 +42,7 @@
ng-if="Form.ActivityName.$dirty && Form.ActivityName.$error.pattern">Invalid Activity Name </span>
</div>
</div>
<div class="form-group" ng-class="{'has-error':Form.ActivityName.$dirty && Form.ActivityName.$invalid, 'has-success':Form.ActivityName.$valid}">
<div class="form-group" ng-class="{'has-error':Form.Description.$dirty && Form.Description.$invalid, 'has-success':Form.Description.$valid}">
<label class="col-md-2 control-label">Description<span class="symbol required"></label>
<div class="col-md-3">
<input type="text" class="form-control" name="Description" placeholder="Enter Description" ng-model="companies.Description" required

View File

@ -136,7 +136,7 @@
</a>
<ul role="menu" class="dropdown-menu dropdown-light fadeInUpShort">
<li ng-repeat="branch in loginUser.branchList">
<a ng-click="upDateLocalBran(branch.BranchCode)" href="#" class="menu-toggler">
<a ng-click="upDateLocalBran(branch.BranchCode)" class="menu-toggler">
{{branch.BranchName}}
</a>
<!--<a href="#" class="menu-toggler">