wip: functionality for new role 'management'
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace App\Controller\Administrative\Teamer;
|
||||
|
||||
use App\Entity\Teamer;
|
||||
use App\Repository\DispositionRepository;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\Routing\Attribute\Route;
|
||||
use Symfony\Component\Security\Http\Attribute\IsGranted;
|
||||
|
||||
class InfoController extends AbstractController
|
||||
{
|
||||
public function __construct(private readonly DispositionRepository $dispositionRepository)
|
||||
{}
|
||||
|
||||
#[Route('/administrative/teamer/info/{uuid}', name: 'app_administrative_teamer_info')]
|
||||
#[IsGranted('ROLE_ADMINISTRATIVE')]
|
||||
public function index(Teamer $teamer): Response
|
||||
{
|
||||
$recentDispositions = $this->dispositionRepository->findRecentDispositionsByTeamer($teamer);
|
||||
|
||||
return $this->render('administrative/teamer/modal_info.html.twig', [
|
||||
'teamer' => $teamer,
|
||||
'recentDispositions' => $recentDispositions,
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user