Updating doom line when changing us points
parent
be7e4c11dc
commit
8c12807296
|
@ -287,8 +287,13 @@ BacklogDirective = ($repo, $rootscope) ->
|
|||
# Remove them from backlog
|
||||
$scope.userstories = ussCurrent.without.apply(ussCurrent, selectedUss).value()
|
||||
|
||||
extraPoints = _.map(selectedUss, (v, k) -> v.total_points)
|
||||
totalExtraPoints = _.reduce(extraPoints, (acc, num) -> acc + num)
|
||||
|
||||
# Add them to current sprint
|
||||
$scope.sprints[0].user_stories = _.union(selectedUss, $scope.sprints[0].user_stories)
|
||||
# Update the total of points
|
||||
$scope.sprints[0].total_points += totalExtraPoints
|
||||
|
||||
$ctrl.filterVisibleUserstories()
|
||||
$repo.saveAll(selectedUss)
|
||||
|
@ -596,8 +601,6 @@ UsPointsDirective = ($repo) ->
|
|||
event.preventDefault()
|
||||
target = angular.element(event.target)
|
||||
|
||||
console.log target
|
||||
|
||||
if target.is("span")
|
||||
event.stopPropagation()
|
||||
|
||||
|
@ -643,6 +646,9 @@ UsPointsDirective = ($repo) ->
|
|||
$repo.refresh(us).then ->
|
||||
$ctrl.loadProjectStats()
|
||||
|
||||
scopeDefer $scope, ->
|
||||
$scope.$emit("doomline:redraw")
|
||||
|
||||
$scope.$on "$destroy", ->
|
||||
$el.off()
|
||||
|
||||
|
|
|
@ -20,10 +20,10 @@ section.sprints
|
|||
div.sprint-date(tg-date-range="sprint.estimated_start,sprint.estimated_finish")
|
||||
ul
|
||||
li
|
||||
span.number(tg-bo-html="sprint.closed_points") --
|
||||
span.number(ng-bind="sprint.closed_points|default:''") --
|
||||
span.description closed
|
||||
li
|
||||
span.number(tg-bo-html="sprint.total_points") --
|
||||
span.number(ng-bind="sprint.total_points|default:''")
|
||||
span.description total
|
||||
div.sprint-progress-bar
|
||||
div.current-progress(tg-sprint-progressbar="sprint")
|
||||
|
|
Loading…
Reference in New Issue