47 Commits

Author SHA1 Message Date
eca26a15e6 Bugfix document mappedsuperclass should not contain id property 2023-09-19 09:42:46 +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
Pol Dellaiera
664fcd07ef fix: Update StoredObject uuid property. 2021-09-29 14:52:22 +02:00
Pol Dellaiera
dcb92b1378 Update StoredObject entity. 2021-09-28 17:49:32 +02:00
2e5c2de363 Documents can be added/viewed/edited for an accompanyingCourse + menu entry added 2021-09-14 15:44:06 +02:00
b11592fb6d templates added and adapted, still problems with scope 2021-09-03 16:05:55 +02:00
46560da67d start of controller and formtype: adaptation from DocumentPersonController 2021-09-03 12:20:34 +02:00
3bb0e470bc entity recreated + repository + migration done 2021-09-03 11:26:04 +02:00
c51b129a5e AccompanyingCourseDocument created 2021-09-03 11:02:56 +02:00
7f28effc1e Associate generate document with evaluation and update UX to go back to
documents
2021-08-20 12:44:15 +02:00
06abefd576 add redirection to wopi after doc generation 2021-08-19 23:30:45 +02:00
Pol Dellaiera
c208797daf fix: Update StoredObject entity. 2021-08-19 14:17:54 +02:00
Pol Dellaiera
c6b6fa5bf6 refactor: Update ChillDocStoreBundle - Add StoredObject repository. 2021-08-19 14:17:54 +02:00
eaa0ad925f fix folder name 2021-03-18 13:37:13 +01:00