Loading module/Application/src/Application/Controller/IndexController.php −1 Changes for module/Application/src/Application/Controller/IndexController.php: 0 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -2,7 +2,6 @@ namespace Application\Controller; use Application\Provider\Role\RoleProvider as AppRoleProvider; use Application\Entity\Db\Agent; use Application\Service\Agent\AgentServiceAwareTrait; Loading module/Application/src/Application/Entity/Db/Agent.php +5 −2 Changes for module/Application/src/Application/Entity/Db/Agent.php: 5 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -356,10 +356,13 @@ class Agent implements /** * @return AgentStatut[] */ public function getStatuts() : array public function getStatuts(?DateTime $date = null) : array { $statuts = $this->statuts->toArray(); $statuts = array_filter($statuts, function (AgentStatut $as) { return !$as->isDeleted();}); $statuts = array_filter($statuts, function (AgentStatut $as) { return (!$as->isDeleted());}); if ($date) { $statuts = array_filter($statuts, function (AgentStatut $as) use ($date) { return ($as->estEnCours($date));}); } usort($statuts, function (AgentStatut $a, AgentStatut $b) { return $a->getDateDebut() < $b->getDateDebut(); }); Loading module/Application/src/Application/Service/Agent/AgentService.php +3 Changes for module/Application/src/Application/Service/Agent/AgentService.php: 3 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -87,6 +87,9 @@ class AgentService { { $qb = $this->getEntityManager()->getRepository(Agent::class)->createQueryBuilder('agent') ->addSelect('utilisateur')->leftjoin('agent.utilisateur', 'utilisateur') ->addSelect('statut')->leftjoin('agent.statuts', 'statut') // ->addSelect('affectation')->leftjoin('agent.affectations', 'affectation') ->andWhere('agent.deleted_on IS NULL') ->orderBy('agent.nomUsuel, agent.prenom'); $result = $qb->getQuery()->getResult(); return $result; Loading module/EntretienProfessionnel/config/merged/campagne.config.php +12 Changes for module/EntretienProfessionnel/config/merged/campagne.config.php: 12 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ return [ 'controller' => CampagneController::class, 'action' => [ 'index', 'afficher', ], 'privileges' => [ CampagnePrivileges::CAMPAGNE_AFFICHER, Loading Loading @@ -95,6 +96,17 @@ return [ ], ], ], 'afficher' => [ 'type' => Segment::class, 'may_terminate' => true, 'options' => [ 'route' => '/afficher/:campagne', 'defaults' => [ 'controller' => CampagneController::class, 'action' => 'afficher', ], ], ], 'modifier' => [ 'type' => Segment::class, 'may_terminate' => true, Loading module/EntretienProfessionnel/src/EntretienProfessionnel/Controller/CampagneController.php +14 Changes for module/EntretienProfessionnel/src/EntretienProfessionnel/Controller/CampagneController.php: 14 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -31,6 +31,20 @@ class CampagneController extends AbstractActionController { ]); } public function afficherAction() : ViewModel { $campagne = $this->getCampagneService()->getRequestedCampagne($this); return new ViewModel([ 'campagne' => $campagne, 'entretiens' => $this->getCampagneService()->getEntretiensProfessionnels($campagne), 'agents' => $this->getCampagneService()->getAgentsEligibles($campagne), 'entretiensResponsable' => $this->getCampagneService()->getEntretiensEnAttenteResponsable($campagne), 'entretiensAutorite' => $this->getCampagneService()->getEntretiensEnAttenteAutorite($campagne), 'entretiensAgent' => $this->getCampagneService()->getEntretiensEnAttenteAgent($campagne), ]); } public function ajouterAction() : ViewModel { $campagne = new Campagne(); Loading Loading
module/Application/src/Application/Controller/IndexController.php −1 Changes for module/Application/src/Application/Controller/IndexController.php: 0 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -2,7 +2,6 @@ namespace Application\Controller; use Application\Provider\Role\RoleProvider as AppRoleProvider; use Application\Entity\Db\Agent; use Application\Service\Agent\AgentServiceAwareTrait; Loading
module/Application/src/Application/Entity/Db/Agent.php +5 −2 Changes for module/Application/src/Application/Entity/Db/Agent.php: 5 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -356,10 +356,13 @@ class Agent implements /** * @return AgentStatut[] */ public function getStatuts() : array public function getStatuts(?DateTime $date = null) : array { $statuts = $this->statuts->toArray(); $statuts = array_filter($statuts, function (AgentStatut $as) { return !$as->isDeleted();}); $statuts = array_filter($statuts, function (AgentStatut $as) { return (!$as->isDeleted());}); if ($date) { $statuts = array_filter($statuts, function (AgentStatut $as) use ($date) { return ($as->estEnCours($date));}); } usort($statuts, function (AgentStatut $a, AgentStatut $b) { return $a->getDateDebut() < $b->getDateDebut(); }); Loading
module/Application/src/Application/Service/Agent/AgentService.php +3 Changes for module/Application/src/Application/Service/Agent/AgentService.php: 3 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -87,6 +87,9 @@ class AgentService { { $qb = $this->getEntityManager()->getRepository(Agent::class)->createQueryBuilder('agent') ->addSelect('utilisateur')->leftjoin('agent.utilisateur', 'utilisateur') ->addSelect('statut')->leftjoin('agent.statuts', 'statut') // ->addSelect('affectation')->leftjoin('agent.affectations', 'affectation') ->andWhere('agent.deleted_on IS NULL') ->orderBy('agent.nomUsuel, agent.prenom'); $result = $qb->getQuery()->getResult(); return $result; Loading
module/EntretienProfessionnel/config/merged/campagne.config.php +12 Changes for module/EntretienProfessionnel/config/merged/campagne.config.php: 12 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ return [ 'controller' => CampagneController::class, 'action' => [ 'index', 'afficher', ], 'privileges' => [ CampagnePrivileges::CAMPAGNE_AFFICHER, Loading Loading @@ -95,6 +96,17 @@ return [ ], ], ], 'afficher' => [ 'type' => Segment::class, 'may_terminate' => true, 'options' => [ 'route' => '/afficher/:campagne', 'defaults' => [ 'controller' => CampagneController::class, 'action' => 'afficher', ], ], ], 'modifier' => [ 'type' => Segment::class, 'may_terminate' => true, Loading
module/EntretienProfessionnel/src/EntretienProfessionnel/Controller/CampagneController.php +14 Changes for module/EntretienProfessionnel/src/EntretienProfessionnel/Controller/CampagneController.php: 14 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -31,6 +31,20 @@ class CampagneController extends AbstractActionController { ]); } public function afficherAction() : ViewModel { $campagne = $this->getCampagneService()->getRequestedCampagne($this); return new ViewModel([ 'campagne' => $campagne, 'entretiens' => $this->getCampagneService()->getEntretiensProfessionnels($campagne), 'agents' => $this->getCampagneService()->getAgentsEligibles($campagne), 'entretiensResponsable' => $this->getCampagneService()->getEntretiensEnAttenteResponsable($campagne), 'entretiensAutorite' => $this->getCampagneService()->getEntretiensEnAttenteAutorite($campagne), 'entretiensAgent' => $this->getCampagneService()->getEntretiensEnAttenteAgent($campagne), ]); } public function ajouterAction() : ViewModel { $campagne = new Campagne(); Loading