Commit aa011ac9 authored by Jean-Philippe Metivier's avatar Jean-Philippe Metivier
Browse files

Correction Bug : affichage agent sans identifiant d'agent

parent f5078dc2
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -5,6 +5,12 @@ Version 1.3.0 *Module de bourse emploi*
Version 1.2.0 *Module de formation*
-------------

Version 1.1.5
-------------
- [Correction bug] l'encart Mes données ne marchait plus faute d'agent fourni
- Parametrage et ajout d'une adresse par défaut pour les profils de recrutement
- Refonte macro pour le profil

Version 1.1.4
-------------
+ [Base de données] Reprise des données de LAGAF (1er batch)
+10 −0
Original line number Diff line number Diff line
@@ -89,6 +89,16 @@ class AgentController extends AbstractActionController
    public function afficherAction()
    {
        $agent = $this->getAgentService()->getRequestedAgent($this);

        /** si pas d'agent de specifier récupérer l'agent lié au compte de la personne connectée */
        if ($agent === null) {
            $utilisateur = $this->getUserService()->getConnectedUser();
            if ($utilisateur !== null) $agent = $this->getAgentService()->getAgentByUser($utilisateur);
        }

        /** si pas d'agent throw exception */
        if ($agent === null) throw new RuntimeException("Aucun agent n'a pu être trouvé.");

        $agentStatuts = $this->getAgentService()->getAgentStatutsByAgent($agent, true);
        $agentAffectations = $this->getAgentService()->getAgentAffectationsByAgent($agent, true);
        $agentGrades = $this->getAgentService()->getAgentGradesByAgent($agent, true);