Loading module/Application/src/Application/Service/Agent/AgentService.php +3 −3 Changes for module/Application/src/Application/Service/Agent/AgentService.php: 3 added lines, 3 removed lines. Original line number Diff line number Diff line Loading @@ -296,9 +296,9 @@ EOS; * @param Structure[] $structures * @return Agent[] */ public function getAgentsByStructures(array $structures) : array public function getAgentsByStructures(array $structures, ?DateTime $date = null) : array { $today = new DateTime(); if ($date === null) $date = new DateTime(); $qb = $this->getEntityManager()->getRepository(Agent::class)->createQueryBuilder('agent') //AFFECTATION Loading Loading @@ -327,7 +327,7 @@ EOS; //FICHE DE POSTE ->addSelect('ficheposte')->leftJoin('agent.fiches', 'ficheposte') ->setParameter('today', $today) ->setParameter('today', $date) ->setParameter('true', 'O') ->setParameter('false', 'N') ->andWhere('agent.deleted_on IS NULL') Loading module/Structure/src/Structure/Controller/StructureController.php +6 Changes for module/Structure/src/Structure/Controller/StructureController.php: 6 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -113,6 +113,11 @@ class StructureController extends AbstractActionController { /** Campagne */ $last = $this->getCampagneService()->getLastCampagne(); /** Récupération des agents et postes liés aux structures */ $agentsLast = $this->getAgentService()->getAgentsByStructures($structures, $last->getDateDebut()); $agentsForcesLast = array_map(function (StructureAgentForce $a) { return $a->getAgent(); }, $structure->getAgentsForces()); $allAgentsLast = array_merge($agentsLast, $agentsForcesLast); $campagnes = $this->getCampagneService()->getCampagnesActives(); $entretiens = []; Loading Loading @@ -140,6 +145,7 @@ class StructureController extends AbstractActionController { 'postes' => $postes, 'last' => $last, 'agentsLast' => $allAgentsLast, 'campagnes' => $campagnes, 'entretiens' => $entretiens, 'delegues' => $delegues, Loading module/Structure/view/structure/structure/afficher.phtml +1 Changes for module/Structure/view/structure/structure/afficher.phtml: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ * @var FormationInstanceInscrit[] $inscriptions * * @var Campagne $last * @var Agent[] $agentsLast * @var Campagne[] $campagnes * @var Delegue[] $delegues */ Loading module/Structure/view/structure/structure/partial/campagne.phtml +5 Changes for module/Structure/view/structure/structure/partial/campagne.phtml: 5 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -139,7 +139,11 @@ foreach ($encours as $epro) { $nbEncours = count($encours); $nbSans = count($sans); $nbTotal = $nbComplete + $nbEncours + $nbSans; ?> <?php if ($nbTotal !== 0) : ?> <?php $ratioComplete = $nbComplete / $nbTotal * 100; $ratioPlanifie = count($planifie) / $nbTotal * 100; $ratioFait = count($fait) / $nbTotal * 100; Loading @@ -160,6 +164,7 @@ foreach ($encours as $epro) { title="Entretiens non planifiés <?php echo $nbSans; ?>/<?php echo $nbTotal; ?>"> <?php echo round($ratioSans); ?>%</div> </div> <?php endif; ?> </div> </div> Loading Loading
module/Application/src/Application/Service/Agent/AgentService.php +3 −3 Changes for module/Application/src/Application/Service/Agent/AgentService.php: 3 added lines, 3 removed lines. Original line number Diff line number Diff line Loading @@ -296,9 +296,9 @@ EOS; * @param Structure[] $structures * @return Agent[] */ public function getAgentsByStructures(array $structures) : array public function getAgentsByStructures(array $structures, ?DateTime $date = null) : array { $today = new DateTime(); if ($date === null) $date = new DateTime(); $qb = $this->getEntityManager()->getRepository(Agent::class)->createQueryBuilder('agent') //AFFECTATION Loading Loading @@ -327,7 +327,7 @@ EOS; //FICHE DE POSTE ->addSelect('ficheposte')->leftJoin('agent.fiches', 'ficheposte') ->setParameter('today', $today) ->setParameter('today', $date) ->setParameter('true', 'O') ->setParameter('false', 'N') ->andWhere('agent.deleted_on IS NULL') Loading
module/Structure/src/Structure/Controller/StructureController.php +6 Changes for module/Structure/src/Structure/Controller/StructureController.php: 6 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -113,6 +113,11 @@ class StructureController extends AbstractActionController { /** Campagne */ $last = $this->getCampagneService()->getLastCampagne(); /** Récupération des agents et postes liés aux structures */ $agentsLast = $this->getAgentService()->getAgentsByStructures($structures, $last->getDateDebut()); $agentsForcesLast = array_map(function (StructureAgentForce $a) { return $a->getAgent(); }, $structure->getAgentsForces()); $allAgentsLast = array_merge($agentsLast, $agentsForcesLast); $campagnes = $this->getCampagneService()->getCampagnesActives(); $entretiens = []; Loading Loading @@ -140,6 +145,7 @@ class StructureController extends AbstractActionController { 'postes' => $postes, 'last' => $last, 'agentsLast' => $allAgentsLast, 'campagnes' => $campagnes, 'entretiens' => $entretiens, 'delegues' => $delegues, Loading
module/Structure/view/structure/structure/afficher.phtml +1 Changes for module/Structure/view/structure/structure/afficher.phtml: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ * @var FormationInstanceInscrit[] $inscriptions * * @var Campagne $last * @var Agent[] $agentsLast * @var Campagne[] $campagnes * @var Delegue[] $delegues */ Loading
module/Structure/view/structure/structure/partial/campagne.phtml +5 Changes for module/Structure/view/structure/structure/partial/campagne.phtml: 5 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -139,7 +139,11 @@ foreach ($encours as $epro) { $nbEncours = count($encours); $nbSans = count($sans); $nbTotal = $nbComplete + $nbEncours + $nbSans; ?> <?php if ($nbTotal !== 0) : ?> <?php $ratioComplete = $nbComplete / $nbTotal * 100; $ratioPlanifie = count($planifie) / $nbTotal * 100; $ratioFait = count($fait) / $nbTotal * 100; Loading @@ -160,6 +164,7 @@ foreach ($encours as $epro) { title="Entretiens non planifiés <?php echo $nbSans; ?>/<?php echo $nbTotal; ?>"> <?php echo round($ratioSans); ?>%</div> </div> <?php endif; ?> </div> </div> Loading