29 Commits

Author SHA1 Message Date
37227a3aeb Add attachments to workflow 2025-02-03 21:15:00 +00:00
4be6c09d4d
Add unique constraints to prevent person_documnt and accompanyingcourse_document with duplicated object_id
This change ensures `object_id` uniqueness within `person_document` and `accompanyingcourse_document` tables. It includes migration scripts and entity annotations to enforce these constraints. This helps maintain data integrity and consistency across the database.
2024-11-19 10:50:46 +01:00
5906171041
Add restoration functionality for stored object versions
Introduce a service to restore stored object versions along with relevant tests and an API endpoint. This includes database migrations for version relationships, enhancing stored object version tracking.
2024-09-19 13:42:23 +02:00
d33da6519a
Add StoredObjectPointInTime entity and related functionality
Implemented a new StoredObjectPointInTime entity to manage snapshots of stored objects. This includes related migrations, enum for reasons, repository, and integration with StoredObjectVersion.
2024-09-10 17:48:31 +02:00
615629d1b4
Simplify entity relationship and enforce foreign key constraints
Removed the resetStoredObject() method call from StoredObject, adjusted the storedObjectId column in the stored_object_version table to be NOT NULL, and moved the association setup of the StoredObject entity directly into the constructor in StoredObjectVersion. This ensures that every StoredObjectVersion has a valid StoredObject and maintains database integrity.
2024-09-04 14:28:13 +02:00
2b7ea4178b
Add versioning to stored objects
This update introduces a versioning system to the stored objects in the ChillDocStoreBundle. The 'StoredObject' entity now includes several new methods, and maintains a collection of 'StoredObjectVersion' instances. Each time a 'StoredObject' is modified, a new version instance is created and added to the collection, ensuring a history of changes. Migration file for the addition of new database column included. Corresponding tests are also updated.
2024-08-28 14:06:06 +02:00
fc88a5f40d Improve admin UX for configuration of document template (document generation) 2024-03-26 17:06:49 +00:00
bc2041cbdd
apply more cs rules for php-cs 2023-10-17 13:27:03 +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
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
nobohan
0a4ef3ad22 php code style + upd CHANGELOG 2022-05-27 09:39:36 +02:00
nobohan
dea554ced4 storedObject: add title field on StoredObject entity 2022-05-25 16:32:52 +02:00
c8e5ba4738 phpcsfixes 2022-02-11 16:04:01 +01:00
0fd26da299 comments in migration removed 2022-02-11 16:04:00 +01:00
1c055e842e created and updated traits added + template property added to Document entity 2022-02-11 16:04:00 +01:00
Pol Dellaiera
8f96a1121d
cs: Fix code style (safe rules only). 2021-11-23 14:08:50 +01:00
9fb29ec110 refactor search for using search by pertinence 2021-11-22 08:28:22 +00:00
7fabe0214e household list of accompanying periods + upgrade DBAL version to 3.1 2021-11-08 10:57:14 +00:00
2c1d3d08c3 temporary stored object fixes 2021-09-29 15:15:10 +02:00
Pol Dellaiera
ba53ce40fa Add migration file. 2021-09-28 20:32:43 +02:00
f0d0f16d3c fix namespace in migration files 2021-09-24 16:36:36 +02:00
832c7bab9f last migration deleted: duplicate 2021-09-24 16:20:58 +02:00
78b56dc32d attempt to fix migrations 2021-09-24 16:04:32 +02:00
88c192c22e change namespace migration 2021-09-09 17:44:37 +02:00
b11592fb6d templates added and adapted, still problems with scope 2021-09-03 16:05:55 +02:00
3bb0e470bc entity recreated + repository + migration done 2021-09-03 11:26:04 +02:00
eaa0ad925f fix folder name 2021-03-18 13:37:13 +01:00