Commit 7b8c61b4 authored by Jean-Philippe Metivier's avatar Jean-Philippe Metivier
Browse files

[FIX] EP : correction de la recherche des responsables d'entretien pour les...

[FIX] EP : correction de la recherche des responsables d'entretien pour les agents sans obligation d'EP
parent 06f024dd
Loading
Loading
Loading
Loading
+1 −0
Changes for documentation/release/3.1.8.md: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -4,6 +4,7 @@
Changements
---

* [FIX] EP : correction de la recherche des responsables d'entretien pour les agents sans obligation d'EP 

Modification de la base de données
---
+13 −5
Changes for module/Structure/view/structure/structure/partial/campagne.phtml: 13 added lines, 5 removed lines.
Original line number Diff line number Diff line
@@ -285,10 +285,13 @@ foreach ($encours as $epro) {
    </thead>
    <tbody>
    <?php foreach ($facultatifs as $denomination => $agent): ?>
        <?php
            $affectionPrincipale = $agent->getAffectationPrincipale();
            $structurePrincipale = ($affectionPrincipale)?$affectionPrincipale->getStructure():null; ?>
        <tr>
            <td> <?php echo $denomination; ?> </td>
            <td>
                <?php foreach ($agent->getGradesActifs() as $grade) : ?>
                <?php foreach ($agent->getAffectationsActifs() as $grade) : ?>
                    <?php $structure = $grade->getStructure(); ?>
                    <?php if ($structure === null) : ?>
                        <span class="text-danger">
@@ -313,7 +316,7 @@ foreach ($encours as $epro) {
                <?php endforeach; ?>
            </td>
            <?php if ($enCours === true) : ?>
                <td>
                <td class="action">
                    <?php if ($canVoirAgent) : ?>
                        <a
                            <?php /** @see \Application\Controller\AgentController::afficherAction() */?>
@@ -322,18 +325,23 @@ foreach ($encours as $epro) {
                                title="Affiche la fiche <span class='highlight agent'><?php echo $denomination; ?>"
                                data-bs-toggle="tooltip" data-bs-html="true"
                        >
                            <span class="icon personnel"></span></a>
                            <span class="icon personnel"></span>
                            Afficher
                        </a>
                    <?php endif; ?>
                    <?php if ($canAjouterEntretien) : ?>
                        <?php if ($campagne !== null AND $agent !== null) : ?>
                            <br>
                            <a
                                <?php /** @see \EntretienProfessionnel\Controller\EntretienProfessionnelController::creerAction() */?>
                                    href="<?php echo $this->url('entretien-professionnel/creer', ['campagne' => $campagne->getId()], ["query" => ['structure' => ($structure)?$structure->getId():null, 'agent' => ($agent)?$agent->getId():null]], [], true); ?>"
                                    href="<?php echo $this->url('entretien-professionnel/creer', ['campagne' => $campagne->getId()], ["query" => ['structure' => ($structurePrincipale)?$structurePrincipale->getId():null, 'agent' => ($agent)?$agent->getId():null]], [], true); ?>"
                                    title="Créer un entretien professionnel pour <span class='highlight agent'><?php echo $denomination; ?>"
                                    class="ajax-modal" data-event="entretien"
                                    data-bs-toggle="tooltip" data-bs-html="true"
                            >
                                <span class="icon icon-ajouter"></span></a>
                                <span class="icon icon-ajouter"></span>
                                Convoquer
                            </a>
                        <?php else : ?>
                            <?php if ($campagne === null) : ?>
                                <span class="text-danger">