From 7da4c943b86fcd56bc7f5940ce0753539d3432df Mon Sep 17 00:00:00 2001 From: CoRex Date: Sat, 2 Dec 2017 00:56:45 +0100 Subject: Added 'pagination:dashboard:task:query' to DashboardPagination. --- app/Pagination/DashboardPagination.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'app/Pagination/DashboardPagination.php') diff --git a/app/Pagination/DashboardPagination.php b/app/Pagination/DashboardPagination.php index b8fc4434..0149a42b 100644 --- a/app/Pagination/DashboardPagination.php +++ b/app/Pagination/DashboardPagination.php @@ -27,13 +27,17 @@ class DashboardPagination extends Base $projects = $this->projectUserRoleModel->getActiveProjectsByUser($userId); foreach ($projects as $projectId => $projectName) { + + $query = $this->taskFinderModel->getUserQuery($userId)->eq(ProjectModel::TABLE.'.id', $projectId); + $this->hook->reference('pagination:dashboard:task:query', $query); + $paginator = $this->paginator ->setUrl('DashboardController', 'show', array('user_id' => $userId)) ->setMax(50) ->setOrder(TaskModel::TABLE.'.priority') ->setDirection('DESC') ->setFormatter($this->taskListSubtaskAssigneeFormatter->withUserId($userId)) - ->setQuery($this->taskFinderModel->getUserQuery($userId)->eq(ProjectModel::TABLE.'.id', $projectId)) + ->setQuery($query) ->calculate(); if ($paginator->getTotal() > 0) { -- cgit v1.2.3