changes in course

This commit is contained in:
gandhimathi 2017-11-30 18:13:59 +05:30
parent 6ada050c32
commit 208535b42d

View File

@ -10,7 +10,7 @@ app.controller('dashboardCtrl', ["$scope","toaster", "$filter", "ngTableParams",
* this method called from view ng-init directive
* created by kms
* */
$scope.todayFolloupDetails="";
$scope.initCallTracking = function () {
var getCallTrack = {
method: 'POST',
@ -25,15 +25,38 @@ app.controller('dashboardCtrl', ["$scope","toaster", "$filter", "ngTableParams",
$http(getCallTrack).then(function (response) {
if (response.data.status==200) {
if(response.data.todayStatus){
$scope.todayFolloupDetails=response.data.todayFolloupDetails;
$scope.todayFolloupDetails=response.data.todayFolloupDetails.trackingDetails;
$scope.emptyDataToday=false;
}
else{
$scope.todayFolloupDetails='EMPTY';
$scope.todayFolloupDetails="";
$scope.emptyDataToday=true;
}
if(response.data.todayPendingStatus){
$scope.pendingFolloupDetails=response.data.PendingFolloupDetails.trackingDetails;
$scope.emptyDataPending=false;
}
else{
$scope.pendingFolloupDetails="";
$scope.emptyDataPending=true;
}
if(response.data.todayLeadStatus){
$scope.leadDetails=response.data.todayLeadDetails.trackingDetails;
$scope.emptyDataLead=false;
}
else{
$scope.leadDetails="";
$scope.emptyDataLead=true;
}
} else {
$scope.todayFolloupDetails='EMPTY';
$scope.emptyDataToday=true;
$scope.emptyDataPending=true;
}
});