Commit 8a7de283 authored by Laurent Lecluse's avatar Laurent Lecluse
Browse files

Merge branch 'Bootstrap_5' of https://git.unicaen.fr/open-source/OSE into Bootstrap_5

parents 6b0e2882 ab2ea426
Loading
Loading
Loading
Loading
+1 −0
Changes for CHANGELOG.md: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -10,6 +10,7 @@
* Les modèles de contrats de travail sont maintenant gérés comme n'importe quel autre état de sortie
* Reconduction de l'offre de formation pour les éléments de OSE porté par un élément synchroniser
* Possibilité de rentrer un taux de charge par statut d'intervenant
* Ajout d'un paramétre par statut pour la possibilité de télécharger le contrat par l'intervenant 

## Corrections de bugs

+12 −0
Changes for data/ddl/table/STATUT.php: 12 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -189,6 +189,18 @@ return [
            'position'    => 50,
            'commentaire' => NULL,
        ],
        'CONTRAT_GENERATION'                  => [
            'name'        => 'CONTRAT_GENERATION',
            'type'        => 'bool',
            'bdd-type'    => 'NUMBER',
            'length'      => 0,
            'scale'       => '0',
            'precision'   => 1,
            'nullable'    => FALSE,
            'default'     => '0',
            'position'    => 50,
            'commentaire' => NULL,
        ],
        'CONTRAT_ETAT_SORTIE_ID'         => [
            'name'        => 'CONTRAT_ETAT_SORTIE_ID',
            'type'        => 'int',
+1 −0
Changes for module/Intervenant/src/Entity/Db/Mapping/Intervenant.Entity.Db.Statut.dcm.xml: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -65,6 +65,7 @@
        <field name="contrat" type="boolean" column="CONTRAT" nullable="false"/>
        <field name="contratVisualisation" type="boolean" column="CONTRAT_VISUALISATION" nullable="false"/>
        <field name="contratDepot" type="boolean" column="CONTRAT_DEPOT" nullable="false"/>
        <field name="contratGeneration" type="boolean" column="CONTRAT_GENERATION" nullable="false"/>
        <many-to-one field="contratEtatSortie" target-entity="Application\Entity\Db\EtatSortie">
            <join-column name="CONTRAT_ETAT_SORTIE_ID" referenced-column-name="ID"/>
        </many-to-one>
+19 −0
Changes for module/Intervenant/src/Entity/Db/Statut.php: 19 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -122,6 +122,8 @@ class Statut implements ParametreEntityInterface, RoleInterface, ResourceInterfa

    private bool        $contratDepot                       = true;

    private bool        $contratGeneration                  = true;

    private bool        $servicePrevu                       = true;

    private bool        $servicePrevuVisualisation          = true;
@@ -971,6 +973,22 @@ class Statut implements ParametreEntityInterface, RoleInterface, ResourceInterfa



     public function getContratGeneration(): bool
    {
        return $this->contratGeneration;
    }



    public function setContratGeneration(bool $contratGeneration): Statut
    {
        $this->contratGeneration = $contratGeneration;

        return $this;
    }



    public function getServicePrevu(): bool
    {
        return $this->servicePrevu;
@@ -1398,6 +1416,7 @@ class Statut implements ParametreEntityInterface, RoleInterface, ResourceInterfa
            Privileges::CONTRAT_DEPOT_RETOUR_SIGNE                 => $this->contrat && $this->contratDepot,
            Privileges::MISE_EN_PAIEMENT_VISUALISATION_INTERVENANT => $this->paiementVisualisation,
            Privileges::CLOTURE_CLOTURE                            => $this->cloture && ($this->serviceRealiseEdition || $this->referentielRealiseEdition),
            Privileges::CONTRAT_CONTRAT_GENERATION                 => $this->contrat && $this->contratGeneration,
        ];

        return $privileges;
+10 −1
Changes for module/Intervenant/src/Form/StatutSaisieForm.php: 10 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -74,6 +74,7 @@ class StatutSaisieForm extends AbstractForm
            'conseilAcademiqueVisualisation',
            'contratVisualisation',
            'contratDepot',
            'contratGeneration',
            'modificationServiceDuVisualisation',
        ];

@@ -320,6 +321,7 @@ class StatutSaisieForm extends AbstractForm
                        'active'        => 'Activé mais non visible par l\'intervenant',
                        'visualisation' => 'Activé et visible par l\'intervenant',
                        'depot'         => 'Activé et contrat téléversable par l\'intervenant',
                        'generation'    => 'Activé et contrat téléchargeable et téléversable par l\'intervenant',
                    ],
                ],
                'hydrator' => [
@@ -327,8 +329,11 @@ class StatutSaisieForm extends AbstractForm
                        $access     = $statut->getContrat();
                        $visu       = $statut->getContratVisualisation();
                        $depot      = $statut->getContratDepot();
                        $generation = $statut->getContratGeneration();

                        if ($depot && $visu && $access) {
                        if ($generation && $depot && $visu && $access) {
                            return 'generation';
                        } elseif ($depot && $visu && $access) {
                            return 'depot';
                        } elseif ($visu && $access) {
                            return 'visualisation';
@@ -342,7 +347,10 @@ class StatutSaisieForm extends AbstractForm
                        $access     = false;
                        $visu       = false;
                        $depot      = false;
                        $generation = false;
                        switch ($value) {
                            case 'generation':
                                $generation = true;
                            case 'depot':
                                $depot = true;
                            case 'visualisation':
@@ -353,6 +361,7 @@ class StatutSaisieForm extends AbstractForm
                        $statut->setContrat($access);
                        $statut->setContratVisualisation($visu);
                        $statut->setContratDepot($depot);
                        $statut->setContratGeneration($generation);
                    },
                ],
            ],