get donebacklog tasks on demand

This commit is contained in:
Johannes Millan 2017-05-03 16:15:01 +02:00
parent fd4df31bee
commit cbac24a425
2 changed files with 4 additions and 2 deletions

View file

@ -12,7 +12,7 @@
<th></th>
</tr>
<tr ng-repeat="task in r.doneBacklogTasks"
<tr ng-repeat="task in vm.doneBacklogTasks"
ng-class="{'is-done': task.isDone}">
<td ng-bind="task.title"></td>
<td><span ng-repeat="task in task.subTasks"><span ng-bind="task.title"></span>: <span ng-bind="task.timeSpent|duration"></span><br></span></td>

View file

@ -25,9 +25,11 @@
}
/* @ngInject */
function DoneTasksBacklogCtrl($scope, TasksUtil) {
function DoneTasksBacklogCtrl($scope, TasksUtil, Tasks) {
let vm = this;
vm.doneBacklogTasks = Tasks.getDoneBacklog();
const watcher = $scope.$watch('r.doneBacklogTasks', (mVal) => {
vm.totalTimeSpent = TasksUtil.calcTotalTimeSpent(mVal);
}, true);