Commit Graph

2818 Commits

Author SHA1 Message Date
7541238c1e Fix pipeline for LoadGenders file 2024-10-29 16:09:04 +01:00
34748dca76 Create a gender fixture 2024-10-29 15:55:25 +01:00
989fdad561 Add chill_path_force_return_path method to routing helper
Implemented a new Twig function `chill_path_force_return_path` to enforce a specific return path within the URL. Updated relevant template to utilize this new function for better control over URL routing and return path management.

OP#787
https://champs-libres.openproject.com/work_packages/787
2024-10-25 18:33:22 +02:00
182e2fc3af Set 'required' to false for Email field in UserGroupType form.
Changed the Email field's 'required' option to false, allowing it to be optional. This adjustment aims to improve the usability and flexibility of the UserGroupType form.
2024-10-25 11:18:38 +02:00
f750cfecac Show userGroup in workflow breadcrumb
related:

- https://champs-libres.openproject.com/wp/774
- OP#774
- Vendee/accent-suivi-developpement#1274
2024-10-24 16:15:49 +02:00
bf85e9bb71 When a user applies a signature in a workflow, the signer is the futureDestUser of the next step
See:
- Vendee/accent-suivi-developpement#1252
- https://champs-libres.openproject.com/wp/768
- OP#768
2024-10-24 15:49:59 +02:00
fd69568842 Add workflow guard to block external send without public view
Introduce `EntityWorkflowGuardSendExternalIfNoPublicView` class to prevent workflows from transitioning to an external send state if the entity lacks a public view. Included unit tests to verify functionality for entities both with and without public views.
2024-10-23 15:26:25 +02:00
a256307b82 Fix the triggering of the event goToGenerateWorkflow when relatedEntityId is not known
The component PickWorkflow emitted the event "goToGenerateWorkflow" when the normal behaviour is intercepted. But that event generated the link to create the workflow to pass it in the payload's event. That generation failed, causing the whole event to fail.

