Finishing sprints visualization for backlog
parent
0c19f8bb34
commit
5dedd6886c
|
@ -233,7 +233,12 @@ BacklogDirective = ($repo) ->
|
||||||
#############################################################################
|
#############################################################################
|
||||||
|
|
||||||
BacklogSprintDirective = ($repo) ->
|
BacklogSprintDirective = ($repo) ->
|
||||||
link = ($scope, $el, $attrs) ->
|
|
||||||
|
#########################
|
||||||
|
## Common parts
|
||||||
|
#########################
|
||||||
|
|
||||||
|
linkCommon = ($scope, $el, $attrs, $ctrl) ->
|
||||||
$ctrl = $el.closest("div.wrapper").controller()
|
$ctrl = $el.closest("div.wrapper").controller()
|
||||||
|
|
||||||
sprint = $scope.$eval($attrs.tgBacklogSprint)
|
sprint = $scope.$eval($attrs.tgBacklogSprint)
|
||||||
|
@ -243,15 +248,28 @@ BacklogSprintDirective = ($repo) ->
|
||||||
if sprint.closed
|
if sprint.closed
|
||||||
$el.addClass("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
|
# Event Handlers
|
||||||
$el.on "click", ".sprint-summary > a", (event) ->
|
$el.on "click", ".sprint-summary > a", (event) ->
|
||||||
$el.find(".sprint-table").toggle()
|
$el.find(".sprint-table").toggle()
|
||||||
|
|
||||||
$scope.$on "$destroy", ->
|
#########################
|
||||||
$el.off()
|
## Drag & Drop Link
|
||||||
|
#########################
|
||||||
# Drag & Drop
|
|
||||||
|
|
||||||
|
linkSortable = ($scope, $el, $attrs, $ctrl) ->
|
||||||
resortAndSave = ->
|
resortAndSave = ->
|
||||||
toSave = []
|
toSave = []
|
||||||
for item, i in $scope.sprint.user_stories
|
for item, i in $scope.sprint.user_stories
|
||||||
|
@ -312,6 +330,14 @@ BacklogSprintDirective = ($repo) ->
|
||||||
onRemove: onRemoveItem,
|
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}
|
return {link: link}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -4,8 +4,8 @@ section.sprints
|
||||||
div.summary
|
div.summary
|
||||||
ul
|
ul
|
||||||
li
|
li
|
||||||
span.number 12
|
span.number(tg-bo-html="stats.total_milestones") --
|
||||||
span.description project<br />points
|
span.description <br/>sprints
|
||||||
div.new-sprint
|
div.new-sprint
|
||||||
a.button-green(href="", title="Add New US")
|
a.button-green(href="", title="Add New US")
|
||||||
span.text + New sprint
|
span.text + New sprint
|
||||||
|
@ -15,13 +15,13 @@ section.sprints
|
||||||
div.sprint-summary
|
div.sprint-summary
|
||||||
a.icon.icon-arrow-up(href="", title="compact Sprint")
|
a.icon.icon-arrow-up(href="", title="compact Sprint")
|
||||||
span.sprint-name current sprint
|
span.sprint-name current sprint
|
||||||
span.sprint-date 04/06/14-20/06/14
|
span.sprint-date
|
||||||
ul
|
ul
|
||||||
li
|
li
|
||||||
span.number 12
|
span.number(tg-bo-html="sprint.closed_points") --
|
||||||
span.description closed<br />points
|
span.description closed<br />points
|
||||||
li
|
li
|
||||||
span.number 24
|
span.number(tg-bo-html="sprint.total_points") --
|
||||||
span.description total<br />points
|
span.description total<br />points
|
||||||
div.sprint-progress-bar
|
div.sprint-progress-bar
|
||||||
div.current-progress
|
div.current-progress
|
||||||
|
@ -35,74 +35,3 @@ section.sprints
|
||||||
a.button.button-gray(href="", tg-nav="project-taskboard:project=projectId,sprint=sprint.id",
|
a.button.button-gray(href="", tg-nav="project-taskboard:project=projectId,sprint=sprint.id",
|
||||||
title="Current Sprint Taskboard")
|
title="Current Sprint Taskboard")
|
||||||
span 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-sanitize/angular-sanitize.js",
|
||||||
"app/vendor/angular-animate/angular-animate.js",
|
"app/vendor/angular-animate/angular-animate.js",
|
||||||
"app/vendor/i18next/i18next.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