Feat: Add teamer filter
This commit is contained in:
1 parent
51b2c9bb11
commit
eb53e2a843
11 files changed
+475
-43
No files matched your search
@@ -3,6 +3,7 @@
|
||||
namespace App\Controller\Admin\Teamer;
|
||||
|
||||
use App\Repository\TeamerRepository;
|
||||
use App\Service\Common\TeamerFilterHandler;
|
||||
use Knp\Component\Pager\PaginatorInterface;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
@@ -13,6 +14,7 @@ use Symfony\Component\Security\Http\Attribute\IsGranted;
|
||||
class IndexController extends AbstractController
|
||||
{
|
||||
public function __construct(
|
||||
protected readonly TeamerFilterHandler $filterHandler,
|
||||
private readonly TeamerRepository $teamerRepository,
|
||||
private readonly PaginatorInterface $paginator
|
||||
) {
|
||||
@@ -22,9 +24,11 @@ class IndexController extends AbstractController
|
||||
#[IsGranted('ROLE_ADMINISTRATIVE')]
|
||||
public function index(Request $request): Response
|
||||
{
|
||||
$filterDto = $this->filterHandler->getFilterSettings();
|
||||
|
||||
$query = $this
|
||||
->teamerRepository
|
||||
->getListQuery()
|
||||
->getListQuery($filterDto)
|
||||
;
|
||||
|
||||
$pagination = $this->paginator->paginate(
|
||||
@@ -39,6 +43,7 @@ class IndexController extends AbstractController
|
||||
|
||||
return $this->render('admin/teamer/index.html.twig', [
|
||||
'pagination' => $pagination,
|
||||
'filterDto' => $filterDto,
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user