Show every task in its row, and show unassigned tasks
parent
9d54ab06be
commit
ef13e5901d
|
@ -73,7 +73,26 @@ class TaskboardController extends mixOf(taiga.Controller, taiga.PageMixin)
|
|||
loadTasks: ->
|
||||
return @rs.tasks.list(@scope.projectId, @scope.sprintId).then (tasks) =>
|
||||
@scope.tasks = tasks
|
||||
@scope.tasksByStatus = _.groupBy(tasks, "status")
|
||||
@scope.usTasks = {}
|
||||
@scope.unassignedTasks = {}
|
||||
|
||||
for us in @scope.userstories
|
||||
@scope.usTasks[us.id] = {}
|
||||
|
||||
for status in @scope.taskStatusList
|
||||
@scope.usTasks[us.id][status.id] = []
|
||||
|
||||
for status in @scope.taskStatusList
|
||||
@scope.unassignedTasks[status.id] = []
|
||||
|
||||
for task in @scope.tasks
|
||||
if task.user_story == null
|
||||
@scope.unassignedTasks[task.status]?.push(task)
|
||||
else
|
||||
# why? because a django-filters sucks
|
||||
if @scope.usTasks[task.user_story]?
|
||||
@scope.usTasks[task.user_story][task.status]?.push(task)
|
||||
|
||||
return tasks
|
||||
|
||||
loadProject: ->
|
||||
|
@ -97,7 +116,6 @@ class TaskboardController extends mixOf(taiga.Controller, taiga.PageMixin)
|
|||
return @q.all([
|
||||
@.loadSprintStats(),
|
||||
@.loadSprint()
|
||||
# @.loadTasks(),
|
||||
]).then(=> @.loadTasks())
|
||||
|
||||
loadInitialData: ->
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
div.taskboard-task(ng-repeat="task in unassignedTasks[st.id] track by task.id")
|
||||
div.taskboard-tagline
|
||||
a.taskboard-tag(ng-repeat="tag in task.tags" href="" title="{{ tag }}") {{ tag }}
|
||||
div.taskboard-task-inner
|
||||
figure.avatar
|
||||
a(href="", title="UserName")
|
||||
img.avatar(src="http://thecodeplayer.com/u/uifaces/12.jpg", alt="username")
|
||||
figcaption Username
|
||||
p.taskboard-text
|
||||
span.task-num(ng-bind="task.ref")
|
||||
span.task-name(ng-bind="task.subject")
|
||||
a.icon.icon-edit(href="", title="Edit", ng-click="ctrl.editTask(task)")
|
||||
a.icon.icon-drag-h(href="", title="Drag&Drop")
|
|
@ -1,4 +1,4 @@
|
|||
div.taskboard-task(ng-repeat="task in tasksByStatus[s.id] track by task.id")
|
||||
div.taskboard-task(ng-repeat="task in usTasks[us.id][st.id] track by task.id")
|
||||
div.taskboard-tagline
|
||||
a.taskboard-tag(ng-repeat="tag in task.tags" href="" title="{{ tag }}") {{ tag }}
|
||||
div.taskboard-task-inner
|
||||
|
|
|
@ -17,5 +17,14 @@ div.taskboard-table
|
|||
ul.points-list(tg-taskboard-us-points="us")
|
||||
include ../components/addnewtask
|
||||
|
||||
div.taskboard_task-playground.task-column(ng-repeat="s in taskStatusList track by s.id")
|
||||
div.taskboard_task-playground.task-column(ng-repeat="st in taskStatusList track by st.id")
|
||||
include ../components/taskboard-task
|
||||
|
||||
div.task-row(ng-init="us = null", tg-taskboard-taskrow)
|
||||
div.taskboard_us-list.task-column
|
||||
h3.us-title
|
||||
span Unassigned tasks
|
||||
include ../components/addnewtask
|
||||
|
||||
div.taskboard_task-playground.task-column(ng-repeat="st in taskStatusList track by st.id")
|
||||
include ../components/taskboard-task-unassigned
|
||||
|
|
Loading…
Reference in New Issue