Finishing sprints visualization for backlog
parent
0c19f8bb34
commit
5dedd6886c
|
@ -233,7 +233,12 @@ BacklogDirective = ($repo) ->
|
|||
#############################################################################
|
||||
|
||||
BacklogSprintDirective = ($repo) ->
|
||||
link = ($scope, $el, $attrs) ->
|
||||
|
||||
#########################
|
||||
## Common parts
|
||||
#########################
|
||||
|
||||
linkCommon = ($scope, $el, $attrs, $ctrl) ->
|
||||
$ctrl = $el.closest("div.wrapper").controller()
|
||||
|
||||
sprint = $scope.$eval($attrs.tgBacklogSprint)
|
||||
|
@ -243,15 +248,28 @@ BacklogSprintDirective = ($repo) ->
|
|||
if sprint.closed
|
||||
$el.addClass("sprint-closed")
|
||||
|
||||
if not $scope.$first and not sprint.closed
|
||||
$el.addClass("sprint-old-open")
|
||||
|
||||
# Atatch formatted dates
|
||||
initialDate = moment(sprint.estimated_start).format("YYYY/MM/DD")
|
||||
finishDate = moment(sprint.estimated_finish).format("YYYY/MM/DD")
|
||||
dates = "#{initialDate}-#{finishDate}"
|
||||
$el.find(".sprint-date").html(dates)
|
||||
|
||||
# Update progress bars
|
||||
progressPercentage = Math.round(100 * (sprint.closed_points / sprint.total_points))
|
||||
$el.find(".current-progress").css("width", "#{progressPercentage}%")
|
||||
|
||||
# Event Handlers
|
||||
$el.on "click", ".sprint-summary > a", (event) ->
|
||||
$el.find(".sprint-table").toggle()
|
||||
|
||||
$scope.$on "$destroy", ->
|
||||
$el.off()
|
||||
|
||||
# Drag & Drop
|
||||
#########################
|
||||
## Drag & Drop Link
|
||||
#########################
|
||||
|
||||
linkSortable = ($scope, $el, $attrs, $ctrl) ->
|
||||
resortAndSave = ->
|
||||
toSave = []
|
||||
for item, i in $scope.sprint.user_stories
|
||||
|
@ -312,6 +330,14 @@ BacklogSprintDirective = ($repo) ->
|
|||
onRemove: onRemoveItem,
|
||||
})
|
||||
|
||||
link = ($scope, $el, $attrs) ->
|
||||
$ctrl = $el.controller()
|
||||
linkSortable($scope, $el, $attrs, $ctrl)
|
||||
linkCommon($scope, $el, $attrs, $ctrl)
|
||||
|
||||
$scope.$on "$destroy", ->
|
||||
$el.off()
|
||||
|
||||
return {link: link}
|
||||
|
||||
|
||||
|
|
|
@ -4,8 +4,8 @@ section.sprints
|
|||
div.summary
|
||||
ul
|
||||
li
|
||||
span.number 12
|
||||
span.description project<br />points
|
||||
span.number(tg-bo-html="stats.total_milestones") --
|
||||
span.description <br/>sprints
|
||||
div.new-sprint
|
||||
a.button-green(href="", title="Add New US")
|
||||
span.text + New sprint
|
||||
|
@ -15,13 +15,13 @@ section.sprints
|
|||
div.sprint-summary
|
||||
a.icon.icon-arrow-up(href="", title="compact Sprint")
|
||||
span.sprint-name current sprint
|
||||
span.sprint-date 04/06/14-20/06/14
|
||||
span.sprint-date
|
||||
ul
|
||||
li
|
||||
span.number 12
|
||||
span.number(tg-bo-html="sprint.closed_points") --
|
||||
span.description closed<br />points
|
||||
li
|
||||
span.number 24
|
||||
span.number(tg-bo-html="sprint.total_points") --
|
||||
span.description total<br />points
|
||||
div.sprint-progress-bar
|
||||
div.current-progress
|
||||
|
@ -35,74 +35,3 @@ section.sprints
|
|||
a.button.button-gray(href="", tg-nav="project-taskboard:project=projectId,sprint=sprint.id",
|
||||
title="Current Sprint Taskboard")
|
||||
span Sprint Taskboard
|
||||
|
||||
// If is current sprint
|
||||
// section.sprint.sprint-current
|
||||
// header
|
||||
// div.sprint-summary
|
||||
// a.icon.icon-arrow-up(href="", title="compact Sprint")
|
||||
// span.sprint-name current sprint
|
||||
// span.sprint-date 04/06/14-20/06/14
|
||||
// ul
|
||||
// li
|
||||
// span.number 12
|
||||
// span.description closed<br />points
|
||||
// li
|
||||
// span.number 24
|
||||
// span.description total<br />points
|
||||
// div.sprint-progress-bar
|
||||
// div.current-progress
|
||||
// div.sprint-table
|
||||
// - for (var x = 0; x < 10; x++)
|
||||
// div.row
|
||||
// div.column-us.width-8
|
||||
// a.us-name(href="", title="") #125 Crear el perfil de usuario Senior en el admin
|
||||
// div.column-points.width-1 45
|
||||
// a.button.button-gray(href="", title="Current Sprint Taksboard")
|
||||
// span Sprint Taskboard
|
||||
|
||||
// // If Sprint is open but date is old
|
||||
// section.sprint.sprint-old-open
|
||||
// header
|
||||
// div.sprint-summary
|
||||
// a.icon.icon-arrow-up(href="", title="compact Sprint")
|
||||
// span.sprint-name old open sprint
|
||||
// span.sprint-date 04/05/14-03/06/14
|
||||
// ul
|
||||
// li
|
||||
// span.number 20
|
||||
// span.description closed<br />points
|
||||
// li
|
||||
// span.number 24
|
||||
// span.description total<br />points
|
||||
// div.sprint-progress-bar
|
||||
// div.current-progress
|
||||
// div.sprint-table
|
||||
// - for (var x = 0; x < 10; x++)
|
||||
// div.row
|
||||
// div.column-us.width-8
|
||||
// a(href="", title="") #125 Crear el perfil de usuario Senior en el admin
|
||||
// div.column-points.width-1 45
|
||||
|
||||
// // If Sprint is closed and date is old
|
||||
// section.sprint.sprint-closed
|
||||
// header
|
||||
// div.sprint-summary
|
||||
// a.icon.icon-arrow-up(href="", title="compact Sprint")
|
||||
// span.sprint-name old sprint
|
||||
// span.sprint-date 04/04/14-03/05/14
|
||||
// ul
|
||||
// li
|
||||
// span.number 24
|
||||
// span.description closed<br />points
|
||||
// li
|
||||
// span.number 24
|
||||
// span.description total<br />points
|
||||
// div.sprint-progress-bar
|
||||
// div.current-progress
|
||||
// div.sprint-table
|
||||
// - for (var x = 0; x < 10; x++)
|
||||
// div.row
|
||||
// div.column-us.width-8
|
||||
// a(href="", title="") #125 Crear el perfil de usuario Senior en el admin
|
||||
// div.column-points.width-1 45
|
||||
|
|
|
@ -51,7 +51,8 @@ paths = {
|
|||
"app/vendor/angular-sanitize/angular-sanitize.js",
|
||||
"app/vendor/angular-animate/angular-animate.js",
|
||||
"app/vendor/i18next/i18next.js",
|
||||
"app/js/Sortable.js"
|
||||
"app/js/Sortable.js",
|
||||
"app/vendor/moment/min/moment-with-langs.js"
|
||||
]
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue