From 6c3fa5cb98b2889e40f1d777f2edc4769ef39be1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Thu, 25 May 2023 15:22:52 +0200 Subject: [PATCH 1/2] Fixed: [UI] in designation and redispatch list, the period's statuses were'nt shown correctly --- .../views/AccompanyingPeriod/_list_item.html.twig | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingPeriod/_list_item.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingPeriod/_list_item.html.twig index 6c7fbf7c0..47b8c8a15 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingPeriod/_list_item.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingPeriod/_list_item.html.twig @@ -16,11 +16,13 @@
{% if period.step == 'DRAFT' %} - {{- 'Draft'|trans|upper -}} - {% elseif period.step == 'CONFIRMED' %} - {{- 'Confirmed'|trans|upper -}} - {% else %} - {{- 'Closed'|trans|upper -}} + {{ 'course.draft'|trans }} + {% elseif period.step == 'CLOSED' %} + {{ 'course.closed'|trans }} + {% elseif period.step == 'CONFIRMED_INACTIVE_SHORT' %} + {{ 'course.inactive_short'|trans }} + {% elseif period.step == 'CONFIRMED_INACTIVE_LONG' %} + {{ 'course.inactive_long'|trans }} {% endif %}
From b679dbe26ccf27a097dce62ae2590a6bfe5b1f64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Thu, 25 May 2023 15:24:14 +0200 Subject: [PATCH 2/2] Fixed: Do not send a confirmation message when period is mark_active back --- .../AccompanyingPeriod/Events/UserRefEventSubscriber.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Bundle/ChillPersonBundle/AccompanyingPeriod/Events/UserRefEventSubscriber.php b/src/Bundle/ChillPersonBundle/AccompanyingPeriod/Events/UserRefEventSubscriber.php index 8d7249928..50e7dcabb 100644 --- a/src/Bundle/ChillPersonBundle/AccompanyingPeriod/Events/UserRefEventSubscriber.php +++ b/src/Bundle/ChillPersonBundle/AccompanyingPeriod/Events/UserRefEventSubscriber.php @@ -51,7 +51,10 @@ class UserRefEventSubscriber implements EventSubscriberInterface public function onStateEntered(EnteredEvent $enteredEvent): void { - if ($enteredEvent->getMarking()->has(AccompanyingPeriod::STEP_CONFIRMED)) { + if ( + $enteredEvent->getMarking()->has(AccompanyingPeriod::STEP_CONFIRMED) + and $enteredEvent->getTransition()->getName() === 'confirm' + ) { $this->onPeriodConfirmed($enteredEvent->getSubject()); } }