51 Commits

Author SHA1 Message Date
8a374864fa
update code style after upgrade rector and phpstan 2024-08-28 14:03:26 +02:00
bb848746d5
Merge branch 'upgrade-sf5' into signature-app-master 2024-08-28 13:23:12 +02:00
b0485dbcc8
Replace ArrayCollection with Collection&Selectable on some entity typing (fix previous commit)
Updated entity properties to use Collection&Selectable for better type safety and interoperability. This change affects User, Household, Calendar, Person, AccompanyingPeriod, and EntityWorkflow classes.
2024-08-28 12:04:43 +02:00
c16219dc6d
Force typing for ArrayIterator in EntityWorkflow 2024-08-28 11:48:24 +02:00
ad47804c91 Apply rector changes to Collection typing 2024-08-27 16:23:08 +02:00
85e2466611 Cherry-pick phpstan fixes after rector changes 2024-08-27 16:09:12 +02:00
db94af0958
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.
2024-07-10 12:47:02 +02:00
b5af9f7b63
Add futurePersonSignatures property to WorkflowTransitionContextDTO
A new property named futurePersonSignatures has been added to the WorkflowTransitionContextDTO class. This will hold a list of Person objects expected to sign the next step, improving the scope of information available within the workflow context.
2024-07-10 10:40:18 +02:00
7f3de62b2c
Move the metadata on each workflow transition from the event subscriber to the entity EntityWorkflow::setStep method
The main update is in the setStep method of EntityWorkflow, where parameters are added to capture the transition details. These include the exact transition, the user who made the transition and the time of transition.

The WorkflowController extracts this information and put it into the transition's context. The MarkingStore transfer it to the EntityWorkflow::setStep method, and all metadata are recorded within the entities themselve.
2024-07-10 10:40:17 +02:00
a309cc0774
Refactor workflow classes and forms
- the workflow controller add a context to each transition;
- the state of the entity workflow is applyied using a dedicated marking store
- the method EntityWorkflow::step use the context to associate the new step with the future destination user, cc users and email. This makes the step consistent at every step.
- this allow to remove some logic which was processed in eventSubscribers,
- as counterpart, each workflow must specify a dedicated marking_store:

```yaml
framework:
    workflows:
        vendee_internal:
            # ...
            marking_store:
                service: Chill\MainBundle\Workflow\EntityWorkflowMarkingStore
```
2024-07-02 08:30:28 +02:00
3db4fff80d
Add signature functionality to workflow entities
Created new files to add signature functionality to the workflow entities, including signature state enums and signature metadata. Added these changes to the migration script as well. Updated EntityWorkflowStep to include a collection for signatures.
2024-07-01 14:50:03 +02:00
06dd7dd4f5
apply rector rules 2024-05-28 14:58:09 +02:00
73d6578a3a
Fix workflow configuration 2024-04-29 15:28:24 +02:00
5be85a4fc6
Refactored code to use PHP8 attributes instead of annotations
In this change, Doctrine and validation annotations have been replaced with PHP8 Attributes. The Rector tool has been configured with a list of annotations to convert to attributes. As a consequence, the PHPStan's rules have been updated to reflect these changes. The PHP8's nullable operator (?) has been added where required, and comments in field declaration have been replaced with #[Attribute] syntax.
2024-04-08 12:11:29 +02:00
0ff4593863
Apply rector rules: add annotation for doctrine mapping 2024-04-05 13:11:42 +02:00
72016e1a21
Apply rector rules: add annotation for doctrine mapping 2024-04-05 00:01:30 +02:00
579bd829f8
Apply rector rules: symfony up to 54 2024-04-04 23:30:25 +02:00
bc2041cbdd
apply more cs rules for php-cs 2023-10-17 13:27:03 +02:00
075aca493b
DX: type-hing oneToMany and ManyToMany properties as collection 2023-07-19 16:21:17 +02:00
dde3002100
DX: apply rector rules up to php8.0 2023-04-28 22:30:33 +02:00
746ed4f5e5
DX: fix cs 2023-04-15 00:43:55 +02:00
858ade467c
DX: rector rules upt to PHP 74 2023-04-15 00:20:19 +02:00
a21637331f
Fixed: [workflow] validation of users in cc and dest
The validation is processed at the form step, so before the transition is processed
2023-04-13 12:24:44 +02:00
nobohan
8c37afa3a9 Feature: add cc users in workflow: add constraint validation on EntityWorkflowStep 2023-03-29 12:09:12 +02:00
nobohan
a3db67fd1e Add users in cc in workflow: fix code style 2023-03-29 11:19:52 +02:00
nobohan
2b3d7f34fc Feature: Add new field ccuser in workflow step form 2023-03-29 11:19:51 +02:00
nobohan
cbc3ee68b5 Feature: Add new field ccuser in workflow step entity 2023-03-29 11:19:51 +02:00
eaea702454 FIX add initial user as suggestion and fix error when there are no suggestions 2023-03-15 10:14:25 +01:00
67e68ac149 FIX [review] processing review, but stuck at transformation of json string to array 2023-03-15 09:37:56 +01:00
4c7a16587b [workflow][method] add method to get involved/suggested users 2023-03-15 09:37:56 +01:00
7915aae86f
Feature: [workflow] do not send a notification for each step to creator's workflow
Now, by default:

- the creator will receive a notification for the last step only;
- the participant / assignee for each step won't receive a notification (unless they explicitly choose to receive one)
2023-01-19 13:27:08 +01:00
999e9e8553
Feature: [workflow] do not subscribe user on notification for each step
automatically
2022-11-17 19:17:30 +01:00
49731777b4 fix cs: declare type and license header mismatch 2022-10-06 20:51:44 +02:00
63137c67f4 fix cs 2022-10-05 16:55:13 +02:00
dae383dbd9 fix some psalm errors 2022-04-30 01:34:23 +02:00
13d579dc33 add 'for' in macro workflow breadcrumb 2022-03-08 17:06:30 +01:00
1479e2ae9a entity workflow: handle sending an access key by email 2022-02-24 21:53:05 +01:00
ff1ff8f5bb workflow: allow a user to get access to validation step by an access key 2022-02-24 12:17:13 +01:00
08f9819453 add accessKey to entity workflow step 2022-02-23 18:33:29 +01:00
45beb27f83 fix sending notifications 2022-02-16 21:54:37 +01:00
93345c09a1 fix cs 2022-02-11 13:45:21 +01:00
199a441593 fix tests for EntityWorkflow 2022-02-11 13:24:29 +01:00
a612d7dd9f improve workflow decision form 2022-02-01 12:19:51 +01:00
86e7b0f007 rewrite workflow and handle finalize differently 2022-01-29 00:20:35 +01:00
fdafe7c82b normalizer for entityworkflow 2022-01-29 00:20:35 +01:00
0378df42b6 fix cs 2022-01-27 17:08:00 +01:00
88d1fe24b4 Creation of PersonResource 2022-01-26 12:52:15 +00:00
Pol Dellaiera
7513187a6d
Revert "fix cs"
This reverts commit 7b3e9cb490a1ea37d0900d7f087e06367d2d215f.
2022-01-25 15:54:20 +01:00
7b3e9cb490 fix cs 2022-01-25 14:40:28 +01:00
Pol Dellaiera
2e6d281bfc
cs: Autofix coding standard based on updated rules. 2022-01-25 11:46:29 +01:00