diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/pick-postal-code/index.js b/src/Bundle/ChillMainBundle/Resources/public/module/pick-postal-code/index.js index 8771d20c2..14fd164e0 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/module/pick-postal-code/index.js +++ b/src/Bundle/ChillMainBundle/Resources/public/module/pick-postal-code/index.js @@ -39,18 +39,12 @@ function loadDynamicPickers(element) { apps.forEach(function(el) { - console.log('el', el); const uniqId = el.dataset.uniqid, input = document.querySelector(`input[data-input-uniqid="${uniqId}"]`), cityIdValue = input.value === '' ? null : input.value ; - console.log('uniqid', uniqId); - console.log('input', input); - console.log('input value', input.value); - console.log('cityIdValue', cityIdValue); - if (cityIdValue !== null) { makeFetch('GET', `/api/1.0/main/postal-code/${cityIdValue}.json`).then(city => { loadOnePicker(el, input, uniqId, city); diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/PickPostalCode/PickPostalCode.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/PickPostalCode/PickPostalCode.vue index 3c191b8c4..d5e55dbbd 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/PickPostalCode/PickPostalCode.vue +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/PickPostalCode/PickPostalCode.vue @@ -65,7 +65,6 @@ export default { return (value.code && value.name) ? `${value.name} (${value.code})` : ''; }, selectCity(city) { - console.log('city', city); this.$emit('selectCity', city); }, listenInputSearch(query) { diff --git a/src/Bundle/ChillPersonBundle/AccompanyingPeriod/Events/UserRefEventSubscriber.php b/src/Bundle/ChillPersonBundle/AccompanyingPeriod/Events/UserRefEventSubscriber.php index 9ab72bb2c..8d7249928 100644 --- a/src/Bundle/ChillPersonBundle/AccompanyingPeriod/Events/UserRefEventSubscriber.php +++ b/src/Bundle/ChillPersonBundle/AccompanyingPeriod/Events/UserRefEventSubscriber.php @@ -62,6 +62,7 @@ class UserRefEventSubscriber implements EventSubscriberInterface && $period->getUser() !== $this->security->getUser() && null !== $period->getUser() && $period->getStep() !== AccompanyingPeriod::STEP_DRAFT + && !$period->isPreventUserIsChangedNotification() ) { $this->generateNotificationToUser($period); } diff --git a/src/Bundle/ChillPersonBundle/Controller/ReassignAccompanyingPeriodController.php b/src/Bundle/ChillPersonBundle/Controller/ReassignAccompanyingPeriodController.php index c27362e17..91b834891 100644 --- a/src/Bundle/ChillPersonBundle/Controller/ReassignAccompanyingPeriodController.php +++ b/src/Bundle/ChillPersonBundle/Controller/ReassignAccompanyingPeriodController.php @@ -127,7 +127,7 @@ class ReassignAccompanyingPeriodController extends AbstractController $period = $this->courseRepository->find($periodId); if ($period->getUser() === $userFrom) { - $period->setUser($userTo); + $period->setUser($userTo, true); } } diff --git a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod.php b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod.php index 168be56b9..e2114f05d 100644 --- a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod.php +++ b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod.php @@ -265,6 +265,8 @@ class AccompanyingPeriod implements */ private ?Comment $pinnedComment = null; + private bool $preventUserIsChangedNotification = false; + /** * @ORM\Column(type="text") * @Groups({"read", "write"}) @@ -1048,6 +1050,11 @@ class AccompanyingPeriod implements return false; } + public function isPreventUserIsChangedNotification(): bool + { + return $this->preventUserIsChangedNotification; + } + public function isRequestorAnonymous(): bool { return $this->requestorAnonymous; @@ -1343,11 +1350,12 @@ class AccompanyingPeriod implements return $this; } - public function setUser(?User $user): self + public function setUser(?User $user, bool $preventNotification = false): self { if ($this->user !== $user) { $this->userPrevious = $this->user; $this->userIsChanged = true; + $this->preventUserIsChangedNotification = $preventNotification; foreach ($this->userHistories as $history) { if (null === $history->getEndDate()) {