Loading module/Application/src/Application/Controller/MesStructuresController.php +4 −5 Original line number Diff line number Diff line Loading @@ -30,13 +30,12 @@ class MesStructuresController extends AbstractActionController { $user = $this->getUserService()->getConnectedUser(); $structures = $this->getStructureService()->getStructuresByGestionnaire($user); $structure = $this->getStructureService()->getRequestedStructure($this); if ($structure !== null && $structure->getId() === '417') { $aya = $this->getUserService()->getUtilisateurByUsername('corbela'); $dupontc = $this->getUserService()->getUtilisateurByUsername('dupontc01'); $structure->addGestionnaire($aya); $structure->addGestionnaire($dupontc); // $aya = $this->getUserService()->getUtilisateurByUsername('corbela'); // $dupontc = $this->getUserService()->getUtilisateurByUsername('dupontc01'); // $structure->addGestionnaire($aya); // $structure->addGestionnaire($dupontc); } if ($structure === null && count($structures) === 1) { return $this->redirect()->toRoute('mes-structures', ['structure' => $structures[0]->getId()], [], true); Loading module/Application/src/Application/Controller/StructureController.php +1 −0 Original line number Diff line number Diff line Loading @@ -36,6 +36,7 @@ class StructureController extends AbstractActionController { public function afficherAction() { $structure = $this->getStructureService()->getRequestedStructure($this, 'structure'); $structure = $this->getStructureService()->getStructure(417); return new ViewModel([ 'structure' => $structure, Loading module/Application/src/Application/Service/Structure/StructureService.php +2 −1 Original line number Diff line number Diff line Loading @@ -160,8 +160,9 @@ class StructureService public function getStructuresByGestionnaire($user) { $qb = $this->getEntityManager()->getRepository(Structure::class)->createQueryBuilder('structure') ->join('structure.gestionnaires', 'gestionnaireSelection') ->addSelect('gestionnaire')->join('structure.gestionnaires', 'gestionnaire') ->andWhere('gestionnaire.id = :userId') ->andWhere('gestionnaireSelection.id = :userId') ->setParameter('userId', $user->getId()) ->orderBy('structure.libelleCourt') ; Loading module/Application/view/application/mes-structures/index.phtml +0 −1 Original line number Diff line number Diff line Loading @@ -107,7 +107,6 @@ $canDetruireMissionSpecifique = $this->isAllowed(FichePostePrivileges::get <div class="col-md-4" > <h2> Gestionnaires <span class="icon attention" style='color: darkred;' title="Tous les gestionnaires ne remontent pas ..."> <span class="badge"><?php echo count($structure->getGestionnaires()); ?></span> </h2> Loading module/Application/view/application/structure/afficher.phtml +3 −5 Original line number Diff line number Diff line Loading @@ -5,8 +5,6 @@ * @var Structure $structure */ use Application\Controller\FichePoste\FichePosteController; use Application\Controller\MissionSpecifique\MissionSpecifiqueController; use Application\Entity\Db\Structure; $this->headTitle("Affichage de la structure : " . $structure->getLibelleLong()); Loading Loading @@ -61,12 +59,12 @@ $canAfficheAffectation = true; <tbody> <?php foreach ($structure->getPostes() as $poste): ?> <tr> <td> <?php echo $poste->getFichePoste()->getAgent()->getDenomination(); ?> </td> <td> <?php echo $poste->getFichePoste()->getLibelle(); ?> </td> <td> <?php //echo $poste->getFichePoste()->getAgent()->getDenomination(); ?> </td> <td> <?php //echo $poste->getFichePoste()->getLibelle(); ?> </td> <td> <?php if ($canAfficheFichePoste) : ?> <a <?php /** @see FichePosteController::afficherAction() */ ?> href="<?php echo $this->url('fiche-poste/afficher', ['fiche-poste' => $poste->getFichePoste()->getId()], [], true); ?>" href="<?php //echo $this->url('fiche-poste/afficher', ['fiche-poste' => $poste->getFichePoste()->getId()], [], true); ?>" class="ajax-modal" > <span class="icon voir" title="Voir la fiche de poste"></span> Loading Loading
module/Application/src/Application/Controller/MesStructuresController.php +4 −5 Original line number Diff line number Diff line Loading @@ -30,13 +30,12 @@ class MesStructuresController extends AbstractActionController { $user = $this->getUserService()->getConnectedUser(); $structures = $this->getStructureService()->getStructuresByGestionnaire($user); $structure = $this->getStructureService()->getRequestedStructure($this); if ($structure !== null && $structure->getId() === '417') { $aya = $this->getUserService()->getUtilisateurByUsername('corbela'); $dupontc = $this->getUserService()->getUtilisateurByUsername('dupontc01'); $structure->addGestionnaire($aya); $structure->addGestionnaire($dupontc); // $aya = $this->getUserService()->getUtilisateurByUsername('corbela'); // $dupontc = $this->getUserService()->getUtilisateurByUsername('dupontc01'); // $structure->addGestionnaire($aya); // $structure->addGestionnaire($dupontc); } if ($structure === null && count($structures) === 1) { return $this->redirect()->toRoute('mes-structures', ['structure' => $structures[0]->getId()], [], true); Loading
module/Application/src/Application/Controller/StructureController.php +1 −0 Original line number Diff line number Diff line Loading @@ -36,6 +36,7 @@ class StructureController extends AbstractActionController { public function afficherAction() { $structure = $this->getStructureService()->getRequestedStructure($this, 'structure'); $structure = $this->getStructureService()->getStructure(417); return new ViewModel([ 'structure' => $structure, Loading
module/Application/src/Application/Service/Structure/StructureService.php +2 −1 Original line number Diff line number Diff line Loading @@ -160,8 +160,9 @@ class StructureService public function getStructuresByGestionnaire($user) { $qb = $this->getEntityManager()->getRepository(Structure::class)->createQueryBuilder('structure') ->join('structure.gestionnaires', 'gestionnaireSelection') ->addSelect('gestionnaire')->join('structure.gestionnaires', 'gestionnaire') ->andWhere('gestionnaire.id = :userId') ->andWhere('gestionnaireSelection.id = :userId') ->setParameter('userId', $user->getId()) ->orderBy('structure.libelleCourt') ; Loading
module/Application/view/application/mes-structures/index.phtml +0 −1 Original line number Diff line number Diff line Loading @@ -107,7 +107,6 @@ $canDetruireMissionSpecifique = $this->isAllowed(FichePostePrivileges::get <div class="col-md-4" > <h2> Gestionnaires <span class="icon attention" style='color: darkred;' title="Tous les gestionnaires ne remontent pas ..."> <span class="badge"><?php echo count($structure->getGestionnaires()); ?></span> </h2> Loading
module/Application/view/application/structure/afficher.phtml +3 −5 Original line number Diff line number Diff line Loading @@ -5,8 +5,6 @@ * @var Structure $structure */ use Application\Controller\FichePoste\FichePosteController; use Application\Controller\MissionSpecifique\MissionSpecifiqueController; use Application\Entity\Db\Structure; $this->headTitle("Affichage de la structure : " . $structure->getLibelleLong()); Loading Loading @@ -61,12 +59,12 @@ $canAfficheAffectation = true; <tbody> <?php foreach ($structure->getPostes() as $poste): ?> <tr> <td> <?php echo $poste->getFichePoste()->getAgent()->getDenomination(); ?> </td> <td> <?php echo $poste->getFichePoste()->getLibelle(); ?> </td> <td> <?php //echo $poste->getFichePoste()->getAgent()->getDenomination(); ?> </td> <td> <?php //echo $poste->getFichePoste()->getLibelle(); ?> </td> <td> <?php if ($canAfficheFichePoste) : ?> <a <?php /** @see FichePosteController::afficherAction() */ ?> href="<?php echo $this->url('fiche-poste/afficher', ['fiche-poste' => $poste->getFichePoste()->getId()], [], true); ?>" href="<?php //echo $this->url('fiche-poste/afficher', ['fiche-poste' => $poste->getFichePoste()->getId()], [], true); ?>" class="ajax-modal" > <span class="icon voir" title="Voir la fiche de poste"></span> Loading