62 Commits

Author SHA1 Message Date
ea1d4c48f2
Add history support to StoredObject entity
This commit adds a history saving feature to the StoredObject entity, which allows saving versions of the object's changes over time. This is achieved by implementing a saveHistory method that captures data attributes like filename, IV, key information, and type. The corresponding Automated tests were also created. Furthermore, adjustments were made to the StoredObject test to align with the new feature.
2024-06-04 22:31:50 +02:00
47a928a6cd
Add DAV edit link to StoredObject serialization
Enabled the adding of access link, specifically DAV edit link to the JSON serialization of the StoredObject entity. The patch also adjusted the serializer groups of various attributes of StoredObject from "read, write" to "write". Lastly, these changes were reflected in the accompanying CourseWork Controller and the FormEvaluation Vue component.
2024-05-23 18:25:20 +02:00
fc88a5f40d Improve admin UX for configuration of document template (document generation) 2024-03-26 17:06:49 +00:00
036fe8d6f8
upgrade php-cs 3.49 2024-02-07 10:43:53 +01:00
27ce322690
upgrade php-cs-fixer to 3.47.0 2024-01-22 12:14:39 +01:00
3c8e59e088 php cs fixes after updating php cs fixer 2024-01-10 10:31:25 +01:00
9ec5a633ad
Fix possible null values or not null values in some entity / string properties 2023-10-17 23:15:06 +02:00
bc2041cbdd
apply more cs rules for php-cs 2023-10-17 13:27:03 +02:00
65aa0a1588
Merge remote-tracking branch 'origin/master' into rector/rules-symfony 2023-09-27 15:25:29 +02:00
c2c14be9d7 Remove setId methods 2023-09-21 09:57:14 +02:00
eca26a15e6 Bugfix document mappedsuperclass should not contain id property 2023-09-19 09:42:46 +02:00
d2323e91ca
new cs rule: single_line_empty_body
Rule is added to the last version of php-cs-fixer
2023-09-12 15:58:59 +02:00
e4e52234ad
Rector: apply rules for doctrine code quality 2023-08-31 10:35:52 +02:00
f570fe92a5
apply rector rules 2023-07-28 02:40:02 +02:00
6d63177ff4
apply rules rector up to php82 2023-05-01 21:39:45 +02:00
dde3002100
DX: apply rector rules up to php8.0 2023-04-28 22:30:33 +02:00
858ade467c
DX: rector rules upt to PHP 74 2023-04-15 00:20:19 +02:00
386d1e44d0
Fixed: [accompanying course document] fix access to accompanying course document
The entity AccompanyingCourseDocument didn't had any center associated with this entity. Implementing the interface `HasCenterInterface` fixed the problem.

Fix https://gitlab.com/Chill-Projet/chill-bundles/-/issues/83
2023-04-05 19:29:33 +02:00
c35ca3dbeb
DX: fix cs 2023-02-28 22:39:33 +01:00
a16244a3f5 Feature: [docgen] generate documents in an async queue
The documents are now generated in a queue, using symfony messenger. This queue should be configured:

```yaml
# app/config/messenger.yaml
framework:
    messenger:
        # reset services after consuming messages
        # reset_on_message: true

        failure_transport: failed

        transports:
            # https://symfony.com/doc/current/messenger.html#transport-configuration
            async: '%env(MESSENGER_TRANSPORT_DSN)%'
            priority:
                dsn: '%env(MESSENGER_TRANSPORT_DSN)%'
            failed: 'doctrine://default?queue_name=failed'

        routing:
            # ... other messages
            'Chill\DocGeneratorBundle\Service\Messenger\RequestGenerationMessage': priority
```

`StoredObject`s now have additionnal properties:

* status (pending, failure, ready (by default) ), which explain if the document is generated;
* a generationTrialCounter, which is incremented on each generation trial, which prevent each generation more than 5 times;

The generator computation is moved from the `DocGenTemplateController` to a `Generator` (implementing `GeneratorInterface`. 

There are new methods to `Context` which allow to normalize/denormalize context data to/from a messenger's `Message`.
2023-02-28 15:25:47 +00:00
6254303392
Revert "Feature: [docgen][stored object] update model to store status, template_id and fix defaults"
This reverts commit 55918bcafb9b958e83696a9eaa4f6f17e90a9602.
2023-02-16 14:08:16 +01:00
55918bcafb
Feature: [docgen][stored object] update model to store status, template_id and fix defaults 2023-02-14 20:57:34 +01:00
bb05ba0f17
Feature: [docgen] create a service to generate a document from a template 2023-02-14 19:35:28 +01:00
db28443008 Fixed: correct use of scopes 2022-10-06 23:57:02 +02:00
9699e2304a fix cs: declare type and license header mismatch 2022-10-06 22:25:43 +02:00
67c3f3a840 fix cs with licencse header 2022-10-05 17:08:14 +02:00
ab08dab88a fixed: voter and permissions in accompanying course document 2022-07-11 12:57:08 +02:00
nobohan
dea554ced4 storedObject: add title field on StoredObject entity 2022-05-25 16:32:52 +02:00
89a700ff61 fix cs 2022-05-13 16:05:38 +02:00
nobohan
f44b9ca05b admin: fix error when creating document category 2022-05-11 12:03:38 +02:00
452c4b85c6 Merge remote-tracking branch 'origin/master' into issue565_document_storedObject 2022-04-27 08:43:35 +02:00
nobohan
3f47503528 storedObject: allow for null data in storedObject 2022-04-26 11:53:17 +02:00
e72a2004d7 Merge remote-tracking branch 'origin/master' into feat/add-document-encrypter-service 2022-04-26 09:37:30 +02:00
02409d4992 Merge remote-tracking branch 'origin/master' into issue469_budget 2022-03-24 16:22:52 +01:00
Pol Dellaiera
6ddbf35a7b
misc: Add return types. 2022-03-15 09:40:32 +01:00
nobohan
1beae4d713 AccompanyingCourseWorkEdit: download existing documents 2022-03-14 14:42:04 +01:00
695b9d5bea merge with master 2022-03-01 14:32:03 +01:00
c4e0b68ebe change block personcontent to content more consistent with other templates and less need for if-statements 2022-02-24 15:59:13 +01:00
nobohan
3f43574371 docstore: use API entrypoint for storing storedObject in AddAsyncUpload.vue 2022-02-24 12:11:34 +01:00
c8e5ba4738 phpcsfixes 2022-02-11 16:04:01 +01:00
1c055e842e created and updated traits added + template property added to Document entity 2022-02-11 16:04:00 +01:00
af6efdd0ba generate document with relatorio: config and driver 2021-12-02 18:02:19 +01:00
475b40e896 add form to doc generation and custom form to admin template configuration 2021-12-01 23:00:02 +01:00
Pol Dellaiera
cd3be25c22
cs: Remove duplicated headers. 2021-11-30 13:54:58 +01:00
Pol Dellaiera
47c5855a21
cs: Switch to a stricter way of coding - this might break in a lot of places. 2021-11-30 13:33:18 +01:00
Pol Dellaiera
8f96a1121d
cs: Fix code style (safe rules only). 2021-11-23 14:08:50 +01:00
7fabe0214e household list of accompanying periods + upgrade DBAL version to 3.1 2021-11-08 10:57:14 +00:00
c793159593 quick fix stored boject 2021-09-29 15:27:11 +02:00
26140de7de Merge remote-tracking branch 'origin/master' 2021-09-29 15:15:17 +02:00
2c1d3d08c3 temporary stored object fixes 2021-09-29 15:15:10 +02:00