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

Affectation fonctionnelle comme base pour le calcul de la chaine hiérarchique

parent ac083826
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -130,7 +130,7 @@ class AgentController extends AbstractActionController

        //Récupération des status
        $agentStatuts = $this->getAgentStatutService()->getAgentStatutsByAgent($agent);
        $agentAffectations = $this->getAgentAffectationService()->getAgentAffectationsByAgent($agent,true,false,false);
        $agentAffectations = $this->getAgentAffectationService()->getAgentAffectationsByAgent($agent);
        $agentGrades = $this->getAgentGradeService()->getAgentGradesByAgent($agent);

        //Récupération des supérieures et autorités
+2 −2
Original line number Diff line number Diff line
@@ -355,7 +355,7 @@ class AgentService {
        if (!empty($liste)) return $liste;

       //checking structure
       $affectationsPrincipales = $this->getAgentAffectationService()->getAgentAffectationsByAgent($agent, true, true, false);
       $affectationsPrincipales = $this->getAgentAffectationService()->getAgentAffectationsByAgent($agent);
       if (count($affectationsPrincipales) !== 1) return []; //throw new LogicException("Plusieurs affectations principales pour l'agent ".$agent->getId() . ":".$agent->getDenomination());

       $structure = $affectationsPrincipales[0]->getStructure();
@@ -394,7 +394,7 @@ class AgentService {
        if ($superieurs === null) $superieurs = $this->computeSuperieures($agent, $date);

        //checking structure
        $affectationsPrincipales = $this->getAgentAffectationService()->getAgentAffectationsByAgent($agent, true, true, false);
        $affectationsPrincipales = $this->getAgentAffectationService()->getAgentAffectationsByAgent($agent);
        $structure = null;
        if (count($affectationsPrincipales) === 1) {
            $structure = $affectationsPrincipales[0]->getStructure()->getNiv2();