wip: functionality for new role 'management'
This commit is contained in:
@@ -32,7 +32,7 @@ class DeleteController extends AbstractController
|
||||
'teamer' => (string) $application->getTeamer(),
|
||||
]);
|
||||
|
||||
return $this->redirectToRoute('app_admin_assignment_detail', [
|
||||
return $this->redirectToRoute('app_administrative_assignment_detail', [
|
||||
'uuid' => $application->getAssignment()->getUuid(),
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ class DisposeController extends AbstractController
|
||||
'teamer' => (string) $application->getTeamer(),
|
||||
]);
|
||||
|
||||
$redirectUrl = $this->generateUrl('app_admin_assignment_detail', [
|
||||
$redirectUrl = $this->generateUrl('app_administrative_assignment_detail', [
|
||||
'uuid' => $application->getAssignment()->getUuid(),
|
||||
]);
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ class StatusController extends AbstractController
|
||||
'teamer' => (string) $application->getTeamer(),
|
||||
]);
|
||||
|
||||
return new HxRedirectResponse($this->generateUrl('app_admin_assignment_detail', [
|
||||
return new HxRedirectResponse($this->generateUrl('app_administrative_assignment_detail', [
|
||||
'uuid' => $application->getAssignment()->getUuid(),
|
||||
]));
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ class DeleteController extends AbstractController
|
||||
$this->entityManager->remove($disposition);
|
||||
$this->entityManager->flush();
|
||||
|
||||
return new HxRedirectResponse($this->generateUrl('app_admin_assignment_detail', [
|
||||
return new HxRedirectResponse($this->generateUrl('app_administrative_assignment_detail', [
|
||||
'uuid' => $disposition->getAssignment()->getUuid(),
|
||||
]));
|
||||
}
|
||||
|
||||
+4
-4
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace App\Controller\Admin\Teamer;
|
||||
namespace App\Controller\Administrative\Teamer;
|
||||
|
||||
use App\Entity\Teamer;
|
||||
use App\Repository\DispositionRepository;
|
||||
@@ -14,13 +14,13 @@ class InfoController extends AbstractController
|
||||
public function __construct(private readonly DispositionRepository $dispositionRepository)
|
||||
{}
|
||||
|
||||
#[Route('/admin/teamer/info/{uuid}', name: 'app_admin_teamer_info')]
|
||||
#[IsGranted('ROLE_ADMIN')]
|
||||
#[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('admin/teamer/modal_info.html.twig', [
|
||||
return $this->render('administrative/teamer/modal_info.html.twig', [
|
||||
'teamer' => $teamer,
|
||||
'recentDispositions' => $recentDispositions,
|
||||
]);
|
||||
@@ -44,10 +44,10 @@ class AssignmentType extends AbstractType
|
||||
'label' => 'zu vergeben',
|
||||
'required' => false,
|
||||
])
|
||||
->add('showAvailableDispositions', CheckboxType::class, [
|
||||
'label' => 'Anzahl anzeigen',
|
||||
'required' => false,
|
||||
])
|
||||
// ->add('showAvailableDispositions', CheckboxType::class, [
|
||||
// 'label' => 'Anzahl anzeigen',
|
||||
// 'required' => false,
|
||||
// ])
|
||||
->add('destination', AutocompleteEntityType::class, [
|
||||
'label' => 'Destination',
|
||||
'class' => Destination::class,
|
||||
|
||||
@@ -33,12 +33,13 @@ class AssignmentRepository extends ServiceEntityRepository
|
||||
$qb = $this->createQueryBuilder('assignment');
|
||||
|
||||
$qb
|
||||
->select('assignment', 'destination', 'job_profile', 'application', 'disposition')
|
||||
->select('assignment', 'destination', 'job_profile', 'application', 'disposition', 'teamer')
|
||||
->innerJoin('assignment.destination', 'destination')
|
||||
->innerJoin('assignment.jobProfile', 'job_profile')
|
||||
->where($qb->expr()->isNull('assignment.deletedAt'))
|
||||
->leftJoin('assignment.applications', 'application')
|
||||
->leftJoin('assignment.dispositions', 'disposition')
|
||||
->leftJoin('disposition.teamer', 'teamer')
|
||||
;
|
||||
|
||||
$this->applyFilterSettings($filterDto, $qb);
|
||||
|
||||
Reference in New Issue
Block a user