From dd006b2c59c6c4f99ad7ba66739bb235141169e0 Mon Sep 17 00:00:00 2001
From: Jean-Philippe Metivier <jean-philippe.metivier@unicaen.fr>
Date: Fri, 4 Apr 2025 15:59:30 +0200
Subject: [PATCH] Correction de l'envoi du refus vers l'agent et non plus
 seulement le responsable

---
 .../src/Service/Notification/NotificationService.php           | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/module/DemandeExterne/src/Service/Notification/NotificationService.php b/module/DemandeExterne/src/Service/Notification/NotificationService.php
index eec40675..7520e624 100644
--- a/module/DemandeExterne/src/Service/Notification/NotificationService.php
+++ b/module/DemandeExterne/src/Service/Notification/NotificationService.php
@@ -135,8 +135,9 @@ class NotificationService extends \Application\Service\Notification\Notification
     {
         $agent = $demande->getAgent();
         $vars = $this->generateVariableArray($demande);
+        $adresses = $agent->getEmail() . ",". $this->getMailsSuperieursByAgent($agent);
         $mail = $this->generateAndSend(
-            MailTemplates::DEMANDE_EXTERNE_VALIDATION_REFUS, $this->getMailsSuperieursByAgent($agent),
+            MailTemplates::DEMANDE_EXTERNE_VALIDATION_REFUS, $adresses,
             [$demande->generateTag()], $vars);
         return $mail;
     }
-- 
GitLab