diff --git a/documentation/release/3.1.1.md b/documentation/release/3.1.1.md index 2c7d66b493ed0ae8d7915f532a22c3e1097d279b..eacce6fa9694b41d6dd93db238b03746df9fb3a3 100644 --- a/documentation/release/3.1.1.md +++ b/documentation/release/3.1.1.md @@ -4,6 +4,7 @@ **Changements** +* [FIX] Calcul erroné de l'autorité de responsables de structures sans parent * Retrait de mention à Octopus * Logos modifiables via un CSS (mais pas de lien) @@ -24,7 +25,6 @@ div#etablissement { } ``` - **Modifications de la base de donnée** **Évolution des bibliothèques** diff --git a/module/Application/src/Application/Service/Agent/AgentService.php b/module/Application/src/Application/Service/Agent/AgentService.php index fa54749ac6dba9742b218b4f2989fc4cfe9fb766..2fdee58e40c9a22718e752b0e1309ca94fa4e61f 100644 --- a/module/Application/src/Application/Service/Agent/AgentService.php +++ b/module/Application/src/Application/Service/Agent/AgentService.php @@ -12,6 +12,7 @@ use DateTime; use Doctrine\ORM\NonUniqueResultException; use Doctrine\ORM\ORMException; use Doctrine\ORM\QueryBuilder; +use Fichier\Entity\Db\Fichier; use Formation\Entity\Db\FormationElement; use Laminas\Mvc\Controller\AbstractActionController; use Structure\Entity\Db\Structure; @@ -657,4 +658,27 @@ class AgentService { return $result; } + /** FICHE DE POSTE PDF */ + + /** + * @param Agent[]$agents + * @return Fichier[] :: [AgentId => Fichier] + */ + public function getFichesPostesPdfByAgents(array $agents) : array + { + $ids = array_map(function (Agent $a) {return $a->getId(); }, $agents); + + $qb = $this->getEntityManager()->getRepository(Agent::class)->createQueryBuilder('agent') + ->leftJoin('agent.fichiers', 'fichier')->addSelect('fichier') + ->leftJoin('fichier.nature', 'nature')->addSelect('nature') + ->andWhere('nature.code = :ficheposte')->setParameter('ficheposte', "FICHE_POSTE") + ->andWhere('agent.id in (:ids)')->setParameter('ids', $ids); + + $result = $qb->getQuery()->getResult(); + + $fiches = []; + foreach ($result as $item) $fiches[$item->getId()] = $item->getFichiersByCode("FICHE_POSTE"); + return $fiches; + } + } \ No newline at end of file diff --git a/module/Structure/src/Structure/Controller/StructureController.php b/module/Structure/src/Structure/Controller/StructureController.php index d79e99aad5ff0af07ec6084a7171a78069a8f37b..93a71ad6c77736ede129636ce6f8db0f2cb71704 100644 --- a/module/Structure/src/Structure/Controller/StructureController.php +++ b/module/Structure/src/Structure/Controller/StructureController.php @@ -136,10 +136,7 @@ class StructureController extends AbstractActionController { $delegues = $this->getDelegueService()->getDeleguesByStructure($structure); // $profils = $this->getFicheProfilService()->getFichesPostesByStructure($structure); - $fichespostes_pdf = []; - foreach ($allAgents as $agent) { - $fichespostes_pdf[$agent->getId()] = $agent->getFichiersByCode("FICHE_POSTE"); - } + $fichespostes_pdf = $this->getAgentService()->getFichesPostesPdfByAgents($allAgents); //formations $demandesNonValidees = $this->getDemandeExterneService()->getDemandesExternesNonValideesByAgents($allAgents, Formation::getAnnee()); diff --git a/root@lemc2.unicaen.fr b/root@lemc2.unicaen.fr new file mode 100644 index 0000000000000000000000000000000000000000..abdea1c19756e361fffdc84db484e9916253ebde --- /dev/null +++ b/root@lemc2.unicaen.fr @@ -0,0 +1,13 @@ +div#comue { + background-image: url('../img/normandie-universite-logo.svg'); + height: 85px; + width: 146px; + margin-top: -20px; +} + +div#etablissement { + background-image: url('../img/unicaen-logo-noir.svg'); + height:85px; + width:160px; + margin-top: -20px; +} \ No newline at end of file