From b2488e2ff4bae9ea243d2259e06b123ff2b34799 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Fromme?= Date: Mon, 31 Aug 2026 15:30:22 +0200 Subject: [PATCH] feat: include jobprofile placeholder in email texts addresses #869armp40 --- config/email_texts.yaml | 8 ++++---- src/EventListener/EmailNotificationSubscriber.php | 2 ++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/config/email_texts.yaml b/config/email_texts.yaml index 843376d..5d631e5 100644 --- a/config/email_texts.yaml +++ b/config/email_texts.yaml @@ -63,11 +63,11 @@ texts: assignment_called_off: label: 'Reise abgesagt' - placeholders: ['destination'] + placeholders: ['destination', 'jobProfile'] subject: 'Die Reise zu deinem Einsatz wurde abgesagt' headline: 'Hallo aus Köln,' body: |- - leider mussten wir die Reise zu deinem Einsatz '{destination}' absagen, sodass dein Einsatz nicht stattfinden kann. + leider mussten wir die Reise zu deinem Einsatz als {jobProfile} ('{destination}') absagen, sodass dein Einsatz nicht stattfinden kann. Bitte entschuldige die Umstände! @@ -75,11 +75,11 @@ texts: disposition_called_off: label: 'Einsatz abgesagt' - placeholders: ['destination', 'reason'] + placeholders: ['destination', 'jobProfile', 'reason'] subject: 'Dein Einsatz wurde abgesagt' headline: 'Hallo aus Köln,' body: |- - leider mussten wir deinen Einsatz '{destination}' absagen, sodass dein Einsatz nicht stattfinden kann: + leider mussten wir deinen Einsatz als {jobProfile} ('{destination}') absagen, sodass dein Einsatz nicht stattfinden kann: {reason} diff --git a/src/EventListener/EmailNotificationSubscriber.php b/src/EventListener/EmailNotificationSubscriber.php index 62b83e2..2097f12 100644 --- a/src/EventListener/EmailNotificationSubscriber.php +++ b/src/EventListener/EmailNotificationSubscriber.php @@ -240,6 +240,7 @@ class EmailNotificationSubscriber implements EventSubscriberInterface $this->mailer->createAndSendText(EmailTextKey::DISPOSITION_CALLED_OFF, [ 'destination' => (string) $disposition->getAssignment()->getDestination(), + 'jobProfile' => $disposition->getAssignment()->getJobProfile()?->getName(), 'reason' => $disposition->getCalledOffReason(), ], [ 'to' => $teamer->getCommunication()->getEmail(), @@ -261,6 +262,7 @@ class EmailNotificationSubscriber implements EventSubscriberInterface $this->mailer->createAndSendText(EmailTextKey::ASSIGNMENT_CALLED_OFF, [ 'destination' => (string) $assignment->getDestination(), + 'jobProfile' => $assignment->getJobProfile()?->getName(), ], [ 'to' => $teamer->getCommunication()->getEmail(), ]);