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

quotite d'affectation + garde campagne

parent 384ec8b0
Loading
Loading
Loading
Loading
+2 −0
Changes for documentation/release/3.1.5.md: 2 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -5,12 +5,14 @@
**Changements**

* Ajout des temoins hiérarchique et fonctionnelle pour les affectations
* Ajout du pourcentage de l'affectation pour les affectations

**Modifications de la base de donnée**

```sql
alter table agent_carriere_affectation add t_hierarchique varchar(1) default 'N';
alter table agent_carriere_affectation add t_fonctionnelle varchar(1) default 'N';
alter table agent_carriere_affectation add quotite integer;
```

**Évolution des bibliothèques**
+1 −1
Changes for module/Application/src/Application/Controller/AgentController.php: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -129,7 +129,7 @@ class AgentController extends AbstractActionController

        //Récupération des status
        $agentStatuts = $this->getAgentStatutService()->getAgentStatutsByAgent($agent);
        $agentAffectations = $this->getAgentAffectationService()->getAgentAffectationsByAgent($agent,true,true,false);
        $agentAffectations = $this->getAgentAffectationService()->getAgentAffectationsByAgent($agent,true,false,false);
        $agentGrades = $this->getAgentGradeService()->getAgentGradesByAgent($agent);

        //Récupération des supérieures et autorités
+6 −0
Changes for module/Application/src/Application/Entity/Db/AgentAffectation.php: 6 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@ class AgentAffectation implements HasPeriodeInterface {
    private ?string $principale = null;
    private ?string $hierarchique = null;
    private ?string $fonctionnelle = null;
    private ?int $quotite = null;

    public function getId() : ?int
    {
@@ -58,6 +59,11 @@ class AgentAffectation implements HasPeriodeInterface {
        return ($this->fonctionnelle === 'O');
    }

    public function getQuotite() : ?int
    {
        return $this->quotite;
    }

    /**
     * @param AgentAffectation[] $agentAffectations
     * @return string[]
+1 −0
Changes for module/Application/src/Application/Entity/Db/Mapping/Application.Entity.Db.AgentAffectation.dcm.xml: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@
        <field name="principale"              column="t_principale"     type="string" length="1"/>
        <field name="hierarchique"            column="t_hierarchique"   type="string" length="1"/>
        <field name="fonctionnelle"           column="t_fonctionnelle"  type="string" length="1"/>
        <field name="quotite"                 column="quotite"          type="integer"/>

        <!-- DB IMPORT #############################  -->
        <field name="created_on"               column="created_on"       type="datetime"/>
+22 −3
Changes for module/Application/src/Application/View/Helper/partial/agent-affectation.phtml: 22 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -15,6 +15,17 @@ $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);

$structure = null;
$niveau2 = null;
if ($affectation !== null) {
    $structure = $affectation->getStructure();
    if ($structure !== null) {
        if ($structure->getNiv2() !== null and $structure->getNiv2() !== $structure) {
            $niveau2 = $structure->getNiv2();
        }
    }
}
?>

<?php if($debug) : ?>
@@ -35,11 +46,15 @@ $displayTemoin = (isset($options['temoin']) AND $options['temoin'] !== fals
        <?php if ($affectation === null) : ?>
            Aucune affectation
        <?php else: ?>
            <?php if ($affectation->getStructure() === null) : ?>
            <?php if ($structure === null) : ?>
                Aucune structure
            <?php else : ?>
                <span class="badge structure" title="<?php echo $affectation->getStructure()->getLibelleLong(); ?>">
                    <?php echo $affectation->getStructure()->getLibelleCourt(); ?>
                <?php
                    $texte = ""; if ($niveau2) $texte = $niveau2->getLibelleCourt() . " > "; $texte .= $structure->getLibelleCourt();
                    $tooltip = "<strong>".$structure->getLibelleLong()."</strong>"; if ($niveau2) $tooltip .= "<br/> rattachée à <br/><strong>" . $niveau2->getLibelleLong() ."</strong>";
                ?>
                <span class="badge structure" title="<?php echo $tooltip; ?>" data-bs-toggle="tooltip" data-bs-html="true">
                    <?php echo $texte; ?>
                </span>
            <?php endif; ?>
        <?php endif; ?>
@@ -81,6 +96,10 @@ $displayTemoin = (isset($options['temoin']) AND $options['temoin'] !== fals
                </ul>
        <?php endif; ?>

        <?php if ($affectation->getQuotite() !== null) : ?>
        Quotité : <?php echo $affectation->getQuotite(); ?>%
        <?php endif; ?>

    </div>
</div>

Loading