save default search options (#2445)

* set default times for daterange objects
* allow to show order and order by fields
* move search to modal
* more options for page size
* save export visibility in cookie
This commit is contained in:
Kevin Papst
2021-03-20 01:10:45 +01:00
committed by GitHub
parent 954ba7c937
commit 87d07ffaaf
83 changed files with 903 additions and 410 deletions

View File

@@ -22,7 +22,6 @@ use App\Repository\Query\UserFormTypeQuery;
use App\Repository\Query\UserQuery;
use App\Repository\TimesheetRepository;
use App\Repository\UserRepository;
use Pagerfanta\Pagerfanta;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\Form\FormInterface;
@@ -78,14 +77,10 @@ final class UserController extends AbstractController
$query->setPage($page);
$form = $this->getToolbarForm($query);
$form->setData($query);
$form->submit($request->query->all(), false);
if (!$form->isValid()) {
$query->resetByFormError($form->getErrors());
if ($this->handleSearch($form, $request)) {
return $this->redirectToRoute('admin_user');
}
/* @var $entries Pagerfanta */
$entries = $this->getRepository()->getPagerfantaForQuery($query);
$event = new UserPreferenceDisplayEvent(UserPreferenceDisplayEvent::USERS);