Skip to content

Commit

Permalink
Merge pull request #50 from david-poindexter/manage-user-activity-30days
Browse files Browse the repository at this point in the history
Implement Last 30 Days for default Manage User Activity dates
  • Loading branch information
valadas authored Jan 31, 2024
2 parents 2f68717 + 7be3520 commit 06abc1f
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion app/controllers/user-activity/user-activity-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,19 +157,31 @@
return date;
};

$scope.getDate30DaysAgo = function () {
var date = new Date();
date.setDate(date.getDate() - 30);
return date;
};

$scope.rollingYear = function () {
$scope.period_start = $scope.getDateOneYearAgo();
$scope.period_end = $scope.getCurrentDate();
$scope.getUserActivity();
};

$scope.last30Days = function () {
$scope.period_start = $scope.getDate30DaysAgo();
$scope.period_end = $scope.getCurrentDate();
$scope.getUserActivity();
};

init = function () {
var promises = [];
promises.push($scope.getActivities());
return $q.all(promises);
};
init();
$scope.rollingYear();
$scope.last30Days();

}]);

0 comments on commit 06abc1f

Please sign in to comment.