wip: functionality for new role 'management'

This commit is contained in:
Björn Fromme
2024-02-14 16:41:36 +01:00
parent f32cfcd9f2
commit 2c02415056
14 changed files with 90 additions and 54 deletions
@@ -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,
]);
}
}