Commit 2d139c03 authored by Thomas Hamel's avatar Thomas Hamel
Browse files

Ajout d'un nouvel état pour la prop. de soutenance, maj CSS, amélioration UI présoutenance

parent 8b452e41
Loading
Loading
Loading
Loading
+20 −0
Changes for doc/release-notes/module_hdr/01_module_hdr.sql: 20 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -63,6 +63,26 @@ create table fichier_hdr
    est_annexe   boolean default false                                     not null
);

insert into soutenance_etat(id, code, libelle) values (nextval('soutenance_etat_id_seq'),'EN_COURS_SAISIE', 'En cours de saisie');
update soutenance_etat set code = 'EN_COURS_EXAMEN' where code = 'EN_COURS';

-- Mise à jour de l'état des propositions n'ayant pas encore de validation
UPDATE soutenance_proposition sp
SET etat_id = (
    SELECT id FROM soutenance_etat
    where code = 'EN_COURS_SAISIE'
)
WHERE NOT EXISTS (
    SELECT 1
    FROM validation_these vt
    WHERE vt.these_id = sp.these_id
)
  and type = 'SOUTENANCE_THESE_PROPOSITION'
  and etat_id = (
    SELECT id FROM soutenance_etat
    where code = 'EN_COURS_EXAMEN'
);

ALTER table soutenance_proposition
    add column type VARCHAR(255) NOT NULL default 'SOUTENANCE_THESE_PROPOSITION';
ALTER table soutenance_proposition
+10 −8
Changes for module/Application/src/Application/View/Helper/Etat/EtatViewHelper.php: 10 added lines, 8 removed lines.
Original line number Diff line number Diff line
@@ -32,6 +32,8 @@ class EtatViewHelper extends AbstractHelper
        $etatCode = $etat instanceof Etat ? $etat->getCode() : $etat;
        switch ($etatCode){
            case Etat::CODE_EN_COURS_SAISIE :
                $colorEtat = "#ffba00";
                break;
            case Etat::CODE_EN_COURS_VALIDATION :
            case These::ETAT_EN_COURS :
                $colorEtat = "#f1732d";
@@ -105,31 +107,31 @@ class EtatViewHelper extends AbstractHelper
        switch ($etatCode){
            case Etat::CODE_EN_COURS_SAISIE :
            case These::ETAT_EN_COURS :
                $etatTheseTextTooltip = $etat instanceof Etat ? $etat->getLibelle() : "En cours";
                $etatTextTooltip = $etat instanceof Etat ? $etat->getLibelle() : "En cours";
                break;
            case Etat::CODE_VALIDE:
            case Etat::CODE_REJETE:
            case Etat::CODE_EN_COURS_VALIDATION :
                $etatTheseTextTooltip = $etat->getLibelle();
                $etatTextTooltip = $etat->getLibelle();
                break;
            case Etat::CODE_ABANDONNE:
            case These::ETAT_ABANDONNEE:
                $etatTheseTextTooltip = "Abandonnée";
                $etatTextTooltip = "Abandonnée";
                break;
            case These::ETAT_TRANSFEREE :
                $etatTheseTextTooltip = "Transférée";
                $etatTextTooltip = "Transférée";
                break;
            case These::ETAT_SOUTENUE :
                if(!$resultat){
                    $etatTheseTextTooltip = "Soutenue (Résultat inconnu)";
                    $etatTextTooltip = "Soutenue (Résultat inconnu)";
                }else{
                    $etatTheseTextTooltip = $resultatString;
                    $etatTextTooltip = $resultatString;
                }
                break;
            default:
                $etatTheseTextTooltip = "";
                $etatTextTooltip = "";
        }

        return $etatTheseTextTooltip;
        return $etatTextTooltip;
    }
}
 No newline at end of file
