mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-30 11:33:49 +00:00
FEATURE [user filter] implement query. Selecting multiple users doesn't work
This commit is contained in:
@@ -300,13 +300,16 @@ final class SingleTaskController extends AbstractController
|
||||
|
||||
$filterOrder = $this->buildFilterOrder();
|
||||
|
||||
$filteredUsers = $filterOrder->getUserPickerData('userPicker');
|
||||
|
||||
$flags = array_merge(
|
||||
$filterOrder->getCheckboxData('status'),
|
||||
array_map(static fn ($i) => 'state_' . $i, $filterOrder->getCheckboxData('states'))
|
||||
);
|
||||
$nb = $this->singleTaskAclAwareRepository->countByAllViewable(
|
||||
$filterOrder->getQueryString(),
|
||||
$flags
|
||||
$flags,
|
||||
$filteredUsers
|
||||
);
|
||||
$paginator = $this->paginatorFactory->create($nb);
|
||||
|
||||
@@ -314,6 +317,7 @@ final class SingleTaskController extends AbstractController
|
||||
$tasks = $this->singleTaskAclAwareRepository->findByAllViewable(
|
||||
$filterOrder->getQueryString(),
|
||||
$flags,
|
||||
$filteredUsers,
|
||||
$paginator->getCurrentPageFirstItemNumber(),
|
||||
$paginator->getItemsPerPage(),
|
||||
[
|
||||
@@ -681,7 +685,7 @@ final class SingleTaskController extends AbstractController
|
||||
->addSearchBox()
|
||||
->addCheckbox('status', $statuses, $statuses, $statusTrans)
|
||||
->addCheckbox('states', $states, ['new', 'in_progress'])
|
||||
->addUserPickers('userPicker', 'userPicker', ['multiple' => True])
|
||||
->addUserPicker('userPicker', 'Filter by user', ['multiple' => True, 'required' => False])
|
||||
->build();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user