feat: global documents for teamers
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace App\Controller\Teamer;
|
||||
|
||||
use App\Repository\UploadRepository;
|
||||
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 DocumentController extends AbstractController
|
||||
{
|
||||
public function __construct(private readonly UploadRepository $uploadRepository)
|
||||
{
|
||||
}
|
||||
|
||||
#[Route('/teamer/document', name: 'app_teamer_document')]
|
||||
#[IsGranted('ROLE_USER')]
|
||||
public function index(): Response
|
||||
{
|
||||
$documents = $this->uploadRepository->getGlobal();
|
||||
|
||||
return $this->render('teamer/document/index.html.twig', [
|
||||
'documents' => $documents,
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -76,6 +76,11 @@ class TeamerMenuBuilder extends AbstractMenuBuilder
|
||||
],
|
||||
],
|
||||
],
|
||||
[
|
||||
'route' => 'app_teamer_document',
|
||||
'title' => 'Dokumente',
|
||||
'icon' => 'document',
|
||||
],
|
||||
[
|
||||
'route' => false,
|
||||
'title' => 'FAQ & Kontakt',
|
||||
|
||||
@@ -29,9 +29,8 @@ class DispositionRepository extends ServiceEntityRepository
|
||||
$qb = $this->createQueryBuilder('disposition');
|
||||
|
||||
return $qb
|
||||
->select('disposition', 'assignment', 'job_profile', 'destination', 'documents')
|
||||
->select('disposition', 'assignment', 'job_profile', 'destination')
|
||||
->innerJoin('disposition.assignment', 'assignment')
|
||||
->leftJoin('assignment.documents', 'documents')
|
||||
->innerJoin('assignment.jobProfile', 'job_profile')
|
||||
->innerJoin('assignment.destination', 'destination')
|
||||
->where($qb->expr()->andX(
|
||||
|
||||
Reference in New Issue
Block a user