store search in session (#2735)

* allow to detect used query filters
* allow to set label in action buttons
* allow to reset last search from session
* migrate invoice archive to new search system
* display number of used search filters
This commit is contained in:
Kevin Papst
2021-08-26 01:37:40 +02:00
committed by GitHub
parent 56524a9773
commit 98a3fc99a2
55 changed files with 365 additions and 81 deletions

View File

@@ -10,6 +10,7 @@
namespace App\EventSubscriber\Actions;
use App\Event\PageActionsEvent;
use App\Repository\Query\UserQuery;
class UsersSubscriber extends AbstractActionsSubscriber
{
@@ -20,10 +21,17 @@ class UsersSubscriber extends AbstractActionsSubscriber
public function onActions(PageActionsEvent $event): void
{
$event->addSearchToggle();
$payload = $event->getPayload();
/** @var UserQuery $query */
$query = $payload['query'];
$event->addSearchToggle($query);
if ($event->isIndexView()) {
$event->addColumnToggle('#modal_user_admin');
}
$event->addQuickExport($this->path('user_export'));
if ($this->isGranted('create_user')) {