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

Merge branch 'feature_sansobligation'

parents cc703fdb e303150a
Loading
Loading
Loading
Loading
+15 −1
Original line number Diff line number Diff line
Version 4.0.0 (18/10/2023)
Version 4.0.1 (18/10/2023)
====

Évolution
---
- Correction de l'oublie d'interface sur l'entite Fichier qui empêchait le dépôt de fichier
- Retrait de TODO rendu visible
- Décalage des mots clefs du CDREF qui étaient mal poisitionné


Modification en BD
---

```postgresql
-- Décalage des mots clefs du CREF mal positionnés
update unicaen_autoform_champ set mots_clefs=null where id=138;
update unicaen_autoform_champ set mots_clefs='CREF;6;VAE' where id=137;
update unicaen_autoform_champ set mots_clefs=null where id=129;
update unicaen_autoform_champ set mots_clefs='CREF;6;bilan' where id=134;
update unicaen_autoform_champ set mots_clefs=null where id=128;
update unicaen_autoform_champ set mots_clefs='CREF;6;periode' where id=130;
update unicaen_autoform_champ set mots_clefs=null where id=130;
update unicaen_autoform_champ set mots_clefs='CREF;6;conge' where id=135;
update unicaen_autoform_champ set mots_clefs=null where id=127;
update unicaen_autoform_champ set mots_clefs='CREF;6;ecarriere' where id=131;
update unicaen_autoform_champ set mots_clefs=null where id=136;
update unicaen_autoform_champ set mots_clefs='CREF;6;bcarriere' where id=132;
```

Evolution des librairies
+58 −0
Original line number Diff line number Diff line
Version 4.1.0 (xx/xx/2023)
====

Évolution
---


Modification en BD
---

```postgresql
create table entretienprofessionnel_agent_force_sansobligation
(
    id                    serial      not null
        constraint entretienprofessionnel_agent_force_sansobligation_pk
            primary key,
    agent_id              varchar(40) not null
        constraint ep_agent_force_sansobligation_agent_c_individu_fk
            references agent
            on delete cascade,
    campagne_id           integer     not null
        constraint ep_agent_force_sansobligation_campagne_id_fk
            references entretienprofessionnel_campagne
            on delete cascade,
    raison                text,
    histo_creation        timestamp   not null,
    histo_createur_id     integer     not null
        constraint ep_agent_force_sansobligation_unicaen_utilisateur_user_id_fk
            references unicaen_utilisateur_user,
    histo_modification    timestamp,
    histo_modificateur_id integer
        constraint ep_agent_force_sansobligation_unicaen_utilisateur_user_id_fk2
            references unicaen_utilisateur_user,
    histo_destruction     timestamp,
    histo_destructeur_id  integer
        constraint ep_agent_force_sansobligation_unicaen_utilisateur_user_id_fk3
            references unicaen_utilisateur_user
);
comment on table entretienprofessionnel_agent_force_sansobligation is 'Table listant les agents pour lesquels on a forcé le fait qu''ils n''avait pas d''obligation d''entretien professionnel';
```

Evolution des librairies
---



```bash
```

Ou réinstalle des libraires
```bash
rm -fr vendor
rm -fr composer.lock
composer install
```

Evolution des macros et templates
---
+0 −1
Original line number Diff line number Diff line
@@ -365,7 +365,6 @@ return [
            '975_logos'                 => 'css/logos.css',
            '976_environnement'         => 'css/environnement.css',
            '977_app' => 'css/app.css',
            '978_print' => 'css/print.css',
            '999_local' => 'css/local.css',
        ],
    ],
+14 −0
Original line number Diff line number Diff line
@@ -15,6 +15,7 @@ use Application\Service\Agent\AgentServiceAwareTrait;
use DateInterval;
use DateTime;
use Doctrine\Common\Collections\ArrayCollection;
use EntretienProfessionnel\Entity\Db\AgentForceSansObligation;
use EntretienProfessionnel\Entity\Db\Campagne;
use EntretienProfessionnel\Entity\Db\EntretienProfessionnel;
use Exception;
@@ -68,6 +69,7 @@ class Agent implements
    private Collection $fichiers;       /** Fichier[] */
    private Collection $missionsSpecifiques; /** AgentMissionSpecifique[] */
    private Collection $structuresForcees;  /** StructureAgentForce  */
    private Collection $forcesSansObligation;  /** StructureAgentForce  */

    private Collection $autorites;      /** AgentAutorite[] */
    private Collection $superieurs;     /** AgentSuperieur[] */
@@ -81,6 +83,7 @@ class Agent implements
        $this->echelons = new ArrayCollection();
        $this->grades = new ArrayCollection();
        $this->structuresForcees = new ArrayCollection();
        $this->forcesSansObligation = new ArrayCollection();

        $this->autorites = new ArrayCollection();
        $this->superieurs = new ArrayCollection();
@@ -319,6 +322,17 @@ class Agent implements
        return $structures;
    }

    /** SANS OBLIGATION ***********************************************************************************************/

    public function isForceSansObligation(Campagne $campagne): bool
    {
        /** @var AgentForceSansObligation $forcage */
        foreach ($this->forcesSansObligation as $forcage) {
            if ($forcage->estNonHistorise() && $forcage->getCampagne() === $campagne) return true;
        }
        return false;
    }

    /** FICHES POSTES *************************************************************************************************/

    /**
+1 −0
Original line number Diff line number Diff line
@@ -60,6 +60,7 @@

        <one-to-many target-entity="EntretienProfessionnel\Entity\Db\EntretienProfessionnel" mapped-by="agent" field="entretiens"/>
        <one-to-many target-entity="Structure\Entity\Db\StructureAgentForce" mapped-by="agent" field="structuresForcees"/>
        <one-to-many target-entity="EntretienProfessionnel\Entity\Db\AgentForceSansObligation" mapped-by="agent" field="forcesSansObligation"/>

        <many-to-many field="fichiers" target-entity="Fichier\Entity\Db\Fichier" inversed-by="fichier" fetch="LAZY">
            <join-table name="agent_fichier">
Loading