Loading config/autoload/unicaen-app.global.php +2 −2 Original line number Diff line number Diff line Loading @@ -34,8 +34,8 @@ return [ 'app_infos' => [ 'nom' => "EMC2", 'desc' => "Emploi Mobilité Carrière Compétences", 'version' => "3.1.1", 'date' => "08/12/2022", 'version' => "3.1.2", 'date' => "16/12/2022", // 'liens' => [ // 'COMUE' => [ Loading documentation/release/3.1.2.md +2 −1 Original line number Diff line number Diff line **CHANGES version 3.1.1** **CHANGES version 3.1.2** ----------- **Changements** * Ajout d'un parametre indiquant le chamin d'installation pour la partie Vérification * Ajout d'une interface pour visualiser le lien User/Agent (/agent/verifier-lien) * [FIX] correction du choix de l'échelon (si plusieurs échelons actifs alors selection du plus récent "en terme de date de passage") * [FIX] propagation d'un renommage de variable sur l'interface des supérieurs hiérarchique Loading module/Application/config/merged/agent.config.php +21 −0 Original line number Diff line number Diff line Loading @@ -141,6 +141,17 @@ return [ AgentPrivileges::AGENT_GESTION_CCC, ], ], /** VERIF */ [ 'controller' => AgentController::class, 'action' => [ 'verifier-lien', ], 'privileges' => [ AgentPrivileges::AGENT_AFFICHER, ], ], ], ], ], Loading @@ -158,6 +169,16 @@ return [ ], 'may_terminate' => true, 'child_routes' => [ 'verifier-lien' => [ 'type' => Segment::class, 'options' => [ 'route' => '/verifier-lien[/:utilisateur]', 'defaults' => [ 'controller' => AgentController::class, 'action' => 'verifier-lien', ], ], ], /** Fonctions de recherche ************************************************************************/ 'rechercher' => [ 'type' => Literal::class, Loading module/Application/src/Application/Controller/AgentController.php +17 −0 Original line number Diff line number Diff line Loading @@ -379,6 +379,23 @@ class AgentController extends AbstractActionController return $vm; } /** Vérification lien Utilisateur <=> Agent **/ public function verifierLienAction() : ViewModel { $user = $this->getUserService()->getRequestedUser($this); if ($user === null) $user = $this->getUserService()->getConnectedUser(); $agentByUser = $this->getAgentService()->getAgentByUser($user); $agentByLogin = $this->getAgentService()->getAgentByLogin($user->getUsername()); return new ViewModel([ 'utilisateur' => $user, 'agentByUser' => $agentByUser, 'agentByLogin' => $agentByLogin, ]); } /** Recherche d'agent ********************************************************************************************/ public function rechercherLargeAction() : JsonModel Loading module/Application/src/Application/Service/Agent/AgentService.php +11 −0 Original line number Diff line number Diff line Loading @@ -681,4 +681,15 @@ class AgentService { return $fiches; } public function getAgentByLogin(string $login) : ?Agent { $qb = $this->createQueryBuilder() ->andWhere('agent.login = :login')->setParameter('login', $login); try { $result = $qb->getQuery()->getOneOrNullResult(); } catch (NonUniqueResultException $e) { throw new RuntimeException("Plusieurs Agent partagent le même login [".$login."]",0, $e); } return $result; } } No newline at end of file Loading
config/autoload/unicaen-app.global.php +2 −2 Original line number Diff line number Diff line Loading @@ -34,8 +34,8 @@ return [ 'app_infos' => [ 'nom' => "EMC2", 'desc' => "Emploi Mobilité Carrière Compétences", 'version' => "3.1.1", 'date' => "08/12/2022", 'version' => "3.1.2", 'date' => "16/12/2022", // 'liens' => [ // 'COMUE' => [ Loading
documentation/release/3.1.2.md +2 −1 Original line number Diff line number Diff line **CHANGES version 3.1.1** **CHANGES version 3.1.2** ----------- **Changements** * Ajout d'un parametre indiquant le chamin d'installation pour la partie Vérification * Ajout d'une interface pour visualiser le lien User/Agent (/agent/verifier-lien) * [FIX] correction du choix de l'échelon (si plusieurs échelons actifs alors selection du plus récent "en terme de date de passage") * [FIX] propagation d'un renommage de variable sur l'interface des supérieurs hiérarchique Loading
module/Application/config/merged/agent.config.php +21 −0 Original line number Diff line number Diff line Loading @@ -141,6 +141,17 @@ return [ AgentPrivileges::AGENT_GESTION_CCC, ], ], /** VERIF */ [ 'controller' => AgentController::class, 'action' => [ 'verifier-lien', ], 'privileges' => [ AgentPrivileges::AGENT_AFFICHER, ], ], ], ], ], Loading @@ -158,6 +169,16 @@ return [ ], 'may_terminate' => true, 'child_routes' => [ 'verifier-lien' => [ 'type' => Segment::class, 'options' => [ 'route' => '/verifier-lien[/:utilisateur]', 'defaults' => [ 'controller' => AgentController::class, 'action' => 'verifier-lien', ], ], ], /** Fonctions de recherche ************************************************************************/ 'rechercher' => [ 'type' => Literal::class, Loading
module/Application/src/Application/Controller/AgentController.php +17 −0 Original line number Diff line number Diff line Loading @@ -379,6 +379,23 @@ class AgentController extends AbstractActionController return $vm; } /** Vérification lien Utilisateur <=> Agent **/ public function verifierLienAction() : ViewModel { $user = $this->getUserService()->getRequestedUser($this); if ($user === null) $user = $this->getUserService()->getConnectedUser(); $agentByUser = $this->getAgentService()->getAgentByUser($user); $agentByLogin = $this->getAgentService()->getAgentByLogin($user->getUsername()); return new ViewModel([ 'utilisateur' => $user, 'agentByUser' => $agentByUser, 'agentByLogin' => $agentByLogin, ]); } /** Recherche d'agent ********************************************************************************************/ public function rechercherLargeAction() : JsonModel Loading
module/Application/src/Application/Service/Agent/AgentService.php +11 −0 Original line number Diff line number Diff line Loading @@ -681,4 +681,15 @@ class AgentService { return $fiches; } public function getAgentByLogin(string $login) : ?Agent { $qb = $this->createQueryBuilder() ->andWhere('agent.login = :login')->setParameter('login', $login); try { $result = $qb->getQuery()->getOneOrNullResult(); } catch (NonUniqueResultException $e) { throw new RuntimeException("Plusieurs Agent partagent le même login [".$login."]",0, $e); } return $result; } } No newline at end of file