total count enable on list student : kdk
This commit is contained in:
parent
7a2c7645ee
commit
74db011096
@ -368,6 +368,13 @@ class Student_model extends CI_Model
|
||||
$Arr['ProfilePicPath'] = "student/".$imageNameDb;
|
||||
// print_r($Arr);
|
||||
// print_r($courseArr);exit();
|
||||
$this->db->select('*');
|
||||
$this->db->from(STUDENTS);
|
||||
$this->db->where('MobileNumber', $Arr['MobileNumber']);
|
||||
if($this->db->get()->first_row()) {
|
||||
$result['addStudentStatus'] = false;
|
||||
$result['message'] = "This Student Already exist";
|
||||
} else {
|
||||
$this->db->insert(STUDENTS, $Arr);
|
||||
$insert_id = $this->db->insert_id('StudentID');
|
||||
$courseArr['StudentID'] = $insert_id;
|
||||
@ -398,12 +405,19 @@ class Student_model extends CI_Model
|
||||
$result['addStudentStatus'] = false;
|
||||
$result['message'] = "Something went wrong.please try again";
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$target = "../images/student/";
|
||||
$getUploadStatus = $this->upload_image($imageSource, $size, $target);
|
||||
$imageNameDb = $getUploadStatus['status'] == true ? $getUploadStatus['imageName'] : $getUploadStatus['imageName'] = 'default.jpeg';
|
||||
$Arr['ProfilePicPath'] = "student/".$imageNameDb;
|
||||
|
||||
$this->db->select('*');
|
||||
$this->db->from(STUDENTS);
|
||||
$this->db->where('MobileNumber', $Arr['MobileNumber']);
|
||||
if($this->db->get()->first_row()) {
|
||||
$result['addStudentStatus'] = false;
|
||||
$result['message'] = "This Student Already exist";
|
||||
} else {
|
||||
$this->db->insert(STUDENTS, $Arr);
|
||||
$insert_id = $this->db->insert_id('StudentID');
|
||||
$courseArr['StudentID'] = $insert_id;
|
||||
@ -435,6 +449,7 @@ class Student_model extends CI_Model
|
||||
$result['message'] = "Something went wrong.please try again";
|
||||
}
|
||||
}
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
@ -150,7 +150,7 @@ $scope.myUnivSearch = "";
|
||||
// }
|
||||
$scope.getStudentList();
|
||||
}
|
||||
|
||||
$scope.studentListLength = 0;
|
||||
$scope.getStudentList = function () {
|
||||
$scope.loader = true;
|
||||
var empListreq = {
|
||||
@ -169,6 +169,7 @@ $scope.myUnivSearch = "";
|
||||
$scope.loader = false;
|
||||
$scope.studentData = true;
|
||||
$scope.data = response.data.student_details;
|
||||
$scope.studentListLength = $scope.data.length;
|
||||
} else {
|
||||
$scope.loader = false;
|
||||
$scope.studentData = false;
|
||||
@ -1014,6 +1015,7 @@ $scope.myUnivSearch = "";
|
||||
$scope.getStudentList();
|
||||
}
|
||||
$scope.Searchloader = false;
|
||||
$scope.studentListLength = 0;
|
||||
$scope.getStudentList = function () {
|
||||
$scope.Searchloader = true;
|
||||
var empListreq = {
|
||||
@ -1032,7 +1034,7 @@ $scope.myUnivSearch = "";
|
||||
$scope.Searchloader = false;
|
||||
$scope.studentData = true;
|
||||
$scope.data = response.data.student_details;
|
||||
|
||||
$scope.studentListLength = $scope.data.length;
|
||||
} else {
|
||||
$scope.Searchloader = false;
|
||||
$scope.studentData = false;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
<!-- start: Super Admin -->
|
||||
|
||||
<ul class="main-navigation-menu" ng-if="getLoginDash == 'superAdmin'">
|
||||
<ul style="text-transform: uppercase;" class="main-navigation-menu" ng-if="getLoginDash == 'superAdmin'">
|
||||
<li ui-sref-active="active">
|
||||
<a ui-sref="app.dashboard">
|
||||
<div class="item-content">
|
||||
|
||||
@ -32,6 +32,19 @@
|
||||
margin: 5px;
|
||||
}*/
|
||||
</style>
|
||||
<style>
|
||||
.listCoutShow {
|
||||
margin: 12px;
|
||||
padding: 4px;
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
border: 1px solid #59b176;
|
||||
border-radius: 7px;
|
||||
color: #FFF;
|
||||
background-color: #5fba7d;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
<div class="row" ng-controller="studentCtrl" data-ng-init="init()">
|
||||
<tabset class="tabbable">
|
||||
<tab heading="View Student" id="studentbranch">
|
||||
@ -120,7 +133,18 @@
|
||||
<input class="form-control" type="text" ng-model="search" id="search" autofocus tabindex="1" placeholder="Search" /><br><br>
|
||||
</div>
|
||||
</div>-->
|
||||
|
||||
<!--<pre>{{studentListLength}}</pre>-->
|
||||
<div class="row">
|
||||
<div class="pull-right">
|
||||
<div style="margin: 8px;">
|
||||
<div style="width: 45px; display: initial;">
|
||||
<span style="font-size: 14px;
|
||||
color: black;">Total Count:</span> <span class="listCoutShow">{{ results.length }}</span>/<span class="listCoutShow">{{ studentListLength }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--<pre>{{results.length}}</pre>-->
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
@ -144,7 +168,7 @@
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody dir-paginate="p in data|orderBy:sortKey:reverse|filter:search:strict|itemsPerPage:10">
|
||||
<tbody dir-paginate="p in data|orderBy:sortKey:reverse|filter:search:strict|itemsPerPage:10| filter:query as results">
|
||||
<tr>
|
||||
<td>{{p.MobileNumber}}</td>
|
||||
<td>{{p.Firstname}} {{p.Lastname}}</td>
|
||||
|
||||
@ -33,6 +33,19 @@
|
||||
margin: 5px;
|
||||
}*/
|
||||
</style>
|
||||
<style>
|
||||
.listCoutShow {
|
||||
margin: 12px;
|
||||
padding: 4px;
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
border: 1px solid #59b176;
|
||||
border-radius: 7px;
|
||||
color: #FFF;
|
||||
background-color: #5fba7d;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
<div ng-init="init()">
|
||||
<div class="row">
|
||||
<div class="col-lg-4"></div>
|
||||
@ -147,6 +160,16 @@
|
||||
<input class="form-control" type="text" ng-model="search" id="search" autofocus tabindex="1" placeholder="Search" /><br><br>
|
||||
</div>
|
||||
</div>-->
|
||||
<div class="row">
|
||||
<div class="pull-right">
|
||||
<div style="margin: 8px;">
|
||||
<div style="width: 45px; display: initial;">
|
||||
<span style="font-size: 14px;
|
||||
color: black;">Total Count:</span> <span class="listCoutShow">{{ results.length }}</span>/<span class="listCoutShow">{{ studentListLength }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
@ -170,7 +193,7 @@
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody dir-paginate="p in data|orderBy:sortKey:reverse|filter:search:strict|itemsPerPage:10">
|
||||
<tbody dir-paginate="p in data|orderBy:sortKey:reverse|filter:search:strict|itemsPerPage:10| filter:query as results">
|
||||
<tr>
|
||||
<td>{{p.MobileNumber}}</td>
|
||||
<td>{{p.Firstname}} {{p.Lastname}}</td>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user