Loaded completed todos when done is clicked

This commit is contained in:
Keith Holliday
2016-05-14 10:43:50 -05:00
parent 0537ff3552
commit 72c1729d54
3 changed files with 14 additions and 3 deletions

View File

@@ -140,6 +140,13 @@ habitrpg.controller("TasksCtrl", ['$scope', '$rootScope', '$location', 'User','N
*/
$scope._today = moment().add({days: 1});
$scope.loadedCompletedTodos = function () {
Tasks.getUserTasks(true)
.then(function (response) {
User.user.todos.concat(response.data.data);
});
}
/*
------------------------
Dailies