Sorting correctly related tasks
parent
89d9472ae8
commit
f5f55889c3
|
@ -229,7 +229,7 @@ RelatedTasksDirective = ($repo, $rs, $rootscope) ->
|
||||||
link = ($scope, $el, $attrs) ->
|
link = ($scope, $el, $attrs) ->
|
||||||
loadTasks = ->
|
loadTasks = ->
|
||||||
return $rs.tasks.list($scope.projectId, null, $scope.usId).then (tasks) =>
|
return $rs.tasks.list($scope.projectId, null, $scope.usId).then (tasks) =>
|
||||||
$scope.tasks = _.sortBy(tasks, 'ref')
|
$scope.tasks = _.sortBy(tasks, (x) => [x.us_order, x.ref])
|
||||||
return tasks
|
return tasks
|
||||||
|
|
||||||
_isVisible = ->
|
_isVisible = ->
|
||||||
|
|
|
@ -339,7 +339,6 @@ class TaskboardController extends mixOf(taiga.Controller, taiga.PageMixin, taiga
|
||||||
loadTasks: ->
|
loadTasks: ->
|
||||||
params = {
|
params = {
|
||||||
include_attachments: true,
|
include_attachments: true,
|
||||||
include_tasks: true
|
|
||||||
}
|
}
|
||||||
|
|
||||||
params = _.merge params, @location.search()
|
params = _.merge params, @location.search()
|
||||||
|
@ -401,7 +400,6 @@ class TaskboardController extends mixOf(taiga.Controller, taiga.PageMixin, taiga
|
||||||
params = {
|
params = {
|
||||||
status__is_archived: false,
|
status__is_archived: false,
|
||||||
include_attachments: true,
|
include_attachments: true,
|
||||||
include_tasks: true
|
|
||||||
}
|
}
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
|
|
|
@ -331,7 +331,7 @@ UsStatusButtonDirective = ($rootScope, $repo, $confirm, $loading, $modelTransfor
|
||||||
|
|
||||||
$el.html(html)
|
$el.html(html)
|
||||||
|
|
||||||
$compile($el.contents())($scope);
|
$compile($el.contents())($scope)
|
||||||
|
|
||||||
save = (status) =>
|
save = (status) =>
|
||||||
$el.find(".pop-status").popover().close()
|
$el.find(".pop-status").popover().close()
|
||||||
|
|
Loading…
Reference in New Issue