This commit is contained in:
gayathri1990 2018-08-17 18:00:03 +05:30
commit 9647782372
4 changed files with 117 additions and 63 deletions

View File

@ -93,7 +93,7 @@ class Dashboard_Controller extends REST_Controller {
* get university based student registration details for dash board
* created by kms
* */
public function getUniversityRegisteredStudent(){
public function getUniversityRegisteredStudent_post(){
$data = $this->post('data');
$getRegisteredDetails = $this->dashboard_model->get_univ_registered_student($data);
if ($getRegisteredDetails) {

View File

@ -74,7 +74,37 @@ class Dashboard_model extends CI_Model
* created by kms
* */
public function get_univ_registered_student($details){
$this->db->distinct();
$this->db->select('UniversityID,UniversityName');
$this->db->from(UNIVERSITY);
$this->db->order_by('ID','DESC');
$this->db->where('BranchCode',$details['localBranchID']);
$getUnivDetails = $this->db->get();
if($getUnivDetails->result()){
$resultDetails['resultStatus']=true;
foreach ($getUnivDetails->result() as $rows){
$fetchDetails['UniversityID']=$rows->UniversityID;
$fetchDetails['UniversityName']=$rows->UniversityName;
$this->db->select('StudentID');
$this->db->from(STUDENTCOURSE);
$this->db->where('BranchID',$details['localBranchID']);
$this->db->where('UniversityID',$rows->UniversityID);
$getRegisterDetails = $this->db->get();
if($getRegisterDetails->num_rows()>0){
$fetchDetails['StudentCounts']=$getRegisterDetails->num_rows();
}
else{
$fetchDetails['StudentCounts']=0;
}
$getArray[]=$fetchDetails;
}
$resultDetails['details']=$getArray;
}
else{
$resultDetails['resultStatus']=false;
$resultDetails['Message']="No records found!";
}
return $resultDetails;
}

View File

@ -10,7 +10,7 @@ app.controller('dashboardCtrl', ["$scope","$rootScope", "toaster", "$filter", "n
* this method called from view ng-init directive
* created by kms
* */
$scope.getLoginType=JSON.parse(localStorage.getItem('localObj')).localType;
$scope.initCallTracking = function () {
$rootScope.pendingFolloupDetails = [];
var getCallTrack = {
@ -184,10 +184,11 @@ app.controller('OnotherCtrl', ["$scope", "toaster", "$filter", "$http", "API_POI
var localDetails = ipCookie('cookiechk');
$scope.init = function () {
$scope.this_Student = 0;
$scope.this_Staff = 0;
$scope.this_TotalUser = 0;
$scope.getTotalUsers();
// $scope.this_Student = 0;
// $scope.this_Staff = 0;
// $scope.this_TotalUser = 0;
// $scope.getTotalUsers();
$scope.getUniversityRegisteredDetails();
}
@ -284,6 +285,34 @@ app.controller('OnotherCtrl', ["$scope", "toaster", "$filter", "$http", "API_POI
legendTemplate: '<ul class="tc-chart-js-legend"><% for (var i=0; i<segments.length; i++){%><li><span style="background-color:<%=segments[i].fillColor%>"></span><%if(segments[i].label){%><%=segments[i].label%><%}%></li><%}%></ul>'
};
/*
* get university based student registration details
* created by kms
* */
$scope.getUniversityRegisteredDetails = function () {
$scope.registerdStudentDetails="";
$scope.notEmptyRegistration=true;
var req = {
method: 'POST',
url: apiPoint.url + 'getUniversityRegisteredStudent/',
headers: {
'Content-Type': 'application/json'
},
data: {
data: localDetails
}
};
$http(req).then(function (response) {
if (response.data) {
$scope.notEmptyRegistration=response.data.resultStatus;
$scope.registerdStudentDetails=response.data.details;
} else {
$scope.registerdStudentDetails="";
$scope.notEmptyRegistration=false;
}
});
};
}]);
app.filter('unique', function() {

View File

@ -15,8 +15,44 @@
<!-- end: DASHBOARD TITLE -->
<!-- start: FEATURED BOX LINKS -->
<div class="container-fluid container-fullw bg-white" ng-controller="dashboardCtrl">
<!-- start student registration details-->
<div ng-if="getLoginType!='R004'" ng-controller="OnotherCtrl" data-ng-init="init()">
<div class="col-md-12">
<div class="panel panel-white" id="panel4">
<div class="panel-heading panel-white">
<h4 class="panel-title text-blue">University Registration</h4>
</div>
<div class="panel-body">
<div ng-if="notEmptyRegistration==false">
<center>
<h5 class="text-dark">No university details!</h5>
</center>
</div>
<div class="col-md-3" ng-if="notEmptyRegistration==true" ng-repeat="registration in registerdStudentDetails">
<div class="panel panel-white" id="{{registration.UniversityID}}">
<!--<div class="panel-heading panel-white">
<h4 class="panel-title text-blue">{{registration.UniversityID}}</h4>
</div>-->
<div class="panel-body">
<label class="text-bold">{{registration.UniversityName | uppercase}}</label>
<div>
<label>No of Registration &nbsp;:&nbsp;<span>{{registration.StudentCounts}}</span></label>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!--end student registration-->
<div class="row" data-ng-init="initCallTracking()">
<div class="row">
<div class="col-md-12">
<div class="col-sm-6">
<div class="container">
<div class="row">
@ -41,13 +77,13 @@
<th> Name</th>
<th>Mobile </th>
<th>Activity</th>
<th>Status</th>
<th class="hidden-xs">Status</th>
</tr>
</thead>
<tbody ng-repeat="today in todayFolloupDetails">
<tbody>
<tr>
<tr ng-repeat="today in todayFolloupDetails">
<td>{{today.TrackingID}}</td>
<td><a tooltip="View Student" class="text-dark" ng-click="open(today);">{{today.LeadName}}</a></td>
<td><a tooltip="View Student" class="text-dark" ng-click="open(today);">{{today.MobileNumber}}</a></td>
@ -88,13 +124,13 @@
<th>Mobile </th>
<th>Activity</th>
<th>Followup </th>
<th>Status</th>
<th class="hidden-xs">Status</th>
</tr>
</thead>
<tbody ng-repeat="lead in leadDetails">
<tbody>
<tr>
<tr ng-repeat="lead in leadDetails">
<td>{{lead.TrackingID}}</td>
<td><a tooltip="View Student" class="text-dark" ng-click="open(lead);">{{lead.LeadName}}</a></td>
<td><a tooltip="View Student" class="text-dark" ng-click="open(lead);">{{lead.MobileNumber}}</a></td>
@ -135,13 +171,13 @@
<th>Mobile </th>
<th>Activity</th>
<th>Followup </th>
<th>Status</th>
<th class="hidden-xs">Status</th>
</tr>
</thead>
<tbody ng-repeat="pending in pendingFolloupDetails">
<tbody>
<tr>
<tr ng-repeat="pending in pendingFolloupDetails">
<td>{{pending.TrackingID}}</td>
<td><a tooltip="View Student" class="text-dark" ng-click="open(pending);">{{pending.LeadName}}</a></td>
<td><a tooltip="View Student" class="text-dark" ng-click="open(pending);">{{pending.MobileNumber}}</a></td>
@ -158,51 +194,9 @@
</div>
</div>
<div class="row">
<!-- <div class="col-sm-6">
<div class="panel panel-white" id="panel3">
<div class="panel-heading panel-white">
<h4 class="panel-title text-purple"> Leads Created Today :{{leadDetails.length}}</h4>
<ct-paneltool class="panel-tools" tool-refresh="load1" ng-click="initCallTracking()"></ct-paneltool>
</div>
<div class="panel-body">
<div ng-if="emptyDataLead==true">
<center>
<h5 class="text-dark">No Lead Created By Today!</h5>
</center>
</div>
<div class="panel-scroll height-180" perfect-scrollbar wheel-propagation="false" suppress-scroll-x="true" ng-if="emptyDataLead==false">
<table class="table table-hover" ng-controller="studentModalDemoCtrl">
<thead>
<tr>
<th> ID</th>
<th> Name</th>
<th>Mobile </th>
<th>Activity</th>
<th>Followup </th>
<th>Status</th>
<!--<div class="row">
</tr>
</thead>
<tbody ng-repeat="lead in leadDetails">
<tr>
<td>{{lead.TrackingID}}</td>
<td><a tooltip="View Student" class="text-dark" ng-click="open(lead);">{{lead.LeadName}}</a></td>
<td><a tooltip="View Student" class="text-dark" ng-click="open(lead);">{{lead.MobileNumber}}</a></td>
<td>{{lead.ActivityName}}</td>
<td>{{lead.FollowupOn}}</td>
<td class="hidden-xs" ng-if="lead.statusName=='CLOSE'"><span class="label label-sm label-info">{{lead.statusName}}</span></td>
<td class="hidden-xs" ng-if="lead.statusName!='CLOSE'"><span class="label label-sm label-info">{{lead.statusName}}</span></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div> -->
<!-- <div class="col-sm-6">
<div class="col-sm-6">
<div class="panel panel-white no-radius">
<div class="panel-heading border-bottom">
<h4 class="panel-title">New Users</h4>
@ -218,8 +212,9 @@
</div>
</div>
</div>
</div> -->
</div>
</div>
</div>-->
</div>
<div>
</div>