From 39967bd273df101774b441b37c57326908c4e07b Mon Sep 17 00:00:00 2001 From: Jean-Philippe Metivier <jean-philippe.metivier@unicaen.fr> Date: Wed, 22 Feb 2023 09:38:29 +0100 Subject: [PATCH] =?UTF-8?q?Affectation=20fonctionnelle=20comme=20base=20po?= =?UTF-8?q?ur=20le=20calcul=20de=20la=20chaine=20hi=C3=A9rarchique?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/Application/Controller/AgentController.php | 2 +- .../src/Application/Service/Agent/AgentService.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/module/Application/src/Application/Controller/AgentController.php b/module/Application/src/Application/Controller/AgentController.php index 0c47e4288..ac4795bf9 100644 --- a/module/Application/src/Application/Controller/AgentController.php +++ b/module/Application/src/Application/Controller/AgentController.php @@ -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 diff --git a/module/Application/src/Application/Service/Agent/AgentService.php b/module/Application/src/Application/Service/Agent/AgentService.php index 9cd20bed4..77517860b 100644 --- a/module/Application/src/Application/Service/Agent/AgentService.php +++ b/module/Application/src/Application/Service/Agent/AgentService.php @@ -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(); -- GitLab