Feature: Add new field ccuser in workflow step form

This commit is contained in:
nobohan 2023-03-21 16:08:26 +01:00
parent cbc3ee68b5
commit 2b3d7f34fc
6 changed files with 17 additions and 0 deletions

View File

@ -330,6 +330,7 @@ class WorkflowController extends AbstractController
} }
// TODO symfony 5: add those "future" on context ($workflow->apply($entityWorkflow, $transition, $context) // 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->futureDestUsers = $transitionForm['future_dest_users']->getData();
$entityWorkflow->futureDestEmails = $transitionForm['future_dest_emails']->getData(); $entityWorkflow->futureDestEmails = $transitionForm['future_dest_emails']->getData();

View File

@ -41,6 +41,13 @@ class EntityWorkflow implements TrackCreationInterface, TrackUpdateInterface
use TrackUpdateTrait; 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. * a list of future dest emails for the next steps.
* *

View File

@ -156,6 +156,11 @@ class WorkflowStepType extends AbstractType
'mapped' => false, 'mapped' => false,
'suggested' => $options['suggested_users'], 'suggested' => $options['suggested_users'],
]) ])
->add('future_cc_users', PickUserDynamicType::class, [
'label' => 'workflow.cc for next steps',
'multiple' => true,
'mapped' => false,
])
->add('future_dest_emails', ChillCollectionType::class, [ ->add('future_dest_emails', ChillCollectionType::class, [
'label' => 'workflow.dest by email', 'label' => 'workflow.dest by email',
'help' => 'workflow.dest by email help', 'help' => 'workflow.dest by email help',

View File

@ -65,6 +65,8 @@
<div id="futureDests"> <div id="futureDests">
{{ form_row(transition_form.future_dest_users) }} {{ form_row(transition_form.future_dest_users) }}
{{ form_row(transition_form.future_cc_users) }}
{{ form_row(transition_form.future_dest_emails) }} {{ form_row(transition_form.future_dest_emails) }}
</div> </div>

View File

@ -447,6 +447,7 @@ workflow:
Created by: Créé par Created by: Créé par
My decision: Ma décision My decision: Ma décision
Next step: Prochaine étape Next step: Prochaine étape
cc for next steps: Utilisateurs en copie
dest for next steps: Utilisateurs qui valideront la prochaine étape dest for next steps: Utilisateurs qui valideront la prochaine étape
Freeze: Geler Freeze: Geler
Freezed: Gelé Freezed: Gelé

View File

@ -373,6 +373,7 @@ workflow:
Created by: Créé par Created by: Créé par
My decision: Ma décision My decision: Ma décision
Next step: Prochaine étape Next step: Prochaine étape
cc for next steps: Utilisateurs en copie
dest for next steps: Utilisateurs qui valideront la prochaine étape dest for next steps: Utilisateurs qui valideront la prochaine étape
Freeze: Geler Freeze: Geler
Freezed: Gelé Freezed: Gelé