diff --git a/src/Bundle/ChillMainBundle/Controller/WorkflowController.php b/src/Bundle/ChillMainBundle/Controller/WorkflowController.php index 4dd4fa6ea..789e8dc34 100644 --- a/src/Bundle/ChillMainBundle/Controller/WorkflowController.php +++ b/src/Bundle/ChillMainBundle/Controller/WorkflowController.php @@ -228,7 +228,6 @@ class WorkflowController extends AbstractController ); } - /** * @Route("/{_locale}/main/workflow/list/cc", name="chill_main_workflow_list_cc") */ diff --git a/src/Bundle/ChillMainBundle/Entity/Workflow/EntityWorkflowStep.php b/src/Bundle/ChillMainBundle/Entity/Workflow/EntityWorkflowStep.php index 8c27d0c3e..e43d524a4 100644 --- a/src/Bundle/ChillMainBundle/Entity/Workflow/EntityWorkflowStep.php +++ b/src/Bundle/ChillMainBundle/Entity/Workflow/EntityWorkflowStep.php @@ -126,19 +126,19 @@ class EntityWorkflowStep $this->accessKey = bin2hex(openssl_random_pseudo_bytes(32)); } - public function addDestEmail(string $email): self + public function addCcUser(User $user): self { - if (!in_array($email, $this->destEmail, true)) { - $this->destEmail[] = $email; + if (!$this->ccUser->contains($user)) { + $this->ccUser[] = $user; } return $this; } - public function addCcUser(User $user): self + public function addDestEmail(string $email): self { - if (!$this->ccUser->contains($user)) { - $this->ccUser[] = $user; + if (!in_array($email, $this->destEmail, true)) { + $this->destEmail[] = $email; } return $this; diff --git a/src/Bundle/ChillMainBundle/Form/WorkflowStepType.php b/src/Bundle/ChillMainBundle/Form/WorkflowStepType.php index 82271d30a..f48ae0084 100644 --- a/src/Bundle/ChillMainBundle/Form/WorkflowStepType.php +++ b/src/Bundle/ChillMainBundle/Form/WorkflowStepType.php @@ -160,7 +160,7 @@ class WorkflowStepType extends AbstractType 'label' => 'workflow.cc for next steps', 'multiple' => true, 'mapped' => false, - 'required' => false + 'required' => false, ]) ->add('future_dest_emails', ChillCollectionType::class, [ 'label' => 'workflow.dest by email', diff --git a/src/Bundle/ChillMainBundle/migrations/Version20230321134155.php b/src/Bundle/ChillMainBundle/migrations/Version20230321134155.php index 801d49e58..6f3fabb5d 100644 --- a/src/Bundle/ChillMainBundle/migrations/Version20230321134155.php +++ b/src/Bundle/ChillMainBundle/migrations/Version20230321134155.php @@ -2,6 +2,13 @@ declare(strict_types=1); +/* + * Chill is a software for social workers + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\Migrations\Main; use Doctrine\DBAL\Schema\Schema;