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

Exploitation de la nouvelle adresse

parent df5cdd47
Loading
Loading
Loading
Loading
+13 −0
Changes for module/Soutenance/config/others/proposition.config.php: 13 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -127,6 +127,7 @@ return [
                    'controller' => PropositionController::class,
                    'action' => [
                        'supprimer-adresse',
                        'demander-adresse',
                    ],
                    'privileges' => [
                        PropositionPrivileges::PROPOSITION_MODIFIER_GESTION,
@@ -289,6 +290,18 @@ return [
                                    ],
                                ],
                            ],
                            'demander-adresse' => [
                                'type' => Segment::class,
                                'may_terminate' => true,
                                'options' => [
                                    'route' => '/demander-adresse/:proposition',
                                    'defaults' => [
                                        /** @see PropositionController::demanderAdresseAction() */
                                        'controller' => PropositionController::class,
                                        'action' => 'demander-adresse',
                                    ],
                                ],
                            ],
                            'horodatages' => [
                                'type' => Segment::class,
                                'may_terminate' => true,
+19 −0
Changes for module/Soutenance/src/Soutenance/Controller/PropositionController.php: 19 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -956,6 +956,25 @@ class PropositionController extends AbstractController
        return $vm;
    }

    public function demanderAdresseAction(): Response
    {
        $proposition = $this->getPropositionService()->getRequestedProposition($this);
        $these = $proposition->getThese();

        try {
            $notif = $this->soutenanceNotificationFactory->createNotificationDemandeAdresse($proposition);
            if (empty($notif->getTo())) {
                throw new RuntimeException(
                    "Aucune adresse mail trouvée pour les aspects Doctorat de l'établissement d'inscription '{$these->getEtablissement()}'");
            }
            $this->notifierService->trigger($notif);
        } catch (\Notification\Exception\RuntimeException $e) {
            // aucun destinataire , todo : cas à gérer !
        }

        return $this->redirect()->toRoute('soutenance/proposition', ['these' => $these->getId()], [], true);
    }

    /** Error *********************************************************************************************************/

    /**
+3 −0
Changes for module/Soutenance/src/Soutenance/Provider/Template/MailTemplates.php: 3 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -33,4 +33,7 @@ class MailTemplates
    const SOUTENANCE_STOP_DEMARCHE                      = 'SOUTENANCE_STOP_DEMARCHE';
    const SOUTENANCE_CONVOCATION_DOCTORANT              = 'SOUTENANCE_CONVOCATION_DOCTORANT';
    const SOUTENANCE_CONVOCATION_MEMBRE                 = 'SOUTENANCE_CONVOCATION_MEMBRE';

    /** DEMANDE DOSSIERS */
    const DEMANDE_ADRESSE_EXACTE                        = 'DEMANDE_ADRESSE_EXACTE';
}
 No newline at end of file
+4 −0
Changes for module/Soutenance/src/Soutenance/Service/Exporter/Convocation/convocation_doctorant.phtml: 4 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -100,6 +100,9 @@ $civilite = ($these->getDoctorant()->getIndividu()->getCivilite() === 'M.')?"Mon
                Date manquante,
        </span>
    <?php endif; ?> à l'adresse suivante : <br/>
    <?php if ($proposition->getAdresseActive() !== null): ?>
        <?php echo $proposition->getAdresseActive()->format(); ?>
    <?php else : ?>
        <?php if ($proposition->getAdresse() !== null) : ?>
            <?php echo $proposition->getAdresse(); ?>
        <?php else : ?>
@@ -108,6 +111,7 @@ $civilite = ($these->getDoctorant()->getIndividu()->getCivilite() === 'M.')?"Mon
            </span>
        <br/>
        <?php endif; ?>
    <?php endif; ?>
</p>

<p>
+5 −1
Changes for module/Soutenance/src/Soutenance/Service/Exporter/Convocation/convocation_membre.phtml: 5 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -130,9 +130,12 @@ $texte_directeur = implode(" et ", $encadrement);
        <?php echo $proposition->getDate()->format('d/m/Y à H:i'); ?>
    <?php else : ?>
        <span style='background-color:red;'>
                Date manquante
                Date manquante,
        </span>
    <?php endif; ?> à l'adresse suivante : <br/>
    <?php if ($proposition->getAdresseActive() !== null): ?>
        <?php echo $proposition->getAdresseActive()->format(); ?>
    <?php else : ?>
        <?php if ($proposition->getAdresse() !== null) : ?>
            <?php echo $proposition->getAdresse(); ?>
        <?php else : ?>
@@ -141,6 +144,7 @@ $texte_directeur = implode(" et ", $encadrement);
            </span>
            <br/>
        <?php endif; ?>
    <?php endif; ?>
</p>

<p>
Loading