feat: add filtering of applications
This commit is contained in:
1 parent
2c189de0c7
commit
3e2c5976aa
8 files changed
+514
-7
No files matched your search
@@ -3,6 +3,7 @@
|
||||
namespace App\Controller\Admin\Application;
|
||||
|
||||
use App\Repository\ApplicationRepository;
|
||||
use App\Service\Common\ApplicationFilterHandler;
|
||||
use Knp\Component\Pager\PaginatorInterface;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
@@ -14,7 +15,8 @@ class IndexController extends AbstractController
|
||||
{
|
||||
public function __construct(
|
||||
private readonly ApplicationRepository $applicationRepository,
|
||||
private readonly PaginatorInterface $paginator
|
||||
private readonly PaginatorInterface $paginator,
|
||||
private readonly ApplicationFilterHandler $filterHandler,
|
||||
) {
|
||||
}
|
||||
|
||||
@@ -22,9 +24,11 @@ class IndexController extends AbstractController
|
||||
#[IsGranted('ROLE_ADMINISTRATIVE')]
|
||||
public function index(Request $request): Response
|
||||
{
|
||||
$filterDto = $this->filterHandler->getFilterSettings();
|
||||
|
||||
$query = $this
|
||||
->applicationRepository
|
||||
->getPendingQuery()
|
||||
->getPendingQuery($filterDto);
|
||||
;
|
||||
|
||||
$pagination = $this->paginator->paginate(
|
||||
@@ -39,6 +43,7 @@ class IndexController extends AbstractController
|
||||
|
||||
return $this->render('admin/application/index.html.twig', [
|
||||
'pagination' => $pagination,
|
||||
'filterDto' => $filterDto,
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user