call tracking call count

This commit is contained in:
venbatechnologies@gmail.com 2018-10-25 15:47:01 +05:30
parent 6df985daa0
commit 87a530f2b7
4 changed files with 69 additions and 12 deletions

View File

@ -588,6 +588,28 @@ class Calltracking_model extends CI_Model {
//print_r($this->db->last_query()); //print_r($this->db->last_query());
$now = new DateTime();
$now->setTimezone(new DateTimezone('Asia/Kolkata'));
$todayDate=$now->format('Y-m-d');
$this->db->select('*');
$this->db->from('T_Lead_Details');
$this->db->where('DATE(CreatedOn)',$todayDate);
$numberDetails = $this->db->get();
$number=$numberDetails->result();
$total_number=count($number);
$result_array['TotalCallToday']=$total_number;
return $result_array; return $result_array;
} }

View File

@ -1408,6 +1408,9 @@ $REGID='';
// print_r($getlastid); // print_r($getlastid);
// echo 'in';
// die(); // die();
$this->db->select('ListCode'); $this->db->select('ListCode');
$this->db->from('T_PickListDetails'); $this->db->from('T_PickListDetails');
@ -1427,16 +1430,16 @@ $REGID='';
// $fromd= date("d-m-Y",strtotime($details['CreatedOn'])); $fromd= date("d-m-Y",strtotime($details['CreatedOn']));
// $upappform['BranchCode']=$details['BranchCode']; $upappform['BranchCode']=$details['BranchCode'];
// $upappform['AppFormDate']=$fromd; $upappform['AppFormDate']=$fromd;
// $upappform['Registration_Details_ID']=$REGID; $upappform['Registration_Details_ID']=$REGID;
// $upappform['ListCode']=$listcode; $upappform['ListCode']=$listcode;
// $upappform['CreatedBy']=$details['CreatedBy']; $upappform['CreatedBy']=$details['CreatedBy'];
// $upappform['CreatedOn']=$details['CreatedOn']; $upappform['CreatedOn']=$details['CreatedOn'];
// $upappform['Comments']='Fees for the student has been set'; $upappform['Comments']='Fees for the student has been set';
// $this->db->insert('T_ApplicationFormStatus', $upappform); $this->db->insert('T_ApplicationFormStatus', $upappform);

View File

@ -427,6 +427,7 @@ if(checkresult != -1)
$scope.trackingTodayno='';
/* /*
*get tracking list *get tracking list
@ -434,6 +435,8 @@ if(checkresult != -1)
* */ * */
$scope.init = function (myModel) { $scope.init = function (myModel) {
// console.log(myModel); // console.log(myModel);
var logcheck = JSON.parse(localStorage.getItem('localObj')); var logcheck = JSON.parse(localStorage.getItem('localObj'));
@ -472,6 +475,8 @@ if(checkresult != -1)
$scope.loader = true; $scope.loader = true;
var getTrackDetails = { var getTrackDetails = {
method: 'POST', method: 'POST',
url: apiPoint.url + 'getTrackingDetails/', url: apiPoint.url + 'getTrackingDetails/',
@ -490,7 +495,8 @@ if(checkresult != -1)
if(response.data.pendingTrackingDetails.trackingStatus && response.data.trackingDetails.length > 0){ if(response.data.pendingTrackingDetails.trackingStatus && response.data.trackingDetails.length > 0){
$scope.loader = false; $scope.loader = false;
$scope.trackingTodayno=response.data.TotalCallToday;
// console.log($scope.trackingTodayno);
// console.log(response.data) // console.log(response.data)
//$scope.currentDate1=$filter('date')(new Date(), 'dd-MM-yyyy'); //$scope.currentDate1=$filter('date')(new Date(), 'dd-MM-yyyy');
$scope.tillPendingDetails = response.data.pendingTrackingDetails.trackingDetails; $scope.tillPendingDetails = response.data.pendingTrackingDetails.trackingDetails;
@ -517,7 +523,7 @@ if(checkresult != -1)
}); });
//console.log($scope.data);
$rootScope.trackingStatus = response.data.statusDetails; $rootScope.trackingStatus = response.data.statusDetails;
localStorage.setItem('trackingList', JSON.stringify($scope.data)); localStorage.setItem('trackingList', JSON.stringify($scope.data));
@ -571,12 +577,22 @@ if(checkresult != -1)
} }
//sconsole.log($scope.data);
}); });
} }
// sorting function for table params // sorting function for table params
$scope.sort = function(keyname){ $scope.sort = function(keyname){
$scope.sortKey = keyname; //set the sortKey to the param passed $scope.sortKey = keyname; //set the sortKey to the param passed

View File

@ -126,6 +126,22 @@
</div> </div>
</div> </div>
</div> </div>
<div data-ng-init="getTodaycalls()">
<div style="margin: 8px;">
<div style="width: 45px; display: initial;">
<span style="font-size: 14px;
color: black;">Today's Count:</span> <span class="listCoutShow"> {{ trackingTodayno }}</span>
</div>
</div>
</div>
</div> </div>