WIP: And goes on

This commit is contained in:
Björn Fromme
2023-10-05 17:17:40 +02:00
parent 1097b84447
commit bea5edd615
7 changed files with 72 additions and 32 deletions
@@ -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,
]);
}
}