Loading config/autoload/unicaen-privilege.global.php +3 −2 Original line number Diff line number Diff line Loading @@ -19,8 +19,9 @@ $settings = [ 300 => 'UnicaenAuthentification\Provider\Identity\Basic', // en 1er 200 => 'UnicaenAuthentification\Provider\Identity\Db', // en 2e 100 => 'UnicaenAuthentification\Provider\Identity\Ldap', // en 3e @deprecated 010 => 'Application\Provider\IdentityProvider', // en 3e 000 => 'Structure\Provider\IdentityProvider', // en 3e 020 => 'Application\Provider\IdentityProvider', // en 3e 010 => 'Structure\Provider\IdentityProvider', // en 3e 001 => 'Formation\Provider\IdentityProvider', // en 3e ], ], 'navigation' => [ Loading module/Application/src/Application/Controller/IndexController.php +42 −31 Original line number Diff line number Diff line Loading @@ -2,11 +2,10 @@ namespace Application\Controller; use Application\Entity\Db\Agent; use Application\Entity\Db\AgentAutorite; use Application\Entity\Db\AgentSuperieur; use Application\Provider\Privilege\AgentPrivileges; use Application\Provider\Role\RoleProvider as AppRoleProvider; use Application\Entity\Db\Agent; use Application\Provider\Template\TexteTemplate; use Application\Service\Agent\AgentServiceAwareTrait; use Application\Service\AgentAutorite\AgentAutoriteServiceAwareTrait; Loading @@ -16,8 +15,10 @@ use EntretienProfessionnel\Entity\Db\Campagne; use EntretienProfessionnel\Service\Campagne\CampagneServiceAwareTrait; use EntretienProfessionnel\Service\EntretienProfessionnel\EntretienProfessionnelServiceAwareTrait; use Formation\Service\DemandeExterne\DemandeExterneServiceAwareTrait; use Formation\Service\FormationInstanceInscrit\FormationInstanceInscritServiceAwareTrait; use Formation\Service\Inscription\InscriptionServiceAwareTrait; use Laminas\Http\Response; use Laminas\Mvc\Controller\AbstractActionController; use Laminas\View\Model\ViewModel; use Structure\Controller\StructureController; use Structure\Entity\Db\StructureAgentForce; use Structure\Provider\Parametre\StructureParametres; Loading @@ -30,8 +31,6 @@ use UnicaenUtilisateur\Entity\Db\Role; use UnicaenUtilisateur\Entity\Db\User; use UnicaenUtilisateur\Service\Role\RoleServiceAwareTrait; use UnicaenUtilisateur\Service\User\UserServiceAwareTrait; use Laminas\Mvc\Controller\AbstractActionController; use Laminas\View\Model\ViewModel; class IndexController extends AbstractActionController { Loading @@ -48,7 +47,7 @@ class IndexController extends AbstractActionController use FichePosteServiceAwareTrait; use EntretienProfessionnelServiceAwareTrait; use FormationInstanceInscritServiceAwareTrait; use InscriptionServiceAwareTrait; use DemandeExterneServiceAwareTrait; public function indexAction(): ViewModel|Response Loading Loading @@ -118,16 +117,22 @@ class IndexController extends AbstractActionController $user = $this->getUserService()->getConnectedUser(); $agent = $this->getAgentService()->getAgentByUser($user); $agents = array_map(function (AgentSuperieur $a) { return $a->getAgent(); },$this->getAgentSuperieurService()->getAgentsSuperieursBySuperieur($agent)); $agents = array_map(function (AgentSuperieur $a) { return $a->getAgent(); }, $this->getAgentSuperieurService()->getAgentsSuperieursBySuperieur($agent)); $agents = $this->getAgentService()->filtrerWithStatutTemoin($agents, $this->getParametreService()->getParametreByCode(StructureParametres::TYPE, StructureParametres::AGENT_TEMOIN_STATUT)); $agents = $this->getAgentService()->filtrerWithAffectationTemoin($agents, $this->getParametreService()->getParametreByCode(StructureParametres::TYPE, StructureParametres::AGENT_TEMOIN_AFFECTATION)); usort($agents, function (Agent $a, Agent $b) { return $a->getNomUsuel()." ".$a->getPrenom() > $b->getNomUsuel()." ".$b->getPrenom();}); usort($agents, function (Agent $a, Agent $b) { return $a->getNomUsuel() . " " . $a->getPrenom() > $b->getNomUsuel() . " " . $b->getPrenom(); }); /** Campagne d'entretien professionnel ************************************************************************/ $last = $this->getCampagneService()->getLastCampagne(); $campagnes = $this->getCampagneService()->getCampagnesActives(); if ($last !== null) $campagnes[] = $last; usort($campagnes, function (Campagne $a, Campagne $b) { return $a->getDateDebut() > $b->getDateDebut();}); usort($campagnes, function (Campagne $a, Campagne $b) { return $a->getDateDebut() > $b->getDateDebut(); }); /** Récuperation des eps **************************************************************************************/ $entretiens = []; Loading @@ -137,10 +142,10 @@ class IndexController extends AbstractActionController /** Récupération des fiches de postes *************************************************************************/ $fichesDePoste = []; foreach ($agents as $agent) { if ($agent instanceof StructureAgentForce) $agent = $agent->getAgent(); $fiches = $this->getFichePosteService()->getFichesPostesByAgent($agent); $fichesDePoste[$agent->getId()] = $fiches; foreach ($agents as $agent_) { if ($agent_ instanceof StructureAgentForce) $agent_ = $agent_->getAgent(); $fiches = $this->getFichePosteService()->getFichesPostesByAgent($agent_); $fichesDePoste[$agent_->getId()] = $fiches; } $fichesDePostePdf = $this->getAgentService()->getFichesPostesPdfByAgents($agents); Loading @@ -161,17 +166,23 @@ class IndexController extends AbstractActionController $user = $this->getUserService()->getConnectedUser(); $agent = $this->getAgentService()->getAgentByUser($user); $agents = array_map(function (AgentAutorite $a) { return $a->getAgent(); },$this->getAgentAutoriteService()->getAgentsAutoritesByAutorite($agent)); $agents = array_map(function (AgentAutorite $a) { return $a->getAgent(); }, $this->getAgentAutoriteService()->getAgentsAutoritesByAutorite($agent)); $agents = $this->getAgentService()->filtrerWithStatutTemoin($agents, $this->getParametreService()->getParametreByCode(StructureParametres::TYPE, StructureParametres::AGENT_TEMOIN_STATUT)); $agents = $this->getAgentService()->filtrerWithAffectationTemoin($agents, $this->getParametreService()->getParametreByCode(StructureParametres::TYPE, StructureParametres::AGENT_TEMOIN_AFFECTATION)); usort($agents, function (Agent $a, Agent $b) { return $a->getNomUsuel()." ".$a->getPrenom() > $b->getNomUsuel()." ".$b->getPrenom();}); usort($agents, function (Agent $a, Agent $b) { return $a->getNomUsuel() . " " . $a->getPrenom() > $b->getNomUsuel() . " " . $b->getPrenom(); }); /** Campagne d'entretien professionnel ************************************************************************/ $last = $this->getCampagneService()->getLastCampagne(); $campagnes = $this->getCampagneService()->getCampagnesActives(); if ($last !== null) $campagnes[] = $last; usort($campagnes, function (Campagne $a, Campagne $b) { return $a->getDateDebut() > $b->getDateDebut();}); usort($campagnes, function (Campagne $a, Campagne $b) { return $a->getDateDebut() > $b->getDateDebut(); }); /** Récuperation des eps **************************************************************************************/ $entretiens = []; Loading @@ -181,10 +192,10 @@ class IndexController extends AbstractActionController /** Récupération des fiches de postes *************************************************************************/ $fichesDePoste = []; foreach ($agents as $agent) { if ($agent instanceof StructureAgentForce) $agent = $agent->getAgent(); $fiches = $this->getFichePosteService()->getFichesPostesByAgent($agent); $fichesDePoste[$agent->getId()] = $fiches; foreach ($agents as $agent_) { if ($agent_ instanceof StructureAgentForce) $agent_ = $agent_->getAgent(); $fiches = $this->getFichePosteService()->getFichesPostesByAgent($agent_); $fichesDePoste[$agent_->getId()] = $fiches; } $fichesDePostePdf = $this->getAgentService()->getFichesPostesPdfByAgents($agents); Loading module/Application/src/Application/Controller/IndexControllerFactory.php +3 −6 Original line number Diff line number Diff line Loading @@ -9,7 +9,6 @@ use Application\Service\FichePoste\FichePosteService; use EntretienProfessionnel\Service\Campagne\CampagneService; use EntretienProfessionnel\Service\EntretienProfessionnel\EntretienProfessionnelService; use Formation\Service\DemandeExterne\DemandeExterneService; use Formation\Service\FormationInstanceInscrit\FormationInstanceInscritService; use Interop\Container\ContainerInterface; use Psr\Container\ContainerExceptionInterface; use Psr\Container\NotFoundExceptionInterface; Loading @@ -20,7 +19,8 @@ use UnicaenRenderer\Service\Rendu\RenduService; use UnicaenUtilisateur\Service\Role\RoleService; use UnicaenUtilisateur\Service\User\UserService; class IndexControllerFactory { class IndexControllerFactory { /** * @param ContainerInterface $container Loading @@ -45,7 +45,6 @@ class IndexControllerFactory { * * @var FichePosteService $fichePosteService * @var EntretienProfessionnelService $entretienProfessionelService * @var FormationInstanceInscritService $formationInstanceinscritService * @var DemandeExterneService $demandeExterneService * */ Loading @@ -62,7 +61,6 @@ class IndexControllerFactory { $fichePosteService = $container->get(FichePosteService::class); $entretienProfessionelService = $container->get(EntretienProfessionnelService::class); $formationInstanceinscritService = $container->get(FormationInstanceInscritService::class); $demandeExterneService = $container->get(DemandeExterneService::class); /** @var IndexController $controller */ Loading @@ -81,7 +79,6 @@ class IndexControllerFactory { $controller->setFichePosteService($fichePosteService); $controller->setEntretienProfessionnelService($entretienProfessionelService); $controller->setFormationInstanceInscritService($formationInstanceinscritService); $controller->setDemandeExterneService($demandeExterneService); return $controller; } Loading module/Application/src/Application/Form/SelectionAgent/SelectionAgentFormAwareTrait.php +2 −11 Original line number Diff line number Diff line Loading @@ -4,25 +4,16 @@ namespace Application\Form\SelectionAgent; trait SelectionAgentFormAwareTrait { /** @var SelectionAgentForm $selectionAgentForm */ private $selectionAgentForm; private SelectionAgentForm $selectionAgentForm; /** * @return SelectionAgentForm */ public function getSelectionAgentForm() : SelectionAgentForm { return $this->selectionAgentForm; } /** * @param SelectionAgentForm $selectionAgentForm * @return SelectionAgentForm */ public function setSelectionAgentForm(SelectionAgentForm $selectionAgentForm) : SelectionAgentForm public function setSelectionAgentForm(SelectionAgentForm $selectionAgentForm) : void { $this->selectionAgentForm = $selectionAgentForm; return $this->selectionAgentForm; } } No newline at end of file module/Application/src/Application/Form/SelectionAgent/SelectionAgentFormFactory.php +8 −3 Original line number Diff line number Diff line Loading @@ -6,12 +6,17 @@ use Application\Controller\AgentController; use Interop\Container\ContainerInterface; use Laminas\View\Helper\Url; use Laminas\View\HelperPluginManager; use Psr\Container\ContainerExceptionInterface; use Psr\Container\NotFoundExceptionInterface; class SelectionAgentFormFactory { public function __invoke(ContainerInterface $container) { /** * @throws ContainerExceptionInterface * @throws NotFoundExceptionInterface */ public function __invoke(ContainerInterface $container): SelectionAgentForm { /** @var SelectionAgentHydrator $hydrator */ $hydrator = $container->get('HydratorManager')->get(SelectionAgentHydrator::class); Loading Loading
config/autoload/unicaen-privilege.global.php +3 −2 Original line number Diff line number Diff line Loading @@ -19,8 +19,9 @@ $settings = [ 300 => 'UnicaenAuthentification\Provider\Identity\Basic', // en 1er 200 => 'UnicaenAuthentification\Provider\Identity\Db', // en 2e 100 => 'UnicaenAuthentification\Provider\Identity\Ldap', // en 3e @deprecated 010 => 'Application\Provider\IdentityProvider', // en 3e 000 => 'Structure\Provider\IdentityProvider', // en 3e 020 => 'Application\Provider\IdentityProvider', // en 3e 010 => 'Structure\Provider\IdentityProvider', // en 3e 001 => 'Formation\Provider\IdentityProvider', // en 3e ], ], 'navigation' => [ Loading
module/Application/src/Application/Controller/IndexController.php +42 −31 Original line number Diff line number Diff line Loading @@ -2,11 +2,10 @@ namespace Application\Controller; use Application\Entity\Db\Agent; use Application\Entity\Db\AgentAutorite; use Application\Entity\Db\AgentSuperieur; use Application\Provider\Privilege\AgentPrivileges; use Application\Provider\Role\RoleProvider as AppRoleProvider; use Application\Entity\Db\Agent; use Application\Provider\Template\TexteTemplate; use Application\Service\Agent\AgentServiceAwareTrait; use Application\Service\AgentAutorite\AgentAutoriteServiceAwareTrait; Loading @@ -16,8 +15,10 @@ use EntretienProfessionnel\Entity\Db\Campagne; use EntretienProfessionnel\Service\Campagne\CampagneServiceAwareTrait; use EntretienProfessionnel\Service\EntretienProfessionnel\EntretienProfessionnelServiceAwareTrait; use Formation\Service\DemandeExterne\DemandeExterneServiceAwareTrait; use Formation\Service\FormationInstanceInscrit\FormationInstanceInscritServiceAwareTrait; use Formation\Service\Inscription\InscriptionServiceAwareTrait; use Laminas\Http\Response; use Laminas\Mvc\Controller\AbstractActionController; use Laminas\View\Model\ViewModel; use Structure\Controller\StructureController; use Structure\Entity\Db\StructureAgentForce; use Structure\Provider\Parametre\StructureParametres; Loading @@ -30,8 +31,6 @@ use UnicaenUtilisateur\Entity\Db\Role; use UnicaenUtilisateur\Entity\Db\User; use UnicaenUtilisateur\Service\Role\RoleServiceAwareTrait; use UnicaenUtilisateur\Service\User\UserServiceAwareTrait; use Laminas\Mvc\Controller\AbstractActionController; use Laminas\View\Model\ViewModel; class IndexController extends AbstractActionController { Loading @@ -48,7 +47,7 @@ class IndexController extends AbstractActionController use FichePosteServiceAwareTrait; use EntretienProfessionnelServiceAwareTrait; use FormationInstanceInscritServiceAwareTrait; use InscriptionServiceAwareTrait; use DemandeExterneServiceAwareTrait; public function indexAction(): ViewModel|Response Loading Loading @@ -118,16 +117,22 @@ class IndexController extends AbstractActionController $user = $this->getUserService()->getConnectedUser(); $agent = $this->getAgentService()->getAgentByUser($user); $agents = array_map(function (AgentSuperieur $a) { return $a->getAgent(); },$this->getAgentSuperieurService()->getAgentsSuperieursBySuperieur($agent)); $agents = array_map(function (AgentSuperieur $a) { return $a->getAgent(); }, $this->getAgentSuperieurService()->getAgentsSuperieursBySuperieur($agent)); $agents = $this->getAgentService()->filtrerWithStatutTemoin($agents, $this->getParametreService()->getParametreByCode(StructureParametres::TYPE, StructureParametres::AGENT_TEMOIN_STATUT)); $agents = $this->getAgentService()->filtrerWithAffectationTemoin($agents, $this->getParametreService()->getParametreByCode(StructureParametres::TYPE, StructureParametres::AGENT_TEMOIN_AFFECTATION)); usort($agents, function (Agent $a, Agent $b) { return $a->getNomUsuel()." ".$a->getPrenom() > $b->getNomUsuel()." ".$b->getPrenom();}); usort($agents, function (Agent $a, Agent $b) { return $a->getNomUsuel() . " " . $a->getPrenom() > $b->getNomUsuel() . " " . $b->getPrenom(); }); /** Campagne d'entretien professionnel ************************************************************************/ $last = $this->getCampagneService()->getLastCampagne(); $campagnes = $this->getCampagneService()->getCampagnesActives(); if ($last !== null) $campagnes[] = $last; usort($campagnes, function (Campagne $a, Campagne $b) { return $a->getDateDebut() > $b->getDateDebut();}); usort($campagnes, function (Campagne $a, Campagne $b) { return $a->getDateDebut() > $b->getDateDebut(); }); /** Récuperation des eps **************************************************************************************/ $entretiens = []; Loading @@ -137,10 +142,10 @@ class IndexController extends AbstractActionController /** Récupération des fiches de postes *************************************************************************/ $fichesDePoste = []; foreach ($agents as $agent) { if ($agent instanceof StructureAgentForce) $agent = $agent->getAgent(); $fiches = $this->getFichePosteService()->getFichesPostesByAgent($agent); $fichesDePoste[$agent->getId()] = $fiches; foreach ($agents as $agent_) { if ($agent_ instanceof StructureAgentForce) $agent_ = $agent_->getAgent(); $fiches = $this->getFichePosteService()->getFichesPostesByAgent($agent_); $fichesDePoste[$agent_->getId()] = $fiches; } $fichesDePostePdf = $this->getAgentService()->getFichesPostesPdfByAgents($agents); Loading @@ -161,17 +166,23 @@ class IndexController extends AbstractActionController $user = $this->getUserService()->getConnectedUser(); $agent = $this->getAgentService()->getAgentByUser($user); $agents = array_map(function (AgentAutorite $a) { return $a->getAgent(); },$this->getAgentAutoriteService()->getAgentsAutoritesByAutorite($agent)); $agents = array_map(function (AgentAutorite $a) { return $a->getAgent(); }, $this->getAgentAutoriteService()->getAgentsAutoritesByAutorite($agent)); $agents = $this->getAgentService()->filtrerWithStatutTemoin($agents, $this->getParametreService()->getParametreByCode(StructureParametres::TYPE, StructureParametres::AGENT_TEMOIN_STATUT)); $agents = $this->getAgentService()->filtrerWithAffectationTemoin($agents, $this->getParametreService()->getParametreByCode(StructureParametres::TYPE, StructureParametres::AGENT_TEMOIN_AFFECTATION)); usort($agents, function (Agent $a, Agent $b) { return $a->getNomUsuel()." ".$a->getPrenom() > $b->getNomUsuel()." ".$b->getPrenom();}); usort($agents, function (Agent $a, Agent $b) { return $a->getNomUsuel() . " " . $a->getPrenom() > $b->getNomUsuel() . " " . $b->getPrenom(); }); /** Campagne d'entretien professionnel ************************************************************************/ $last = $this->getCampagneService()->getLastCampagne(); $campagnes = $this->getCampagneService()->getCampagnesActives(); if ($last !== null) $campagnes[] = $last; usort($campagnes, function (Campagne $a, Campagne $b) { return $a->getDateDebut() > $b->getDateDebut();}); usort($campagnes, function (Campagne $a, Campagne $b) { return $a->getDateDebut() > $b->getDateDebut(); }); /** Récuperation des eps **************************************************************************************/ $entretiens = []; Loading @@ -181,10 +192,10 @@ class IndexController extends AbstractActionController /** Récupération des fiches de postes *************************************************************************/ $fichesDePoste = []; foreach ($agents as $agent) { if ($agent instanceof StructureAgentForce) $agent = $agent->getAgent(); $fiches = $this->getFichePosteService()->getFichesPostesByAgent($agent); $fichesDePoste[$agent->getId()] = $fiches; foreach ($agents as $agent_) { if ($agent_ instanceof StructureAgentForce) $agent_ = $agent_->getAgent(); $fiches = $this->getFichePosteService()->getFichesPostesByAgent($agent_); $fichesDePoste[$agent_->getId()] = $fiches; } $fichesDePostePdf = $this->getAgentService()->getFichesPostesPdfByAgents($agents); Loading
module/Application/src/Application/Controller/IndexControllerFactory.php +3 −6 Original line number Diff line number Diff line Loading @@ -9,7 +9,6 @@ use Application\Service\FichePoste\FichePosteService; use EntretienProfessionnel\Service\Campagne\CampagneService; use EntretienProfessionnel\Service\EntretienProfessionnel\EntretienProfessionnelService; use Formation\Service\DemandeExterne\DemandeExterneService; use Formation\Service\FormationInstanceInscrit\FormationInstanceInscritService; use Interop\Container\ContainerInterface; use Psr\Container\ContainerExceptionInterface; use Psr\Container\NotFoundExceptionInterface; Loading @@ -20,7 +19,8 @@ use UnicaenRenderer\Service\Rendu\RenduService; use UnicaenUtilisateur\Service\Role\RoleService; use UnicaenUtilisateur\Service\User\UserService; class IndexControllerFactory { class IndexControllerFactory { /** * @param ContainerInterface $container Loading @@ -45,7 +45,6 @@ class IndexControllerFactory { * * @var FichePosteService $fichePosteService * @var EntretienProfessionnelService $entretienProfessionelService * @var FormationInstanceInscritService $formationInstanceinscritService * @var DemandeExterneService $demandeExterneService * */ Loading @@ -62,7 +61,6 @@ class IndexControllerFactory { $fichePosteService = $container->get(FichePosteService::class); $entretienProfessionelService = $container->get(EntretienProfessionnelService::class); $formationInstanceinscritService = $container->get(FormationInstanceInscritService::class); $demandeExterneService = $container->get(DemandeExterneService::class); /** @var IndexController $controller */ Loading @@ -81,7 +79,6 @@ class IndexControllerFactory { $controller->setFichePosteService($fichePosteService); $controller->setEntretienProfessionnelService($entretienProfessionelService); $controller->setFormationInstanceInscritService($formationInstanceinscritService); $controller->setDemandeExterneService($demandeExterneService); return $controller; } Loading
module/Application/src/Application/Form/SelectionAgent/SelectionAgentFormAwareTrait.php +2 −11 Original line number Diff line number Diff line Loading @@ -4,25 +4,16 @@ namespace Application\Form\SelectionAgent; trait SelectionAgentFormAwareTrait { /** @var SelectionAgentForm $selectionAgentForm */ private $selectionAgentForm; private SelectionAgentForm $selectionAgentForm; /** * @return SelectionAgentForm */ public function getSelectionAgentForm() : SelectionAgentForm { return $this->selectionAgentForm; } /** * @param SelectionAgentForm $selectionAgentForm * @return SelectionAgentForm */ public function setSelectionAgentForm(SelectionAgentForm $selectionAgentForm) : SelectionAgentForm public function setSelectionAgentForm(SelectionAgentForm $selectionAgentForm) : void { $this->selectionAgentForm = $selectionAgentForm; return $this->selectionAgentForm; } } No newline at end of file
module/Application/src/Application/Form/SelectionAgent/SelectionAgentFormFactory.php +8 −3 Original line number Diff line number Diff line Loading @@ -6,12 +6,17 @@ use Application\Controller\AgentController; use Interop\Container\ContainerInterface; use Laminas\View\Helper\Url; use Laminas\View\HelperPluginManager; use Psr\Container\ContainerExceptionInterface; use Psr\Container\NotFoundExceptionInterface; class SelectionAgentFormFactory { public function __invoke(ContainerInterface $container) { /** * @throws ContainerExceptionInterface * @throws NotFoundExceptionInterface */ public function __invoke(ContainerInterface $container): SelectionAgentForm { /** @var SelectionAgentHydrator $hydrator */ $hydrator = $container->get('HydratorManager')->get(SelectionAgentHydrator::class); Loading