44 lines
1.3 KiB
JavaScript
44 lines
1.3 KiB
JavaScript
'use strict';
|
|
/**
|
|
* controllers for ng-table
|
|
* Simple table with sorting and filtering on AngularJS
|
|
*/
|
|
|
|
app.controller('dashboardCtrl', ["$scope","toaster", "$filter", "ngTableParams", "API_POINTS", "$localStorage", "$http", "$state", function ($scope,toaster, $filter, ngTableParams, apiPoint, $localStorage, $http, $state) {
|
|
/*
|
|
* used to get dash board call track details
|
|
* this method called from view ng-init directive
|
|
* created by kms
|
|
* */
|
|
$scope.todayFolloupDetails="";
|
|
$scope.initCallTracking = function () {
|
|
var getCallTrack = {
|
|
method: 'POST',
|
|
url: apiPoint.url + 'getDashboardCallTrack/',
|
|
headers: {
|
|
'Content-Type': 'application/json'
|
|
},
|
|
data: {
|
|
requestedBy: JSON.parse(localStorage.getItem('localObj')).localUserID
|
|
}
|
|
};
|
|
$http(getCallTrack).then(function (response) {
|
|
if (response.data.status==200) {
|
|
if(response.data.todayStatus){
|
|
$scope.todayFolloupDetails=response.data.todayFolloupDetails;
|
|
}
|
|
else{
|
|
$scope.todayFolloupDetails='EMPTY';
|
|
}
|
|
|
|
} else {
|
|
|
|
$scope.todayFolloupDetails='EMPTY';
|
|
|
|
}
|
|
});
|
|
};
|
|
|
|
}]);
|
|
|