Commit c6c42dcf authored by Stephane Bouvry's avatar Stephane Bouvry
Browse files

- Les rappels des jalons précise un texte de delai (Dans X temps)

parent 611fdc97
Loading
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -451,6 +451,7 @@ class NotificationService implements UseServiceContainer
    public function updateNotificationCoreMilestone(Activity $activity): void
    {
        $hashs = [];
        Moment::setLocale('fr_FR');

        /** @var ActivityDate $milestone */
        foreach ($activity->getMilestones() as $milestone) {
@@ -494,8 +495,11 @@ class NotificationService implements UseServiceContainer

            // Les rappels configurés dans le le type de jalon
            foreach ($milestone->getRecursivityDate() as $dateRappel) {
                $moment = new Moment($milestone->getDateStartStr('Y-m-d'));
                $dateDiff = $moment->from($dateRappel->format('Y-m-d'));
                $delayStr = $dateDiff->getRelative();
                $hashs[] = $this->buildNotificationCore(
                    $message,
                    $message . ' RAPPEL ' . $delayStr,
                    Notification::OBJECT_ACTIVITY,
                    $activity->getId(),
                    $context,