Now, if the link could not been generated, the link is a blank string. There is a supplementary parameter `isLinkValid`, boolean, inform if the link is valid or not.
2024-10-23 13:44:31 +02:00
19eb6f7ebb 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.
2024-10-23 11:41:20 +02:00
261bc88b5e Add suggested persons and third parties methods
Introduced getSuggestedPersons and getSuggestedThirdParties methods across various WorkflowHandlers. These methods integrate with ProvidePersonsAssociated and ProvideThirdPartiesAssociated services to fetch related entities, enhancing the workflow handling capabilities.
2024-10-23 11:41:19 +02:00
968835a262 Refactor user suggestion logic in workflow
Removed duplicate user suggestion handling from `WorkflowController` and centralized it in `WorkflowStepType`. This change simplifies the controller and makes user suggestion logic more maintainable.
2024-10-22 23:51:48 +02:00
85dc9bdb2f Add getSuggestedUsers method in EntityWorkflowManager
Implemented the method to retrieve a list of suggested users for an entity workflow, filtering out duplicates. Added corresponding unit tests to verify the method's functionality and ensure its correctness in various scenarios.
2024-10-22 23:35:13 +02:00
f1844ae02b Php cs fixes and phpstan 2024-10-22 15:56:41 +02:00
5dfa5e1e7f Advanced search fixed to work with new gender entity 2024-10-22 14:50:16 +02:00
588f02cdf4 Take Null value for gender into account and fix OnTheFly makeFetch 2024-10-22 14:48:16 +02:00
30b66d5806 Php cs fixes 2024-10-22 09:16:15 +02:00
527cf23d4f Fix Canceling of stale workflow cronjob
Refactor workflow cancellation logic to encapsulate transition checks in a dedicated method, and update CronJob handling to use entity workflows instead of IDs. Enhance test coverage to ensure proper handling and instantiate mocks for EntityManagerInterface.
2024-10-21 17:42:00 +02:00
d45de5405b Use the twig function chill_entity_render_string to render the person's name 2024-10-21 17:41:59 +02:00
7b322d7bab Rename signature templates by removing underscores
Standardized template names in WorkflowController and WorkflowAddSignatureController for better consistency. Updated references and renamed template files accordingly.
2024-10-21 17:41:59 +02:00
30ebd00693 Customize query to return ordered active gender entities 2024-10-21 16:18:50 +02:00
9416a19d85 Sanitize html for good measure 2024-10-21 15:39:05 +02:00
7f1764658a Add extends template on repository 2024-10-21 15:27:53 +02:00
74593a7d28 Use enumType in gender admin form 2024-10-21 15:14:38 +02:00
daef18408a fix the return type of the EntityWorkflowCreation constraint 2024-10-18 19:26:09 +02:00
91a4b45607 Add notification to user groups on workflow transition
Implemented NotificationToUserGroupsOnTransition to send group emails upon workflow completion. Also updated NotificationOnTransition to prevent double notifications and created a unit test for the new functionality.
2024-10-18 19:25:03 +02:00
29fa086fde Set return types to MetadataExtractor 2024-10-18 19:14:23 +02:00
508c4cd674 Add an email address ot UserGroup entity 2024-10-18 19:14:13 +02:00
9fe20b5e81 Show pending signatures in the person's search results 2024-10-15 15:15:32 +02:00
d8ded80582 Add an option "suggest_myself" on PickUserDynamicType and PickUserGroupOrUserDynamicType, and use this option in WorkflowStepType
This will suggest the current user in PickUserDynamicType
2024-10-15 11:31:25 +02:00
d283d62049 !fixup Automatically execute body renderer when posting an 2024-10-15 11:10:31 +02:00
6cd336922f Fix error when denormalizing empty array for pick third party dynampic type 2024-10-15 11:09:17 +02:00
13dbbb6741 Fix race condition in ChillCollectionType
In some dcase, the collection is not initialized when a showHide is launched before the collection is fully initialized.
2024-10-15 09:08:29 +02:00
1313b6f138 Automatically execute body renderer when posting an email in Chill
+ adaptation of services which already uses body renderer
2024-10-10 14:06:00 +02:00
3d53e7da65 Show the list of pending views in the workflows index page 2024-10-10 13:40:25 +02:00
8589bada3f Layout for the email to external 2024-10-10 13:40:07 +02:00
3f7c5d23dc Add return type hint to getTargets method
The getTargets method now explicitly returns an array, enhancing type safety and readability. This change ensures that the return type is clear to any developers interacting with this method.
2024-10-10 11:41:25 +02:00
78445f0d65 fixup! Add message handling for public view creation 2024-10-10 11:39:04 +02:00
c329a1f1f8 fixup! Add message handling for public view creation 2024-10-10 09:39:45 +02:00
82e2b9a0f6 Add message handling for public view creation
Introduce `PostPublicViewMessage` and `PostPublicViewMessageHandler` to handle external user views on public links by applying workflow transitions. Integrate with `WorkflowViewSendPublicController` and add relevant tests.
2024-10-09 21:39:27 +02:00
fa64f44cf1 php cs fixes 2024-10-09 16:49:40 +02:00
73d80af80a Fix getter in gender entity 2024-10-09 16:49:40 +02:00
363cbc8a76 Translate gender terms for admin templates 2024-10-09 16:49:40 +02:00
7520d746e8 Correct repository and normalizer 2024-10-09 16:49:40 +02:00
052e09cf64 Fixes phpstan 2024-10-09 16:49:40 +02:00
a47c8d916b Adjust translation logic for gender in vue components 2024-10-09 16:49:40 +02:00
37cfc035a3 Implement gender icon renderbox for vue components 2024-10-09 16:49:40 +02:00
2eb686ffdb Create gender API and adjust serialization of gender property 2024-10-09 16:49:40 +02:00
34e2a26d1e Fix display of icon field in gender admin form 2024-10-09 16:49:40 +02:00
789c977aba Use EnumType in form instead of ChoiceType for field genderTranslation 2024-10-09 16:49:40 +02:00
0ba93ec7c6 Remove 'unknown' gender enum 2024-10-09 16:49:40 +02:00