course details changes done
This commit is contained in:
parent
8397cc45b0
commit
268914c651
@ -4,7 +4,7 @@
|
|||||||
* Simple table with sorting and filtering on AngularJS
|
* 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) {
|
app.controller('dashboardCtrl', ["$scope","$rootScope", "toaster", "$filter", "ngTableParams", "API_POINTS", "$localStorage", "$http", "$state", function ($scope,$rootScope, toaster, $filter, ngTableParams, apiPoint, $localStorage, $http, $state) {
|
||||||
/*
|
/*
|
||||||
* used to get dash board call track details
|
* used to get dash board call track details
|
||||||
* this method called from view ng-init directive
|
* this method called from view ng-init directive
|
||||||
@ -12,6 +12,8 @@ app.controller('dashboardCtrl', ["$scope", "toaster", "$filter", "ngTableParams"
|
|||||||
* */
|
* */
|
||||||
|
|
||||||
$scope.initCallTracking = function () {
|
$scope.initCallTracking = function () {
|
||||||
|
$rootScope.pendingFolloupDetails = [];
|
||||||
|
if(JSON.parse(localStorage.getItem('localObj')).localUserID!=null){
|
||||||
var getCallTrack = {
|
var getCallTrack = {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
url: apiPoint.url + 'getDashboardCallTrack/',
|
url: apiPoint.url + 'getDashboardCallTrack/',
|
||||||
@ -34,7 +36,15 @@ app.controller('dashboardCtrl', ["$scope", "toaster", "$filter", "ngTableParams"
|
|||||||
$scope.emptyDataToday = true;
|
$scope.emptyDataToday = true;
|
||||||
}
|
}
|
||||||
if (response.data.todayPendingStatus) {
|
if (response.data.todayPendingStatus) {
|
||||||
$scope.pendingFolloupDetails = response.data.PendingFolloupDetails.trackingDetails;
|
$scope.currentDate = new Date().getFullYear() + '-' + ('0' + (new Date().getMonth() + 1)).slice(-2) + '-' + ('0' + new Date().getDate()).slice(-2);
|
||||||
|
|
||||||
|
$scope.fetchFolloupDetails = response.data.PendingFolloupDetails.trackingDetails;
|
||||||
|
angular.forEach($scope.fetchFolloupDetails, function (value, key) {
|
||||||
|
if (($scope.currentDate) < (value.FollowupOn)) {
|
||||||
|
$rootScope.pendingFolloupDetails.push(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
$scope.emptyDataPending = false;
|
$scope.emptyDataPending = false;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -51,8 +61,6 @@ app.controller('dashboardCtrl', ["$scope", "toaster", "$filter", "ngTableParams"
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
$scope.emptyDataToday = true;
|
$scope.emptyDataToday = true;
|
||||||
@ -60,6 +68,7 @@ app.controller('dashboardCtrl', ["$scope", "toaster", "$filter", "ngTableParams"
|
|||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
}]);
|
}]);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user