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

Ajout des CDD dans la liste des agents d'une structure

parent 361c31a0
Loading
Loading
Loading
Loading
+1 −1
Changes for module/Application/src/Application/Service/Agent/AgentService.php: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -273,7 +273,7 @@ class AgentService {
            ->addSelect('ggrade')->join('grade.grade', 'ggrade')
            ->andWhere('statut.fin >= :today OR statut.fin IS NULL')
            ->andWhere('grade.dateFin >= :today OR grade.dateFin IS NULL')
            ->andWhere('statut.titulaire = :true OR statut.cdi = :true')
//            ->andWhere('statut.titulaire = :true OR statut.cdi = :true')
            ->andWhere('statut.administratif = :true')
            ->setParameter('today', $today)
            ->setParameter('true', 'O')
+5
Changes for module/Application/src/Application/View/Helper/partial/agent-grade.phtml: 5 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -15,6 +15,7 @@ $displayPeriode = (isset($options['periode']) AND $options['periode'] !== fa
$displayIdentifiant = (isset($options['identifiant']) AND $options['identifiant'] !== false);
$displayAgent       = (isset($options['agent']) AND $options['agent'] !== false);
$displayTemoin      = (isset($options['temoin']) AND $options['temoin'] !== false);
$displayCorrespondance      = (isset($options['correspondance']) AND $options['correspondance'] !== false);
?>

<?php if($debug) : ?>
@@ -57,6 +58,10 @@ $displayTemoin = (isset($options['temoin']) AND $options['temoin'] !== fals
        </span>
    <?php endif; ?>

    <?php if ($displayCorrespondance) : ?>
        <?php echo $grade->getBap()->getCategorie(); ?>
    <?php endif; ?>

    <?php if ($displayTemoin) : ?>
    <dl class="dl-horizontal">

+8 −8
Changes for module/Application/view/application/agent/afficher.phtml: 8 added lines, 8 removed lines.
Original line number Diff line number Diff line
@@ -97,20 +97,20 @@ $this->headTitle("Affichage de l'agent : " . $agent->getDenomination());
        </div>
    </div>

    <h2> Affectations, Statuts et grades </h2>
    <h2> Statuts et grades </h2>

    <div class="row">
        <div class="col-md-3">
            <?php foreach ($agent->getAffectationsActifs() as $affectation) : ?>
                <?php echo $this->agentAffectation($affectation, ['structure' => true, 'periode' => true, 'temoin' => true]); ?>
            <?php endforeach; ?>
        </div>
        <div class="col-md-3">
<!--        <div class="col-md-3">-->
<!--            --><?php //foreach ($agent->getAffectationsActifs() as $affectation) : ?>
<!--                --><?php //echo $this->agentAffectation($affectation, ['structure' => true, 'periode' => true, 'temoin' => true]); ?>
<!--            --><?php //endforeach; ?>
<!--        </div>-->
        <div class="col-md-4">
            <?php foreach ($agent->getStatutsActifs() as $statut) : ?>
                <?php echo $this->agentStatut($statut, ['structure' => true, 'periode' => true, 'temoin' => true]); ?>
            <?php endforeach; ?>
        </div>
        <div class="col-md-6">
        <div class="col-md-8">
        <?php foreach ($agent->getGradesActifs() as $grade) : ?>
            <?php echo $this->agentGrade($grade, ['structure' => true, 'periode' => true, 'temoin' => true]); ?>
        <?php endforeach; ?>
+19 −6
Changes for module/Application/view/application/structure/partial/agents.phtml: 19 added lines, 6 removed lines.
Original line number Diff line number Diff line
@@ -6,6 +6,7 @@
 */

use Application\Entity\Db\Agent;
use Application\Entity\Db\AgentGrade;
use Application\Entity\Db\Structure;
use Application\Provider\Privilege\AgentPrivileges;
use Application\Provider\Privilege\FichePostePrivileges;
@@ -30,7 +31,7 @@ $canDetruireFichePoste = $this->isAllowed(FichePostePrivileges::getResource
    <thead>
    <tr>
        <th>Dénomination</th>
<!--        <th>Statut</th>-->
        <th>Statut</th>
        <th>Grade</th>
<!--        <th>Poste</th>-->
        <th>Fiche</th>
@@ -52,14 +53,26 @@ $canDetruireFichePoste = $this->isAllowed(FichePostePrivileges::getResource
                    <?php echo $agent->getDenomination(); ?>
                <?php endif; ?>
            </td>
<!--            <td>-->
<!--                --><?php //foreach ($agent->getStatutsActifs() as $statut) : ?>
<!--                    --><?php //echo$this->agentStatut($statut, ['structure'=> true, 'periode' => true, 'temoin' => true]); ?>
<!--                --><?php //endforeach; ?>
<!--            </td>-->
            <td>
                <?php $temoins = [ 'C.D.D.' => false, 'C.D.I.' => false, 'Titulaire' => false]; ?>
                <?php foreach ($agent->getStatutsActifs() as $statut) : ?>
                    <?php if ($statut->isCdd()) $temoins['C.D.D'] = true; ?>
                    <?php if ($statut->isCdi()) $temoins['C.D.I'] = true; ?>
                    <?php if ($statut->isTitulaire()) $temoins['Titulaire'] = true; ?>
                <?php endforeach; ?>
                <ul>
                    <?php foreach ($temoins as $temoin => $valeur) : ?>
                        <?php if ($valeur === true) : ?>
                            <li> <?php echo $temoin; ?></li>
                        <?php endif; ?>
                    <?php endforeach; ?>
                </ul>
            </td>
            <td>
                <?php /** @var AgentGrade $grade */ ?>
                <?php foreach ($agent->getGradesActifs() as $grade) : ?>
                    <?php echo $grade->getStructure()->getLibelleCourt(); ?> <br/>
                    BAP <?php echo ($grade->getBap())?$grade->getBap()->getCategorie():"???"; ?> -
                    <?php echo $grade->getGrade()->getLibelleCourt(); ?>
                <?php endforeach; ?>
            </td>