diff --git a/src/Controller/Administrative/Document/IndexController.php b/src/Controller/Administrative/Document/IndexController.php index 86890b4..9f5c400 100644 --- a/src/Controller/Administrative/Document/IndexController.php +++ b/src/Controller/Administrative/Document/IndexController.php @@ -3,7 +3,6 @@ namespace App\Controller\Administrative\Document; use App\Entity\Upload; -use App\Model\DocumentFilterDto; use App\Repository\UploadRepository; use App\Service\Common\DocumentFilterHandler; use Knp\Component\Pager\PaginatorInterface; @@ -72,4 +71,4 @@ class IndexController extends AbstractController 'status' => $status, ]); } -} \ No newline at end of file +} diff --git a/src/Repository/ApplicationRepository.php b/src/Repository/ApplicationRepository.php index 4700089..a981e8a 100644 --- a/src/Repository/ApplicationRepository.php +++ b/src/Repository/ApplicationRepository.php @@ -31,11 +31,12 @@ class ApplicationRepository extends ServiceEntityRepository $qb = $this->createQueryBuilder('application'); $qb - ->select('application', 'assignment', 'destination', 'job_profile', 'teamer') + ->select('application', 'assignment', 'job_profile', 'destination', 'teamer', 'user') ->innerJoin('application.assignment', 'assignment') ->innerJoin('assignment.destination', 'destination') ->innerJoin('assignment.jobProfile', 'job_profile') ->innerJoin('application.teamer', 'teamer') + ->innerJoin('teamer.user', 'user') ->where($qb->expr()->neq('application.status', ':status')) ->setParameter('status', Application::STATUS_REJECTED) ; @@ -159,11 +160,12 @@ class ApplicationRepository extends ServiceEntityRepository $qb = $this->createQueryBuilder('application'); return $qb - ->select('application', 'assignment', 'destination', 'job_profile', 'teamer') + ->select('application', 'assignment', 'destination', 'job_profile', 'teamer', 'user') ->innerJoin('application.assignment', 'assignment') ->innerJoin('assignment.destination', 'destination') ->innerJoin('assignment.jobProfile', 'job_profile') ->innerJoin('application.teamer', 'teamer') + ->innerJoin('teamer.user', 'user') ->where($qb->expr()->neq('application.status', ':status')) ->orderBy('application.createdAt', 'DESC') ->setParameter('status', Application::STATUS_REJECTED) diff --git a/src/Repository/DispositionRepository.php b/src/Repository/DispositionRepository.php index a02216e..d16273d 100644 --- a/src/Repository/DispositionRepository.php +++ b/src/Repository/DispositionRepository.php @@ -155,8 +155,9 @@ class DispositionRepository extends ServiceEntityRepository $qb = $this->createQueryBuilder('disposition'); return $qb - ->select('disposition', 'assignment', 'destination') + ->select('disposition', 'assignment', 'job_profile', 'destination') ->innerJoin('disposition.assignment', 'assignment') + ->innerJoin('assignment.jobProfile', 'job_profile') ->innerJoin('assignment.destination', 'destination') ->where($qb->expr()->andX( $qb->expr()->orX( @@ -182,9 +183,11 @@ class DispositionRepository extends ServiceEntityRepository $qb = $this->createQueryBuilder('disposition'); $qb - ->select('disposition', 'assignment', 'destination', 'feedback', 'teamer') + ->select('disposition', 'assignment', 'job_profile', 'destination', 'feedback', 'teamer', 'user') ->innerJoin('disposition.assignment', 'assignment') + ->innerJoin('assignment.jobProfile', 'job_profile') ->innerJoin('disposition.teamer', 'teamer') + ->innerJoin('teamer.user', 'user') ->innerJoin('assignment.destination', 'destination') ->leftJoin('disposition.feedback', 'feedback') ->where($qb->expr()->andX( @@ -292,10 +295,13 @@ class DispositionRepository extends ServiceEntityRepository $qb = $this->createQueryBuilder('disposition'); return $qb - ->select('disposition', 'assignment', 'destination', 'document') + ->select('disposition', 'assignment', 'job_profile', 'destination', 'document', 'teamer', 'user') ->innerJoin('disposition.assignment', 'assignment') + ->innerJoin('assignment.jobProfile', 'job_profile') ->innerJoin('assignment.destination', 'destination') ->leftJoin('disposition.documents', 'document') + ->innerJoin('disposition.teamer', 'teamer') + ->innerJoin('teamer.user', 'user') ->where($qb->expr()->andX( $qb->expr()->lte('disposition.createdAt', ':dueDate'), $qb->expr()->eq('disposition.status', ':status'), diff --git a/src/Repository/FeedbackRepository.php b/src/Repository/FeedbackRepository.php index ab2769a..b791fec 100644 --- a/src/Repository/FeedbackRepository.php +++ b/src/Repository/FeedbackRepository.php @@ -32,8 +32,9 @@ class FeedbackRepository extends ServiceEntityRepository $qb = $this->createQueryBuilder('feedback'); $qb - ->select('feedback', 'teamer') + ->select('feedback', 'teamer', 'user') ->innerJoin('feedback.teamer', 'teamer') + ->innerJoin('teamer.user', 'user') ; if (null !== $name = $filterDto->getName()) { @@ -73,8 +74,9 @@ class FeedbackRepository extends ServiceEntityRepository $qb = $this->createQueryBuilder('feedback'); return $qb - ->select('feedback', 'teamer') + ->select('feedback', 'teamer', 'user') ->innerJoin('feedback.teamer', 'teamer') + ->innerJoin('teamer.user', 'user') ->where($qb->expr()->eq('feedback.status', ':status')) ->setParameter('status', Feedback::STATUS_NEW) ->orderBy('feedback.createdAt', 'DESC') diff --git a/src/Repository/UploadRepository.php b/src/Repository/UploadRepository.php index aa4a62f..10148d0 100644 --- a/src/Repository/UploadRepository.php +++ b/src/Repository/UploadRepository.php @@ -87,12 +87,13 @@ class UploadRepository extends ServiceEntityRepository $qb = $this->createQueryBuilder('upload'); return $qb - ->select('upload', 'disposition', 'assignment', 'job_profile', 'destination', 'teamer') + ->select('upload', 'disposition', 'assignment', 'job_profile', 'destination', 'teamer', 'user') ->innerJoin('upload.disposition', 'disposition') ->innerJoin('disposition.assignment', 'assignment') ->innerJoin('assignment.jobProfile', 'job_profile') ->innerJoin('assignment.destination', 'destination') ->innerJoin('disposition.teamer', 'teamer') + ->innerJoin('teamer.user', 'user') ->where($qb->expr()->andX( $qb->expr()->eq('upload.type', ':type'), $qb->expr()->eq('upload.status', ':status'), @@ -120,12 +121,13 @@ class UploadRepository extends ServiceEntityRepository $qb = $this->createQueryBuilder('upload'); $qb - ->select('upload', 'disposition', 'assignment', 'job_profile', 'destination', 'teamer') + ->select('upload', 'disposition', 'assignment', 'job_profile', 'destination', 'teamer', 'user') ->innerJoin('upload.disposition', 'disposition') ->innerJoin('disposition.assignment', 'assignment') ->innerJoin('assignment.jobProfile', 'job_profile') ->innerJoin('assignment.destination', 'destination') ->innerJoin('disposition.teamer', 'teamer') + ->innerJoin('teamer.user', 'user') ->addOrderBy('FIELD(upload.status, :checked, :new)', 'DESC') ->setParameter('new', Upload::STATUS_NEW) ->setParameter('checked', Upload::STATUS_CHECKED) @@ -188,9 +190,10 @@ class UploadRepository extends ServiceEntityRepository $qb = $this->createQueryBuilder('upload'); return $qb - ->select('upload', 'owner', 'teamer', 'disposition', 'assignment') + ->select('upload', 'owner', 'teamer', 'user', 'disposition', 'assignment') ->innerJoin('upload.owner', 'owner') ->innerJoin('owner.teamer', 'teamer') + ->innerJoin('teamer.user', 'user') ->leftJoin('upload.disposition', 'disposition') ->leftJoin('disposition.assignment', 'assignment') ->where($qb->expr()->andX( diff --git a/templates/admin/index.html.twig b/templates/admin/index.html.twig index 7163d5e..299896a 100644 --- a/templates/admin/index.html.twig +++ b/templates/admin/index.html.twig @@ -2,6 +2,7 @@ {% block content %}