From 43a6ad5a777481cd3e94ce6d61a5cdcadf34cb9e Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Fri, 2 Feb 2018 15:46:32 +0530 Subject: [PATCH] course details changes done --- Apollo/assets/js/controllers/dashboardCtrl.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Apollo/assets/js/controllers/dashboardCtrl.js b/Apollo/assets/js/controllers/dashboardCtrl.js index 4c2a326e..0f77d24b 100755 --- a/Apollo/assets/js/controllers/dashboardCtrl.js +++ b/Apollo/assets/js/controllers/dashboardCtrl.js @@ -56,13 +56,18 @@ app.controller('dashboardCtrl', ["$scope","$rootScope", "toaster", "$filter", "n $scope.emptyDataToday = true; } if (response.data.todayPendingStatus) { - $scope.currentDate = new Date().getFullYear() + '-' + ('0' + (new Date().getMonth() + 1)).slice(-2) + '-' + ('0' + new Date().getDate()).slice(-2); // $scope.currentDate = new Date().getFullYear() + '-' + ('0' + (new Date().getMonth() + 1)).slice(-2) + '-' + ('0' + new Date().getDate()).slice(-2); - $scope.currentDate=$filter('date')(new Date(), 'dd-MM-yyyy'); + // $scope.currentDate = new Date().getFullYear() + '-' + ('0' + (new Date().getMonth() + 1)).slice(-2) + '-' + ('0' + new Date().getDate()).slice(-2); + $scope.currentDate=$filter('date')(new Date(), 'yyyy-MM-dd'); $scope.fetchFolloupDetails = response.data.PendingFolloupDetails.trackingDetails; angular.forEach($scope.fetchFolloupDetails, function (value, key) { + var getDay = value.FollowupOn.substring(0, 2); + var getMonth = value.FollowupOn.substring(3, 5); + var getYear = value.FollowupOn.substring(6, 10); + // var dbFollowDate = getYear+'-'+getMonth+'-'+getDay; + $scope.dbFollowDate = getYear+'-'+getMonth+'-'+getDay; - if (($scope.currentDate) > (value.FollowupOn) && (value.statusName!='CLOSE')) { + if (($scope.currentDate) > ($scope.dbFollowDate) && (value.statusName!='CLOSE')) { $rootScope.pendingFolloupDetails.push(value); }