mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
only prefill agents traitants of action if parcours has a referrer, otherwise null
This commit is contained in:
parent
4719a74307
commit
0943366d39
@ -16,6 +16,7 @@ and this project adheres to
|
||||
* [person-thirdparty]: fix quick-add of names that consist of multiple parts (eg. De Vlieger) within onthefly modal person/thirdparty
|
||||
* [search]: Order of birthdate fields changed in advanced search to avoid confusion.
|
||||
* [workflow]: Constraint added to workflow (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/675)
|
||||
* [action]: Agents traitants should be prefilled with referrer of the parcours or left empty if there is no referrer (https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/696)
|
||||
|
||||
## Test releases
|
||||
|
||||
|
@ -26,8 +26,9 @@ class AccompanyingPeriodWorkEventListener
|
||||
|
||||
public function prePersistAccompanyingPeriodWork(AccompanyingPeriodWork $work): void
|
||||
{
|
||||
if ($this->security->getUser() instanceof User) {
|
||||
$work->addReferrer($this->security->getUser());
|
||||
$referrer = $work->getAccompanyingPeriod()->getUser();
|
||||
if (null !== $referrer) {
|
||||
$work->addReferrer($referrer);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user