WIP: And goes on
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace App\Controller\Admin\Assignment;
|
||||
|
||||
use App\Entity\Assignment;
|
||||
use App\Repository\ApplicationRepository;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\Routing\Annotation\Route;
|
||||
use Symfony\Component\Security\Http\Attribute\IsGranted;
|
||||
|
||||
class DetailController extends AbstractController
|
||||
{
|
||||
public function __construct(private readonly ApplicationRepository $applicationRepository)
|
||||
{}
|
||||
|
||||
#[Route('/admin/assignment/detail/{uuid}', name: 'app_admin_assignment_detail')]
|
||||
#[IsGranted('ROLE_ADMINISTRATIVE')]
|
||||
public function index(Assignment $assignment): Response
|
||||
{
|
||||
$applications = $this->applicationRepository->findBy(['assignment' => $assignment]);
|
||||
|
||||
return $this->render('admin/assignment/detail.html.twig', [
|
||||
'assignment' => $assignment,
|
||||
'applications' => $applications,
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user