Loading module/Application/src/Application/Controller/AgentController.php +4 −4 Original line number Diff line number Diff line Loading @@ -89,10 +89,10 @@ class AgentController extends AbstractActionController public function afficherAction() { $agent = $this->getAgentService()->getRequestedAgent($this); $utilisateur = $this->getUserService()->getConnectedUser(); /** 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); } Loading @@ -102,10 +102,10 @@ class AgentController extends AbstractActionController $agentStatuts = $this->getAgentService()->getAgentStatutsByAgent($agent, true); $agentAffectations = $this->getAgentService()->getAgentAffectationsByAgent($agent, true); $agentGrades = $this->getAgentService()->getAgentGradesByAgent($agent, true); $connectedUser = $this->getUserService()->getConnectedUser(); $connectedAgent = $this->getAgentService()->getAgentByUser($connectedUser); $connectedAgent = $this->getAgentService()->getAgentByUser($utilisateur); $connectedRole = $this->getUserService()->getConnectedRole(); if ($agent !== $connectedAgent AND ($connectedRole->getRoleId() === RoleConstant::PERSONNEL OR $agent === null)) { if ($connectedAgent !== $agent AND ($connectedRole->getRoleId() === RoleConstant::PERSONNEL OR $agent === null)) { return $this->redirect()->toRoute('agent/afficher', ['agent' => $connectedAgent->getId()], [] , true); } $entretiens = $this->getEntretienProfessionnelService()->getEntretiensProfessionnelsParAgent($agent); Loading module/Application/src/Application/View/Helper/SynchorniserIconViewHelper.php +3 −2 Original line number Diff line number Diff line Loading @@ -11,15 +11,16 @@ class SynchorniserIconViewHelper extends AbstractHelper { /** * @param bool|null $infos * @param array $options * @return string|Partial */ public function __invoke($options = []) public function __invoke(?bool $infos = true, $options = []) { /** @var PhpRenderer $view */ $view = $this->getView(); $view->resolver()->attach(new TemplatePathStack(['script_paths' => [__DIR__ . "/partial"]])); return $view->partial('synchroniser-icon', ['options' => $options]); return $view->partial('synchroniser-icon', ['infos' => $infos, 'options' => $options]); } } No newline at end of file module/Application/src/Application/View/Helper/partial/synchroniser-icon.phtml +12 −2 Original line number Diff line number Diff line <?php /** * @var bool $infos; */ ?> <span class="icon synchoniser" <?php if ($infos) : ?> title="<span class='icon synchroniser' style='float:left;color:#31708f'></span> <span style='text-align:justify'>Éléments synchronisé depuis <strong>Octopus</strong> journalièrement</span>" data-toggle="tooltip" data-html="true" <?php endif; ?> > </span> module/Application/view/application/corps/index.phtml +1 −0 Original line number Diff line number Diff line Loading @@ -37,6 +37,7 @@ $canModifier = $this->isAllowed(CorpsPrivileges::getResourceId(CorpsPrivileges:: <span class="badge"> <?php echo count($categories); ?> </span> <span style="color:white;" ?><?php echo $this->synchroniserIcon(false); ?></span> </a> </li> Loading Loading
module/Application/src/Application/Controller/AgentController.php +4 −4 Original line number Diff line number Diff line Loading @@ -89,10 +89,10 @@ class AgentController extends AbstractActionController public function afficherAction() { $agent = $this->getAgentService()->getRequestedAgent($this); $utilisateur = $this->getUserService()->getConnectedUser(); /** 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); } Loading @@ -102,10 +102,10 @@ class AgentController extends AbstractActionController $agentStatuts = $this->getAgentService()->getAgentStatutsByAgent($agent, true); $agentAffectations = $this->getAgentService()->getAgentAffectationsByAgent($agent, true); $agentGrades = $this->getAgentService()->getAgentGradesByAgent($agent, true); $connectedUser = $this->getUserService()->getConnectedUser(); $connectedAgent = $this->getAgentService()->getAgentByUser($connectedUser); $connectedAgent = $this->getAgentService()->getAgentByUser($utilisateur); $connectedRole = $this->getUserService()->getConnectedRole(); if ($agent !== $connectedAgent AND ($connectedRole->getRoleId() === RoleConstant::PERSONNEL OR $agent === null)) { if ($connectedAgent !== $agent AND ($connectedRole->getRoleId() === RoleConstant::PERSONNEL OR $agent === null)) { return $this->redirect()->toRoute('agent/afficher', ['agent' => $connectedAgent->getId()], [] , true); } $entretiens = $this->getEntretienProfessionnelService()->getEntretiensProfessionnelsParAgent($agent); Loading
module/Application/src/Application/View/Helper/SynchorniserIconViewHelper.php +3 −2 Original line number Diff line number Diff line Loading @@ -11,15 +11,16 @@ class SynchorniserIconViewHelper extends AbstractHelper { /** * @param bool|null $infos * @param array $options * @return string|Partial */ public function __invoke($options = []) public function __invoke(?bool $infos = true, $options = []) { /** @var PhpRenderer $view */ $view = $this->getView(); $view->resolver()->attach(new TemplatePathStack(['script_paths' => [__DIR__ . "/partial"]])); return $view->partial('synchroniser-icon', ['options' => $options]); return $view->partial('synchroniser-icon', ['infos' => $infos, 'options' => $options]); } } No newline at end of file
module/Application/src/Application/View/Helper/partial/synchroniser-icon.phtml +12 −2 Original line number Diff line number Diff line <?php /** * @var bool $infos; */ ?> <span class="icon synchoniser" <?php if ($infos) : ?> title="<span class='icon synchroniser' style='float:left;color:#31708f'></span> <span style='text-align:justify'>Éléments synchronisé depuis <strong>Octopus</strong> journalièrement</span>" data-toggle="tooltip" data-html="true" <?php endif; ?> > </span>
module/Application/view/application/corps/index.phtml +1 −0 Original line number Diff line number Diff line Loading @@ -37,6 +37,7 @@ $canModifier = $this->isAllowed(CorpsPrivileges::getResourceId(CorpsPrivileges:: <span class="badge"> <?php echo count($categories); ?> </span> <span style="color:white;" ?><?php echo $this->synchroniserIcon(false); ?></span> </a> </li> Loading