Commit d62ecbfc authored by Prayas Jain's avatar Prayas Jain

Updated Login Details Order in MyLoginDetail Page

parent 596c479e
...@@ -34,9 +34,9 @@ myApp.controller("employeeController", function($scope, $http, myFactory, $mdDia ...@@ -34,9 +34,9 @@ myApp.controller("employeeController", function($scope, $http, myFactory, $mdDia
method : "GET", method : "GET",
url : appConfig.appUri + "attendance/employeeLoginsBasedOnDate?empId=" + empId + "&fromDate=" + fromDate + "&toDate=" +toDate url : appConfig.appUri + "attendance/employeeLoginsBasedOnDate?empId=" + empId + "&fromDate=" + fromDate + "&toDate=" +toDate
}).then(function mySuccess(response) { }).then(function mySuccess(response) {
$scope.gridOptions.data = response.data; $scope.gridOptions.data = response.data.reverse();
if(response.data.length > 0){ if(response.data.length > 0){
$scope.avgLoginHrs = response.data[0].totalAvgTime + " Hrs"; $scope.avgLoginHrs = response.data[response.data.length-1].totalAvgTime + " Hrs";
} }
if(response.data.length > 10){ if(response.data.length > 10){
$scope.gridOptions.enablePaginationControls = true; $scope.gridOptions.enablePaginationControls = true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment