Loading module/Application/src/Application/Assertion/AgentAssertion.php +2 −2 Changes for module/Application/src/Application/Assertion/AgentAssertion.php: 2 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -26,7 +26,7 @@ class AgentAssertion extends AbstractAssertion { $role = $this->getUserService()->getConnectedRole(); $isGestionnaire = false; if ($role->getRoleId === RoleConstant::GESTIONNAIRE) { if ($role->getRoleId() === RoleConstant::GESTIONNAIRE) { $structures = []; foreach ($entity->getGrades() as $grade) { $structures[] = $grade->getStructure(); Loading @@ -37,7 +37,7 @@ class AgentAssertion extends AbstractAssertion { } } $isResponsable = false; if ($role->getRoleId === RoleConstant::RESPONSABLE) { if ($role->getRoleId() === RoleConstant::RESPONSABLE) { $structures = []; foreach ($entity->getGrades() as $grade) { $structures[] = $grade->getStructure(); Loading module/Application/src/Application/Assertion/EntretienProfessionnelAssertion.php +1 −1 Changes for module/Application/src/Application/Assertion/EntretienProfessionnelAssertion.php: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -28,7 +28,7 @@ class EntretienProfessionnelAssertion extends AbstractAssertion { $role = $this->getUserService()->getConnectedRole(); $isResponsable = false; if ($role->getRoleId === RoleConstant::RESPONSABLE) { if ($role->getRoleId() === RoleConstant::RESPONSABLE) { $structures = []; foreach ($entity->getGrades() as $grade) { $structures[] = $grade->getStructure(); Loading module/Application/src/Application/Controller/AgentController.php +3 −1 Changes for module/Application/src/Application/Controller/AgentController.php: 3 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -748,10 +748,12 @@ class AgentController extends AbstractActionController $result = []; /** @var Agent[] $agents */ foreach ($agents as $agent) { $structure = ($agent->getAffectationPrincipale())?($agent->getAffectationPrincipale()->getStructure()):null; $extra = ($structure)?$structure->getLibelleCourt():"Affectation inconnue"; $result[] = array( 'id' => $agent->getId(), 'label' => $agent->getDenomination(), 'extra' => "<span class='badge' style='background-color: slategray;'>"."OCTOPUS"."</span>", 'extra' => "<span class='badge' style='background-color: slategray;'>".$extra."</span>", ); } usort($result, function($a, $b) { Loading module/Application/src/Application/Service/Agent/AgentService.php +1 −2 Changes for module/Application/src/Application/Service/Agent/AgentService.php: 1 added line, 2 removed lines. Original line number Diff line number Diff line Loading @@ -140,9 +140,8 @@ class AgentService { return $result; } /** * @param integer $id * @param integer|null $id * @return Agent */ public function getAgent(?int $id) Loading Loading
module/Application/src/Application/Assertion/AgentAssertion.php +2 −2 Changes for module/Application/src/Application/Assertion/AgentAssertion.php: 2 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -26,7 +26,7 @@ class AgentAssertion extends AbstractAssertion { $role = $this->getUserService()->getConnectedRole(); $isGestionnaire = false; if ($role->getRoleId === RoleConstant::GESTIONNAIRE) { if ($role->getRoleId() === RoleConstant::GESTIONNAIRE) { $structures = []; foreach ($entity->getGrades() as $grade) { $structures[] = $grade->getStructure(); Loading @@ -37,7 +37,7 @@ class AgentAssertion extends AbstractAssertion { } } $isResponsable = false; if ($role->getRoleId === RoleConstant::RESPONSABLE) { if ($role->getRoleId() === RoleConstant::RESPONSABLE) { $structures = []; foreach ($entity->getGrades() as $grade) { $structures[] = $grade->getStructure(); Loading
module/Application/src/Application/Assertion/EntretienProfessionnelAssertion.php +1 −1 Changes for module/Application/src/Application/Assertion/EntretienProfessionnelAssertion.php: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -28,7 +28,7 @@ class EntretienProfessionnelAssertion extends AbstractAssertion { $role = $this->getUserService()->getConnectedRole(); $isResponsable = false; if ($role->getRoleId === RoleConstant::RESPONSABLE) { if ($role->getRoleId() === RoleConstant::RESPONSABLE) { $structures = []; foreach ($entity->getGrades() as $grade) { $structures[] = $grade->getStructure(); Loading
module/Application/src/Application/Controller/AgentController.php +3 −1 Changes for module/Application/src/Application/Controller/AgentController.php: 3 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -748,10 +748,12 @@ class AgentController extends AbstractActionController $result = []; /** @var Agent[] $agents */ foreach ($agents as $agent) { $structure = ($agent->getAffectationPrincipale())?($agent->getAffectationPrincipale()->getStructure()):null; $extra = ($structure)?$structure->getLibelleCourt():"Affectation inconnue"; $result[] = array( 'id' => $agent->getId(), 'label' => $agent->getDenomination(), 'extra' => "<span class='badge' style='background-color: slategray;'>"."OCTOPUS"."</span>", 'extra' => "<span class='badge' style='background-color: slategray;'>".$extra."</span>", ); } usort($result, function($a, $b) { Loading
module/Application/src/Application/Service/Agent/AgentService.php +1 −2 Changes for module/Application/src/Application/Service/Agent/AgentService.php: 1 added line, 2 removed lines. Original line number Diff line number Diff line Loading @@ -140,9 +140,8 @@ class AgentService { return $result; } /** * @param integer $id * @param integer|null $id * @return Agent */ public function getAgent(?int $id) Loading