Commit Graph

12660 Commits

Author SHA1 Message Date
847610f679 Add support for associating entities with stored objects in the ChillDocStore bundle
- Introduced `AssociatedEntityToStoredObjectInterface` and `AssociatedEntityToStoredObjectRepository` for linking stored objects to specific entities.
- Registered `AssociatedEntityToStoredObjectInterface` with autoconfiguration and added custom repository logic.
- Updated `ChillDocStoreBundle` to tag repositories implementing the new interface for streamlined usage.
2026-03-02 12:09:19 +01:00
222d20734c Add audit functionality for Comment actions and integrate CommentSubjectConverter and CommentSubjectDisplayer
- Introduced `CommentSubjectConverter` and `CommentSubjectDisplayer` for audit conversion and display logic.
- Integrated `TriggerAuditInterface` into `AccompanyingCourseCommentController` and added audit triggers for create, view, update, delete, pin, unpin, and list actions with translatable descriptions.
- Added unit test `CommentSubjectConverterTest` to ensure proper behavior of the subject converter.
- Enhanced French translations (`messages.fr.yml`) with audit-related labels for comment actions.
2026-03-02 10:30:58 +01:00
56069deaf5 Document audit triggers in ApiController actions
- Added examples to demonstrate how to override the `onAfterFlush` method for triggering audits based on HTTP methods.
- Updated developer documentation (`audit.md`) with detailed instructions and code snippets.
2026-02-27 17:40:00 +01:00
7714828637 Integrate audit functionality into AccompanyingCourseWork actions
- Added `TriggerAuditInterface` to controllers and implemented audit triggers for create, update, delete, view, and list actions.
- Replaced `EventDispatcherInterface` with `triggerAudit` calls in relevant points.
- Enhanced French translations (`messages.fr.yml`) with audit-related labels for accompanying course work actions.
2026-02-27 17:37:41 +01:00
e28dc355e8 Add audit functionality for Activity actions
- Introduced `ActivityDisplayer` and `ActivitySubjectConverter` for handling audit display and conversion logic.
- Integrated `TriggerAuditInterface` in `ActivityController` and added audit triggers for create, list, update, delete, and view actions with translatable descriptions.
- Updated `services.yaml` to register new audit-related services.
- Enhanced French translations with audit-related labels for `Activity`.
2026-02-27 16:13:37 +01:00
546d5bf1f7 Update French translation for "list" title in events section
- Changed "Liste des événements" to "Liste des accès" in `messages.fr.yml` for consistency with access terminology.
2026-02-27 16:13:27 +01:00
b354ea1ce2 Add "list" action to audit functionality and French translations
- Introduced `AUDIT_LIST` constant in `AuditTrail` entity to support "list" action auditing.
- Updated French translations (`messages.fr.yml`) to include label for "list" action.
2026-02-27 15:57:21 +01:00
72131dc2f8 Add "list" action to audit functionality and French translations
- Introduced `AUDIT_LIST` constant in `AuditTrail` entity to support "list" action auditing.
- Updated French translations (`messages.fr.yml`) to include label for "list" action.
2026-02-27 15:57:11 +01:00
8d145e3b58 Add audit documentation to developer guide
- Added `audit.md` to explain how to trigger audits, best practices, and internal architecture.
- Updated `mkdocs.yml` to include the new "Audit" section in the developer guide.
2026-02-27 15:27:45 +01:00
96b690b75b Add audit functionality for AccompanyingPeriod actions
- Integrated `TriggerAuditInterface` in `AccompanyingCourseApiController` to handle audit events.
- Added audit triggers for participation, requestor, confidentiality, and intensity actions using translatable descriptions.
- Updated French translations to include new audit-related messages.
2026-02-27 15:04:53 +01:00
99be7d9614 Replace EventDispatcherInterface with TriggerAuditInterface in AccompanyingCourseController
- Migrated from `EventDispatcherInterface` to `TriggerAuditInterface` for handling audit events.
- Updated all audit-related calls to use `triggerAudit` instead of `dispatch` in the controller.
2026-02-26 16:39:50 +01:00
298065bd41 Add audit functionality for HouseholdComposition actions
- Introduced `HouseholdCompositionDisplayer` and `HouseholdCompositionSubjectConverter` to handle audit display and conversion logic.
- Integrated audit triggers for create, view, and delete actions in `HouseholdCompositionController`.
- Added French translations for audit-related messages and household composition labels.
2026-02-26 16:28:46 +01:00
5eaf3ee828 Add audit functionality to HouseholdController, RelationApiController, and repository methods
- Integrated `TriggerAuditInterface` in `HouseholdController` and added audit triggers for view and update actions.
- Added onAfterFlush audit handling in `RelationApiController` to support create, update, and delete events.
- Updated `HouseholdMembersRepository` with a `find` method for retrieving `HouseholdMember` entities.
2026-02-26 16:00:41 +01:00
b000255aea Add audit display functionality for Household and HouseholdMember
- Added `HouseholdSubjectDisplayer` and `HouseholdMemberSubjectDisplayer` classes to handle audit display logic.
- Created Twig templates `household.html.twig` and `household_member.html.twig` for rendering audit information.
- Integrated support for HTML and text formats when displaying audit entries.
2026-02-26 16:00:29 +01:00
7d147f921d Add audit functionality to MembersEditor and trigger audit in HouseholdMemberController
- Added `TriggerAuditInterface` to `MembersEditorFactory` and `MembersEditor` for managing audit events.
- Implemented `triggerAudit` method in `MembersEditor` to log participation edits with translatable descriptions.
- Updated `HouseholdMemberController` to invoke `triggerAudit` after saving changes.
2026-02-26 16:00:23 +01:00
c013cfd032 Add HouseholdConverter and HouseholdParticipationConverter for audit functionality
- Implemented `HouseholdConverter` to handle `Household` entity conversions with support for associated members.
- Added `HouseholdParticipationConverter` to convert `HouseholdMember` entity and retrieve linked person and household subjects.
- Ensures compatibility with the audit system via `SubjectConverterInterface`.
2026-02-26 16:00:05 +01:00
7d62d33058 Integrate audit functionality across Person and PersonResource controllers
- Added `TriggerAuditInterface` to enable seamless audit event handling.
- Implemented audit triggers for create, update, delete, and view actions.
- Enhanced controllers to include translatable audit descriptions for better tracking of actions.
2026-02-26 14:15:03 +01:00
88235c0fa2 Add PersonResource audit functionality
- Implemented `PersonResourceSubjectDisplayer` to provide display logic for `PersonResource` audits.
- Added `PersonResourceSubjectConverter` to handle conversion to `Subject` format.
- Created Twig template `person_resource.html.twig` for rendering `PersonResource` audit display.
2026-02-26 14:14:51 +01:00
1d4d90e48a Add getAssociated method to AbstractPersonResource
- Introduced `getAssociated` method to retrieve either `Person`, `ThirdParty`, or `null`.
- Provides a unified accessor combining `person` and `thirdParty` properties.
2026-02-26 14:14:00 +01:00
8c88fca2ee Add TriggerAuditInterface and TriggerAuditService to handle audit event triggering
- Introduced `TriggerAuditInterface` to define the contract for triggering audit events.
- Implemented `TriggerAuditService` to encapsulate audit event creation and persistence logic.
- Added methods to handle audit actions with metadata and translatable descriptions.
2026-02-26 14:13:44 +01:00
1099302ab2 Add French translations and implement UI for audit trail download statuses
- Added new French translations for audit trail download states in `messages.fr.yml`.
- Updated `waitForDump` endpoint to render a Twig template with download status.
- Created `download.html.twig` to display the download status with dynamic messages for different states.
2026-02-23 13:48:40 +01:00
c5ed93eebd Add Vue.js module for polling and downloading stored objects
- Created `waiting_download` module with main `App.vue` component.
- Integrated polling logic to check stored object status using the `/is-ready` endpoint.
- Displayed messages for pending, stopped, failure, and ready states with a "Download" button for ready objects.
- Added `StoredObjectReady` type and updated types for improved type safety.
- Dynamically mounted the module using dataset attributes.
2026-02-23 13:48:32 +01:00
dca59a9254 Add endpoint to retrieve stored object content
- Introduced `/1.0/doc-store/stored-object/{uuid}` endpoint to fetch the content of a stored object by UUID.
- Implemented access control using `StoredObjectRoleEnum::SEE` permission.
- Added OpenAPI specification for the new endpoint, including path parameter `uuid` and response codes `200` and `403`.
2026-02-23 13:48:12 +01:00
8a9a25ea43 Add documentation for "is-ready" endpoint to check stored object status
- Introduced `/1.0/doc-store/stored-object/{uuid}/is-ready` endpoint to retrieve the status of a stored object.
- Added path parameter for `uuid` and returned `status` property with `empty`, `ready`, `pending`, or `failure` states.
2026-02-23 12:47:29 +01:00
6b9377025f Add French translations and display logic for audit trail item count and export limit
- Added French translations for audit trail count and export limit messages in `messages+intl-icu.fr.yaml`.
- Updated `list.html.twig` to display the total number of audit items and a message if items exceed the exportable limit (`MAX_LINES`).
2026-02-23 11:59:08 +01:00
8f16083278 Add French translation for "Download" in messages.fr.yml 2026-02-23 11:44:54 +01:00
ac6316e3ff Route AuditDumpRequestMessage to the async transport in messenger configuration. 2026-02-23 11:44:47 +01:00
98130bb452 Add "Download" button to Audit Trail list when items are within exportable limit
- Display a download button if the total number of audit trail items is within `MAX_LINES`.
- Added the download action as a form submission with the appropriate route.
2026-02-23 11:44:41 +01:00
3b8984eec5 Add AuditDumpRequestHandler to process audit dump requests and ensure transactional consistency
- Introduced `AuditDumpRequestHandler` to handle `AuditDumpRequestMessage` with transactional safety.
- Added custom exceptions `AuditDumpTooMuchLines` and `AuditDumpAlreadyGeneratedException` for enhanced error reporting during processing.
- Created unit tests in `AuditDumpRequestHandlerTest` to validate normal processing, exception handling, and edge cases.
- Implemented locking mechanism and state management for `StoredObject` while processing requests.
2026-02-23 11:44:32 +01:00
07417387bb Add audit trail dump generation and status retrieval endpoints
- Added `generateDump` method to handle audit trail dump creation and queue a processing request.
- Introduced `waitForDump` endpoint to retrieve the status of a pending dump.
- Updated controller dependencies to include `MessageBusInterface`, `EntityManagerInterface`, `ClockInterface`, and `UrlGeneratorInterface`.
- Marked `AuditTrailSearchController` as `readonly` for improved immutability.
2026-02-23 11:44:17 +01:00
7324d8dfc7 Refactor AuditEventDumper for enhanced error handling and customization.
- Added `AuditDumpAlreadyGeneratedException` and `AuditDumpTooMuchLines` exceptions to improve error reporting during dump operations.
- Introduced `MAX_LINES` constant to limit the number of lines in dumps.
- Modified `dump` method to accept a `StoredObject` as a parameter and handle its state transitions.
- Updated `AuditEventDumperTest` to reflect changes in `dump` method and validate error scenarios.
2026-02-23 11:44:06 +01:00
3fbdedc239 Add findByCriteriaIterator method to AuditTrailRepository for streaming large datasets
- Introduced a memory-efficient iterable result method to handle large datasets.
- Ensures data is streamed without loading all rows into memory, improving performance for extensive audit trail processing.
2026-02-17 18:50:00 +01:00
419772060b Introduce multi-format support for subject rendering in audit displayer classes
- Added a `format` parameter to `display` methods in `PersonSubjectDisplayer`, `AccompanyingPeriodWorkSubjectDisplayer`, and `AccompanyingPeriodSubjectDisplayer` to support `html` and `string` outputs.
- Injected `PersonRenderInterface` and `TranslatorInterface` into relevant classes for improved non-HTML rendering capabilities.
- Refactored rendering logic to accommodate flexible output formatting.
2026-02-17 18:49:46 +01:00
1c9b475640 Add AuditEventDumperTest to validate audit event dumping functionality
- Introduced a test case for `AuditEventDumper` to ensure proper CSV generation and storage.
- Verified metadata, user, and entity subject data accuracy in the dumped output.
2026-02-17 18:49:31 +01:00
a0796852dd Add support for audit event dumping and improve subject rendering flexibility
- Added `AuditEventDumper` class to generate and store CSV exports of audit events based on search criteria.
- Updated `SubjectDisplayerInterface` and related classes to support multiple output formats (`html` or `string`) for subject rendering.
2026-02-17 18:49:14 +01:00
b89911e307 Add RemoveOldAuditCronJob to clean up outdated audit trails
- Introduced `RemoveOldAuditCronJob` class implementing `CronJobInterface` to delete old audit trails based on configured retention period.
- Added `deleteBefore` method to `AuditTrailRepository` to handle removal of records older than the specified date.
- Created `RemoveOldAuditCronJobTest` to ensure correct functionality for job execution and canRun logic.
- Updated DI configuration to include the `delete_after` parameter for audit trail retention settings.
2026-02-17 12:04:22 +01:00
ceb58de858 Add pagination support to Audit Trail listing
- Added `countByCriteria` method in `AuditTrailRepository` to retrieve the total count of records based on criteria.
- Injected `PaginatorFactoryInterface` into `AuditTrailSearchController` and updated the controller to handle pagination logic.
- Updated the `list.html.twig` template to render the pagination controls using `chill_pagination`.
2026-02-17 11:07:12 +01:00
30d4623db6 Add user-based filtering support to Audit Trail search functionality
- Extended `AuditTrailRepository` to include user-based query filtering.
- Updated `AuditTrailSearchController` to handle `by_users` filter criteria.
- Modified translations and templates to support the new user picker field in the search form.
- Injected required CSS and JS assets for the user picker functionality.
2026-02-17 11:01:59 +01:00
84c5235446 Improve rendering of associated subjects in audit trail template
- Refactored subject rendering loop to handle spacing and comma placement more efficiently.
- Ensured correct output when rendering multiple associated subjects.
2026-02-17 09:33:20 +01:00
2f98f9b3c1 Fix accompanying period work translation key syntax in the template
- Corrected the translation placeholder from `id` to `{id}` in `accompanying_period_work.html.twig`.
2026-02-17 09:33:12 +01:00
8df06504ba Add support for associated subject conversion in AccompanyingPeriodWorkSubjectConverter
- Updated `convert` method to append associated subjects when `$includeAssociated` is true.
- Modified `SubjectConverterManager` to pass `$includeAssociated` to converters during subject resolution.
2026-02-17 09:33:04 +01:00
fa38f7edaa Add advanced filtering support to AuditTrailSearchController and related views
- Introduced filters for date range, course number, and person number using `FilterOrderHelper`.
- Updated `AuditTrailSearchController` to build and process filtering criteria dynamically.
- Enhanced translations and updated templates to render the new filter options.
2026-02-16 15:14:17 +01:00
4e9846930b Refactor AuditTrailRepository to extract query-building logic and add support for date and subject-based filtering
- Moved query-building logic to a new `buildByCriteriaQuery` private method for better modularity.
- Added handling for `from_date`, `to_date`, and subject-based filtering using `JSONB` containment for improved query flexibility.
2026-02-16 15:14:17 +01:00
dd3a08f766 Add support for integer fields in FilterOrderHelper and FilterOrderHelperBuilder
- Introduced methods to define, retrieve, and process integer fields in `FilterOrderHelper` and `FilterOrderHelperBuilder`.
- Updated `FilterOrderType` to render integer fields dynamically as form inputs.
- Added corresponding support in `FilterOrderGetActiveFilterHelper` to handle integer field data.
- Updated `FilterOrderPositionEnum` and template files to include integer field rendering logic.
- Enhanced entity labels with translation capabilities where applicable.
2026-02-16 15:14:16 +01:00
16c5fd0cf2 Add JsonbContains custom DQL function and corresponding test
- Introduced `JsonbContains` class to enable the usage of PostgreSQL's JSONB containment operator in DQL queries.
- Created `JsonbContainsTest` to validate the functionality of the custom DQL function.
2026-02-16 15:14:16 +01:00
cc769fd4ba Support translatable labels in FilterOrderHelper and FilterOrderHelperBuilder
- Updated methods to accept `string|TranslatableInterface` for label parameters, allowing translation capabilities.
- Added `Symfony\Contracts\Translation\TranslatableInterface` imports in both classes.
2026-02-16 13:30:07 +01:00
22ace0c66e WIP: render entities 2026-02-16 13:02:46 +01:00
32c5f21438 Refactor subject conversion handling and enhance audit logging
- Replaced `Subject|array` return types with `SubjectBag` in `SubjectConverterInterface` for more robust handling.
- Updated `getSubjectsForEntity` to include an optional `$includeAssociated` parameter for finer control over associated subject resolution.
- Refactored `AuditEvent` to differentiate `mainSubject` from associated subjects, improving clarity in audit logging.
- Introduced database schema changes to add `main_subject` and `subjects` columns in the `chill_main_audit_trail` table.
- Added `SubjectBag` class for grouped subject management and implemented deduplication logic.
- Updated all converters and test cases to use the new `SubjectBag` approach, ensuring compatibility.
- Improved event dispatching in controllers to utilize the updated `AuditEvent` structure and refined metadata handling.
2026-02-13 17:07:30 +01:00
443ee4cb1a Update insert method in AuditTrailRepository to simplify nullable user handling
- Removed redundant null-check logic for `user_id` assignment.
- Updated query to directly handle optional users with safe navigation and nullable type support.
2026-01-28 22:36:26 +01:00
23d23da6b3 Specify \Throwable explicitly in ConvertSubjectException constructor for improved type clarity. 2026-01-28 22:35:29 +01:00