diff --git a/src/Bundle/ChillMainBundle/Controller/WorkflowController.php b/src/Bundle/ChillMainBundle/Controller/WorkflowController.php index 17b5db75e..7383519e4 100644 --- a/src/Bundle/ChillMainBundle/Controller/WorkflowController.php +++ b/src/Bundle/ChillMainBundle/Controller/WorkflowController.php @@ -318,6 +318,7 @@ class WorkflowController extends AbstractController } // TODO symfony 5: add those "future" on context ($workflow->apply($entityWorkflow, $transition, $context) + $entityWorkflow->futureCcUsers = $transitionForm['future_cc_users']->getData(); $entityWorkflow->futureDestUsers = $transitionForm['future_dest_users']->getData(); $entityWorkflow->futureDestEmails = $transitionForm['future_dest_emails']->getData(); diff --git a/src/Bundle/ChillMainBundle/Entity/Workflow/EntityWorkflow.php b/src/Bundle/ChillMainBundle/Entity/Workflow/EntityWorkflow.php index c448ea19e..f2135f3d7 100644 --- a/src/Bundle/ChillMainBundle/Entity/Workflow/EntityWorkflow.php +++ b/src/Bundle/ChillMainBundle/Entity/Workflow/EntityWorkflow.php @@ -41,6 +41,13 @@ class EntityWorkflow implements TrackCreationInterface, TrackUpdateInterface use TrackUpdateTrait; + /** + * a list of future cc users for the next steps. + * + * @var array|User[] + */ + public array $futureCcUsers = []; + /** * a list of future dest emails for the next steps. * diff --git a/src/Bundle/ChillMainBundle/Form/WorkflowStepType.php b/src/Bundle/ChillMainBundle/Form/WorkflowStepType.php index e01c7d4b6..576e203b0 100644 --- a/src/Bundle/ChillMainBundle/Form/WorkflowStepType.php +++ b/src/Bundle/ChillMainBundle/Form/WorkflowStepType.php @@ -155,6 +155,11 @@ class WorkflowStepType extends AbstractType 'multiple' => true, 'mapped' => false, ]) + ->add('future_cc_users', PickUserDynamicType::class, [ + 'label' => 'workflow.cc for next steps', + 'multiple' => true, + 'mapped' => false, + ]) ->add('future_dest_emails', ChillCollectionType::class, [ 'label' => 'workflow.dest by email', 'help' => 'workflow.dest by email help', diff --git a/src/Bundle/ChillMainBundle/Resources/views/Workflow/_decision.html.twig b/src/Bundle/ChillMainBundle/Resources/views/Workflow/_decision.html.twig index bd9274739..021b7e933 100644 --- a/src/Bundle/ChillMainBundle/Resources/views/Workflow/_decision.html.twig +++ b/src/Bundle/ChillMainBundle/Resources/views/Workflow/_decision.html.twig @@ -65,6 +65,8 @@
{{ form_row(transition_form.future_dest_users) }} + {{ form_row(transition_form.future_cc_users) }} + {{ form_row(transition_form.future_dest_emails) }}
diff --git a/src/Bundle/ChillMainBundle/translations/messages.fr.yml b/src/Bundle/ChillMainBundle/translations/messages.fr.yml index f01976e87..5eb6c1d49 100644 --- a/src/Bundle/ChillMainBundle/translations/messages.fr.yml +++ b/src/Bundle/ChillMainBundle/translations/messages.fr.yml @@ -447,6 +447,7 @@ workflow: Created by: Créé par My decision: Ma décision Next step: Prochaine étape + cc for next steps: Utilisateurs en copie dest for next steps: Utilisateurs qui valideront la prochaine étape Freeze: Geler Freezed: Gelé diff --git a/src/Bundle/ChillMainBundle/translations/messages.nl.yml b/src/Bundle/ChillMainBundle/translations/messages.nl.yml index 97341dd3c..b585c3822 100644 --- a/src/Bundle/ChillMainBundle/translations/messages.nl.yml +++ b/src/Bundle/ChillMainBundle/translations/messages.nl.yml @@ -373,6 +373,7 @@ workflow: Created by: Créé par My decision: Ma décision Next step: Prochaine étape + cc for next steps: Utilisateurs en copie dest for next steps: Utilisateurs qui valideront la prochaine étape Freeze: Geler Freezed: Gelé