Commit 2f963819 authored by Jean-Philippe Metivier's avatar Jean-Philippe Metivier
Browse files

Ajout des accès directs vers les agents depuis les listes : métier, corps,...

Ajout des accès directs vers les agents depuis les listes : métier, corps, grades, correspondances, emploi-types
parent 0198bbc1
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -9,6 +9,7 @@ Version 3.2.7 (XX/XX/2023)
- Changement de l'affichage des tableaux de fiches de poste (inversion nom + prenom et correction de l'affichage de fin de validité)
- Ajout d'un avertissement dans la fenêtre modal de confirmation de suppression de fiche métier si une ou plusieurs fiches de postes utilisent cette fiche métier  
- Ajout d'une garde pour empécher la modification de la convocation si l'entretien est au moins validé par le responsable
- Ajout des accès directs vers les agents depuis les listes : métier, corps, grades, correspondances, emploi-types

Modification en BD
---
+13 −0
Original line number Diff line number Diff line
@@ -777,4 +777,17 @@ EOS;

        return $result;
    }

    /**
     * @return Agent[]
     */
    public function getAgentsByIds(array $agentIds): array
    {
        $agents = [];
        foreach ($agentIds as $agentId) {
            $agent = $this->getAgent($agentId);
            if ($agent) $agents[$agentId] = $agent;
        }
        return $agents;
    }
}
 No newline at end of file
+17 −1
Original line number Diff line number Diff line
@@ -9,6 +9,7 @@

use Application\Entity\Db\Agent;
use Application\Entity\Db\AgentGrade;
use Application\Provider\Privilege\AgentPrivileges;
use Carriere\Entity\Db\Corps;

$now = new DateTime();
@@ -53,7 +54,15 @@ usort($agents, function(AgentGrade $a, AgentGrade $b) {return $a->getAgent()->ge
        <?php foreach ($agentGrades as $agent) : ?>
        <tr <?php if ($agent->estFini($now)) echo 'class="historise"'; ?> >
            <td> <?php echo $agent->getId(); ?> </td>
            <td> <?php echo $agent->getAgent()->getDenomination(); ?> </td>
            <td>
                <?php if ($this->isAllowed($agent->getAgent(), AgentPrivileges::AGENT_AFFICHER)) : ?>
                    <a class="linkexterne" id="<?php echo $agent->getAgent()->getId(); ?>" href="">
                        <?php echo $agent->getAgent()->getDenomination(); ?>
                    </a>
                <?php else : ?>
                    <?php echo $agent->getAgent()->getDenomination(); ?>
                <?php endif; ?>
            </td>
            <td> <?php echo ($agent->getDateDebut()) ? $agent->getDateDebut()->format('d/m/Y') : "---"; ?> </td>
            <td> <?php echo ($agent->getDateFin()) ? $agent->getDateFin()->format('d/m/Y') : "---"; ?> </td>
        </tr>
@@ -61,5 +70,12 @@ usort($agents, function(AgentGrade $a, AgentGrade $b) {return $a->getAgent()->ge
    </tbody>
</table>

<script>
    $('a.linkexterne').on('click',function(e) {
        e.preventDefault();
        $('.modal').modal("hide");
        window.location = 'agent/afficher/' + $(this).attr('id');
    });
</script>

+19 −1
Original line number Diff line number Diff line
@@ -9,6 +9,7 @@

use Application\Entity\Db\Agent;
use Application\Entity\Db\AgentGrade;
use Application\Provider\Privilege\AgentPrivileges;
use Carriere\Entity\Db\Correspondance;

$now = new DateTime();
@@ -54,7 +55,15 @@ $now = new DateTime();
        <?php foreach ($agentGrades  as $agent) : ?>
        <tr <?php if ($agent->estFini($now)) echo 'class="historise"'; ?> >
            <td> <?php echo $agent->getId(); ?> </td>
            <td> <?php echo $agent->getAgent()->getDenomination(); ?> </td>
            <td>
                <?php if ($this->isAllowed($agent->getAgent(), AgentPrivileges::AGENT_AFFICHER)) : ?>
                    <a class="linkexterne" id="<?php echo $agent->getAgent()->getId(); ?>" href="">
                        <?php echo $agent->getAgent()->getDenomination(); ?>
                    </a>
                <?php else : ?>
                    <?php echo $agent->getAgent()->getDenomination(); ?>
                <?php endif; ?>
            </td>
            <td> <?php echo ($agent->getDateDebut()) ? $agent->getDateDebut()->format('d/m/Y') : "---"; ?> </td>
            <td> <?php echo ($agent->getDateFin()) ? $agent->getDateFin()->format('d/m/Y') : "---"; ?> </td>
        </tr>
@@ -64,3 +73,12 @@ $now = new DateTime();



<script>
    $('a.linkexterne').on('click',function(e) {
        e.preventDefault();
        $('.modal').modal("hide");
        window.location = 'agent/afficher/' + $(this).attr('id');
    });
</script>

+19 −1
Original line number Diff line number Diff line
@@ -9,6 +9,7 @@

use Application\Entity\Db\Agent;
use Application\Entity\Db\AgentGrade;
use Application\Provider\Privilege\AgentPrivileges;
use Carriere\Entity\Db\Corps;
use Carriere\Entity\Db\EmploiType;

@@ -54,7 +55,15 @@ usort($agents, function(AgentGrade $a, AgentGrade $b) {return $a->getAgent()->ge
        <?php foreach ($agentGrades as $agent) : ?>
        <tr <?php if ($agent->estFini($now)) echo 'class="historise"'; ?> >
            <td> <?php echo $agent->getId(); ?> </td>
            <td> <?php echo $agent->getAgent()->getDenomination(); ?> </td>
            <td>
                <?php if ($this->isAllowed($agent->getAgent(), AgentPrivileges::AGENT_AFFICHER)) : ?>
                    <a class="linkexterne" id="<?php echo $agent->getAgent()->getId(); ?>" href="">
                        <?php echo $agent->getAgent()->getDenomination(); ?>
                    </a>
                <?php else : ?>
                    <?php echo $agent->getAgent()->getDenomination(); ?>
                <?php endif; ?>
            </td>
            <td> <?php echo ($agent->getDateDebut()) ? $agent->getDateDebut()->format('d/m/Y') : "---"; ?> </td>
            <td> <?php echo ($agent->getDateFin()) ? $agent->getDateFin()->format('d/m/Y') : "---"; ?> </td>
        </tr>
@@ -64,3 +73,12 @@ usort($agents, function(AgentGrade $a, AgentGrade $b) {return $a->getAgent()->ge



<script>
    $('a.linkexterne').on('click',function(e) {
        e.preventDefault();
        $('.modal').modal("hide");
        window.location = 'agent/afficher/' + $(this).attr('id');
    });
</script>

Loading