Update the form to allow sending a workflow to an external destinee

OP#734 Modification du formulaire pour permettre l'envoi d'un workflow

https://champs-libres.openproject.com/work_packages/734
This commit is contained in:
2024-10-03 17:29:27 +02:00
parent da6589ba87
commit 071c5e3c55
7 changed files with 100 additions and 1 deletions

View File

@@ -15,6 +15,8 @@ use Chill\MainBundle\Entity\User;
use Chill\MainBundle\Entity\UserGroup;
use Chill\MainBundle\Entity\Workflow\EntityWorkflow;
use Chill\PersonBundle\Entity\Person;
use Chill\ThirdPartyBundle\Entity\ThirdParty;
use Chill\ThirdPartyBundle\Validator\ThirdPartyHasEmail;
use Symfony\Component\Validator\Constraints as Assert;
use Symfony\Component\Validator\Context\ExecutionContextInterface;
use Symfony\Component\Workflow\Transition;
@@ -54,6 +56,29 @@ class WorkflowTransitionContextDTO
*/
public ?User $futureUserSignature = null;
/**
* a list of future destinee third parties, when a workflow does send the document
* to a remote third party.
*
* @var array<ThirdParty>
*/
#[Assert\All(
new ThirdPartyHasEmail(),
)]
public array $futureDestineeThirdParties = [];
/**
* a list of future destinee emails, when a workflow does send the document to a remote
* email.
*
* @var array<string>
*/
#[Assert\All([
new Assert\NotBlank(),
new Assert\Email(),
])]
public array $futureDestineeEmails = [];
public ?Transition $transition = null;
public string $comment = '';