mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-22 23:53:50 +00:00
Add support for user signatures in workflow transitions
This update introduces the ability to specify user signatures in workflow transitions. It allows a nullable user to be declared that may be requested to apply a signature. The code now handles the use-case of signing a transition by a user in addition to previous functionality of having it signed by a "Person" entity. Corresponding tests are also updated to validate this new feature.
This commit is contained in:
@@ -13,6 +13,7 @@ namespace Chill\MainBundle\Workflow;
|
||||
|
||||
use Chill\MainBundle\Entity\User;
|
||||
use Chill\MainBundle\Entity\Workflow\EntityWorkflow;
|
||||
use Chill\PersonBundle\Entity\Person;
|
||||
use Symfony\Component\Validator\Constraints as Assert;
|
||||
use Symfony\Component\Validator\Context\ExecutionContextInterface;
|
||||
use Symfony\Component\Workflow\Transition;
|
||||
@@ -52,10 +53,17 @@ class WorkflowTransitionContextDTO
|
||||
public array $futureDestEmails = [];
|
||||
|
||||
/**
|
||||
* a list of future @see{Person} with will sign the next step.
|
||||
* A list of future @see{Person} with will sign the next step.
|
||||
*
|
||||
* @var list<Person>
|
||||
*/
|
||||
public array $futurePersonSignatures = [];
|
||||
|
||||
/**
|
||||
* An eventual user which is requested to apply a signature.
|
||||
*/
|
||||
public ?User $futureUserSignature = null;
|
||||
|
||||
public ?Transition $transition = null;
|
||||
|
||||
public string $comment = '';
|
||||
|
Reference in New Issue
Block a user