Add TransitionHasSignerIfSignature validator

Introduced a new validator `TransitionHasSignerIfSignature` to enforce that a signature transition must have a designated signer. Included related tests, updated DTO annotations, and added translations for new validation messages.
This commit is contained in:
2024-11-07 19:55:09 +01:00
parent b6c141a785
commit e5148f603b
5 changed files with 273 additions and 0 deletions

View File

@@ -16,6 +16,7 @@ use Chill\MainBundle\Entity\UserGroup;
use Chill\MainBundle\Entity\Workflow\EntityWorkflow;
use Chill\MainBundle\Workflow\Validator\TransitionHasDestineeIfIsSentExternal;
use Chill\MainBundle\Workflow\Validator\TransitionHasDestUserIfRequired;
use Chill\MainBundle\Workflow\Validator\TransitionHasSignerIfSignature;
use Chill\PersonBundle\Entity\Person;
use Chill\ThirdPartyBundle\Entity\ThirdParty;
use Chill\ThirdPartyBundle\Validator\ThirdPartyHasEmail;
@@ -28,6 +29,7 @@ use Symfony\Component\Workflow\Transition;
*/
#[TransitionHasDestineeIfIsSentExternal]
#[TransitionHasDestUserIfRequired]
#[TransitionHasSignerIfSignature]
class WorkflowTransitionContextDTO
{
/**