+1 −1
Changes for module/HDR/view/hdr/hdr/identite.phtml: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -78,7 +78,7 @@ switch ($hdr->getEtatHDR()){
                <span class="icon icon-edit"></span>
                <?php echo $this->translate("Modifier la HDR"); ?>
            </a>
            <?php if ($hdr->getEtatHDR() === HDR::ETAT_EN_COURS): ?>
            <?php if ($proposition?->getEtat()->getCode() === Etat::EN_COURS_SAISIE): ?>
                <?php /**  @see \HDR\Controller\HDRController::demanderSaisieInfosSoutenanceAction() */ ?>
                <a href="<?php echo $this->url('hdr/demander-saisie-infos-soutenance', ['hdr' => $hdr->getId()], [], true) ?>"
                   data-bs-toggle = "tooltip"
+1 −1
Changes for module/Soutenance/src/Soutenance/Assertion/HDR/PropositionHDRAssertion.php: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -188,7 +188,7 @@ class PropositionHDRAssertion implements AssertionInterface {
                        return false;
                }
            case PropositionPrivileges::PROPOSITION_REVOQUER_STRUCTURE:
                if ($proposition->getEtat()->getCode() !== Etat::EN_COURS && $proposition->getEtat()->getCode() !== Etat::ETABLISSEMENT) return false;
                if ($proposition->getEtat()->getCode() !== Etat::EN_COURS_EXAMEN && $proposition->getEtat()->getCode() !== Etat::ETABLISSEMENT) return false;
                switch ($role) {
                    case Role::CODE_GEST_HDR:
                        $validations_GEST_HDR  = $this->getValidationHDRService()->getRepository()->findValidationByCodeAndHDR(TypeValidation::CODE_VALIDATION_PROPOSITION_BDD, $hdr);
+7 −6
Changes for module/Soutenance/src/Soutenance/Assertion/JustificatifAssertion.php: 7 added lines, 6 removed lines.
Original line number Diff line number Diff line
@@ -54,7 +54,8 @@ class JustificatifAssertion implements AssertionInterface {
        }

        $depasse = $date_soutenance && new DateTime() > $date_soutenance;
        $encours = ($proposition->getEtat()->getCode() === Etat::EN_COURS);
        $enCoursSaisie = ($proposition->getEtat()->getCode() === Etat::EN_COURS_SAISIE);
        $enCoursExamen = ($proposition->getEtat()->getCode() === Etat::EN_COURS_EXAMEN);

        $user = $this->userContextService->getIdentityDb();
        $role = $this->userContextService->getSelectedIdentityRole();
@@ -69,15 +70,15 @@ class JustificatifAssertion implements AssertionInterface {
                    case Role::CODE_GEST_HDR:
                        return ($role->getStructure() === $entity->getEtablissement()->getStructure());
                    case Role::CODE_DIRECTEUR_THESE :
                        return ($encours AND !$depasse and $this->getTheseService()->isDirecteur($entity, $user->getIndividu()));
                        return (($enCoursSaisie || $enCoursExamen) AND !$depasse and $this->getTheseService()->isDirecteur($entity, $user->getIndividu()));
                    case Role::CODE_CODIRECTEUR_THESE :
                        return ($encours AND !$depasse and $this->getTheseService()->isCoDirecteur($entity, $user->getIndividu()));
                        return (($enCoursSaisie || $enCoursExamen) AND !$depasse and $this->getTheseService()->isCoDirecteur($entity, $user->getIndividu()));
                    case Role::CODE_DOCTORANT :
                        return ($encours AND !$depasse and $this->getTheseService()->isDoctorant($entity, $user->getIndividu()));
                        return (($enCoursSaisie || $enCoursExamen) AND !$depasse and $this->getTheseService()->isDoctorant($entity, $user->getIndividu()));
                    case Role::CODE_HDR_CANDIDAT :
                        return ($encours AND !$depasse and $this->hdrService->isCandidat($entity, $user->getIndividu()));
                        return (($enCoursSaisie || $enCoursExamen) AND !$depasse and $this->hdrService->isCandidat($entity, $user->getIndividu()));
                    case Role::CODE_HDR_GARANT :
                        return ($encours AND !$depasse and $this->hdrService->isGarant($entity, $user->getIndividu()));
                        return (($enCoursSaisie || $enCoursExamen) AND !$depasse and $this->hdrService->isGarant($entity, $user->getIndividu()));
                }
                return false;
        }
Loading