From 05e86a3360b184d525e215e780415d271af16852 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Mon, 18 Sep 2023 15:17:26 +0200 Subject: [PATCH] adjust rendering of closing motive: indicate if isCanceledAccompanyingPeriod --- .../Templating/Entity/ClosingMotiveRender.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Templating/Entity/ClosingMotiveRender.php b/src/Bundle/ChillPersonBundle/Templating/Entity/ClosingMotiveRender.php index 0064a53d5..b574382ad 100644 --- a/src/Bundle/ChillPersonBundle/Templating/Entity/ClosingMotiveRender.php +++ b/src/Bundle/ChillPersonBundle/Templating/Entity/ClosingMotiveRender.php @@ -62,6 +62,7 @@ class ClosingMotiveRender implements ChillEntityRenderInterface private function renderStringRecursive(ClosingMotive $motive, string $existing, array $options) { $newExisting = $this->translatableStringHelper->localize($motive->getName()); + $isCancled = $motive->getIsCanceledAccompanyingPeriod() ? '( Annule le parcours )' : ''; if ($motive->hasParent()) { if ('' !== $existing) { @@ -70,7 +71,7 @@ class ClosingMotiveRender implements ChillEntityRenderInterface return $this->renderStringRecursive( $motive->getParent(), - $newExisting, + $newExisting . ' ' . $isCancled, $options ); } @@ -79,6 +80,6 @@ class ClosingMotiveRender implements ChillEntityRenderInterface return $newExisting . self::SEPARATOR . $existing; } - return $newExisting; + return $newExisting . ' ' . $isCancled; } }