mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Add suggested persons and third parties in form
Integrated suggested persons and third parties into the WorkflowStepType form. This enhancement auto-populates suggestion fields for better user experience. It ensures that the suggestion data for persons and third parties is readily available in the form configuration.
This commit is contained in:
parent
261bc88b5e
commit
19eb6f7ebb
@ -46,6 +46,8 @@ class WorkflowStepType extends AbstractType
|
|||||||
$place = $workflow->getMarking($entityWorkflow);
|
$place = $workflow->getMarking($entityWorkflow);
|
||||||
$placeMetadata = $workflow->getMetadataStore()->getPlaceMetadata(array_keys($place->getPlaces())[0]);
|
$placeMetadata = $workflow->getMetadataStore()->getPlaceMetadata(array_keys($place->getPlaces())[0]);
|
||||||
$suggestedUsers = $this->entityWorkflowManager->getSuggestedUsers($entityWorkflow);
|
$suggestedUsers = $this->entityWorkflowManager->getSuggestedUsers($entityWorkflow);
|
||||||
|
$suggestedThirdParties = $this->entityWorkflowManager->getSuggestedThirdParties($entityWorkflow);
|
||||||
|
$suggestedPersons = $this->entityWorkflowManager->getSuggestedPersons($entityWorkflow);
|
||||||
|
|
||||||
if (null === $options['entity_workflow']) {
|
if (null === $options['entity_workflow']) {
|
||||||
throw new \LogicException('if transition is true, entity_workflow should be defined');
|
throw new \LogicException('if transition is true, entity_workflow should be defined');
|
||||||
@ -155,6 +157,7 @@ class WorkflowStepType extends AbstractType
|
|||||||
'label' => 'workflow.signature_zone.person signatures',
|
'label' => 'workflow.signature_zone.person signatures',
|
||||||
'multiple' => true,
|
'multiple' => true,
|
||||||
'empty_data' => '[]',
|
'empty_data' => '[]',
|
||||||
|
'suggested' => $suggestedPersons,
|
||||||
])
|
])
|
||||||
->add('futureUserSignature', PickUserDynamicType::class, [
|
->add('futureUserSignature', PickUserDynamicType::class, [
|
||||||
'label' => 'workflow.signature_zone.user signature',
|
'label' => 'workflow.signature_zone.user signature',
|
||||||
@ -196,6 +199,7 @@ class WorkflowStepType extends AbstractType
|
|||||||
'help' => 'workflow.transition_destinee_third_party_help',
|
'help' => 'workflow.transition_destinee_third_party_help',
|
||||||
'multiple' => true,
|
'multiple' => true,
|
||||||
'empty_data' => [],
|
'empty_data' => [],
|
||||||
|
'suggested' => $suggestedThirdParties,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$builder
|
$builder
|
||||||
|
Loading…
x
Reference in New Issue
Block a user