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

Fix agentforce

parent a850b1a3
Loading
Loading
Loading
Loading
+2 −0
Changes for module/Structure/view/structure/structure/partial/agents.phtml: 2 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -13,6 +13,7 @@ use Application\Entity\Db\Agent;
use Application\Entity\Db\Complement;
use Application\Provider\Privilege\AgentPrivileges;
use Structure\Entity\Db\Structure;
use Structure\Entity\Db\StructureAgentForce;
use Structure\Provider\Privilege\StructurePrivileges;

$canVoirAgent = $this->isAllowed(AgentPrivileges::getResourceId(AgentPrivileges::AGENT_AFFICHER));
@@ -40,6 +41,7 @@ $isForce = (isset($options['force']) AND $options['force'] === true);
    <tbody>
    <?php foreach ($agents as $agent) :?>
        <?php
            if ($agent instanceof StructureAgentForce) $agent = $agent->getAgent();
            $structureAgent =  ($agent->getAffectationPrincipale())?$agent->getAffectationPrincipale()->getStructure():null;
            $niveau2   =  ($structureAgent AND $structureAgent->getNiv2())?$structureAgent->getNiv2():null;
        ?>