12250 Commits

Author SHA1 Message Date
bb42ee25ff
Update initiateQuery method to include ExportGenerationContext
The `initiateQuery` method now consistently incorporates the `ExportGenerationContext` parameter across various export classes, improving functionality and standardization. This change ensures compatibility and alignment with the expected method signature.
2025-04-07 11:29:04 +02:00
aebeca1d7a
Use readonly properties in constructors for better immutability.
Converted constructor properties to readonly where applicable, ensuring immutability and promoting safer code practices. Updated throwable class reference for clarity and consistency.
2025-04-05 00:56:54 +02:00
1955249a60
Fix type handling in JSON decode for migration script
Ensure `json_decode` explicitly casts database values to strings to avoid type errors during migration. This prevents potential issues when processing `options` fields that may not already be of string type.
2025-04-05 00:53:01 +02:00
3b0a4e9c73
Refactor exports to include ExportGenerationContext.
Updated initiateQuery methods to pass ExportGenerationContext, enabling better user-specific query filtering. Removed redundant user retrieval in FilterListAccompanyingPeriodHelper, now relying on context-provided user data.
2025-04-05 00:35:42 +02:00
b5fd9cf4af
Add SavedExportOptionsMigrator for migrating export options
Introduced SavedExportOptionsMigrator to handle the migration of saved export options with structures ensuring versioning. Added unit tests to validate transformation logic and edge cases for better reliability.
2025-04-05 00:35:16 +02:00
bb30ddc876
Add logging and validation to export generation handler
Introduce a logger to track processing steps, durations, and outcomes in `ExportRequestGenerationMessageHandler`. Add validation to prevent reprocessing of already generated export objects, ensuring robust error handling and improved traceability.
2025-04-05 00:08:37 +02:00
5ebb53173e
Fix PHPStan comment format in ExportGenerator.php
Updated the PHPStan ignore comment to use a single asterisk for consistency with comment style. This change does not affect functionality but improves code readability and adherence to coding standards.
2025-04-05 00:08:21 +02:00
d1d6a00ebf
Add failure handling for export generation errors
Introduce `OnExportGenerationFails` subscriber to handle export generation failures. It logs errors, updates the export status to failure, and records generation errors. Added tests to validate the new functionality.
2025-04-05 00:07:08 +02:00
e48bec490c
Compute allowed centers and regroupment at the time of generating the export 2025-04-03 17:47:46 +02:00
128d365a72
Convert Rolling date using the clock instead of the built-in pivot date 2025-04-03 17:47:08 +02:00
10f66afdcd
Update date formatting and add null-safe checks for pivot dates
Revised the date normalization format to align with ISO standards and ensure consistency. Additionally, introduced null-safe checks for pivot dates to avoid potential errors when these values are unset. Updated related tests to reflect these changes.
2025-04-02 11:35:47 +02:00
89aed74355
Refactor RollingDateConverter to use ClockInterface
Introduced ClockInterface for better time mocking and handling, replacing default instantiation with dependency injection. Adjusted RollingDate logic to accept nullable pivot dates and updated related tests for improved flexibility and accuracy.
2025-04-02 11:08:01 +02:00
9124fa68e8
Refactor flash message handling to use translatable messages
Replaced raw translations with Symfony's TranslatableMessage for flash messages in the controller. Updated Twig templates to use the `|trans` filter for consistency in rendering translations. This ensures better handling of multilingual content across the application.
2025-04-01 14:47:39 +02:00
68b61b7d8a
Refactor export-related controllers and helpers
Removed unused dependencies, obsolete methods, and redundant parameters across ExportController, ExportFormHelper, and SavedExportController. Simplified session handling and aligned method signatures to improve maintainability and code readability.
2025-04-01 14:19:15 +02:00
80d8f967fa
Moved export listing functionality from ExportController to a new ExportIndexController
for improved separation of concerns. Updated tests accordingly to reflect the new controller structure.
2025-04-01 13:20:48 +02:00
1375a41de2
Refactor export handling to support ExportGeneration and SavedExport
Unified handling of ExportGeneration and SavedExport entities by introducing the SavedExportOrExportGenerationRepository. Simplified form data conversion using ExportConfigNormalizer, removing redundant FormBuilder logic. Adjusted dependent methods and controllers to accommodate these changes.
2025-04-01 10:38:51 +02:00
180437f637
Add generation button for saved exports and improve UI flow
Introduce a Vue.js component to handle the generation of saved exports directly via a new button. Adjust related API endpoints, improve status handling, and remove redundant backend logic. Minor UI enhancements and translation updates included.
2025-03-17 14:25:57 +01:00
0c2508d26d
Refactor ExportGeneration to improve serialization and usage
Streamlined the `ExportGeneration` entity by adding a `getStatus` accessor and updating the serialization group. Refactored frontend logic to use computed properties for `status` and `storedObject`. Simplified API methods to work with the updated `ExportGeneration` interface for consistent handling.
2025-03-17 10:41:54 +01:00
b2d8d21f04
Add export generation creation from saved export endpoint
Introduce a new controller for creating export generations from saved exports using a POST endpoint. Updates include a new route, serialization groups, and a corresponding test to validate functionality.
2025-03-16 22:47:57 +01:00
6a2aa77ecc
Add setter for SavedExport and update SavedExport logic
Introduced a `setSavedExport` method in `ExportGeneration` entity to enable better association handling. Updated `SavedExportController` to use this setter and adjusted template reference for the 'new' action. Removed unused `TranslatableStringHelperInterface` dependency for cleaner code.
2025-03-14 17:26:40 +01:00
e7cd9e00f9
Add functionality to save exports from export generations
Introduced a new route and controller method to create saved exports directly from an export generation. Updated the Twig template to include a "Save" button, enabling users to utilize this new feature seamlessly. This enhances export management and provides a more convenient user experience.
2025-03-13 18:05:56 +01:00
39f60b5b34
Add association between ExportGeneration and SavedExport
This update introduces a relationship between ExportGeneration and SavedExport. It includes a new SavedExport field in the ExportGeneration entity and the corresponding database migration. These changes enable ExportGeneration to reference its originating SavedExport if applicable.
2025-03-13 18:05:34 +01:00
c9c29b9105
Add ExportGenerationVoter and integrate it into StoredObjectVoter
Introduced ExportGenerationVoter to handle specific view permissions for ExportGeneration entities. Updated ExportGenerationStoredObjectVoter to delegate permission checks to the new voter using Symfony's security system. This improves separation of concerns and reusability of authorization logic.
2025-03-13 17:53:10 +01:00
fb806a9579
Add title and creation date to export data handling
Enhanced export functionality by including `title` and `createdDate` in data passed to the Vue app. Updated controllers, templates, and components to handle and display the new fields, improving export file naming and user interface. Removed a debug `dump` call for cleaner code.
2025-03-13 17:36:47 +01:00
70ca4acafb
Add voter for ExportGeneration stored object authorization
Introduces `ExportGenerationStoredObjectVoter` to handle permissions for stored objects linked to export generations. Implements entity association retrieval in `ExportGenerationRepository` by adhering to `AssociatedEntityToStoredObjectInterface`.
2025-03-13 17:23:05 +01:00
bd61eedfbb
Migrate export generation flow from plain JS to Vue
Replaced the old JavaScript-based export generation logic with a Vue.js implementation to improve maintainability and modularity. Introduced a new API endpoint to fetch export status, updated the Webpack config, and integrated translations and Twig templates for the new flow. The Vue-based solution enhances user feedback and error handling during the export process.
2025-03-13 17:03:14 +01:00
80ce7f0bf1
Implement ExportGenerationController with waiting and status routes
Added a new controller to handle export generation wait views and status responses. Updated ExportController to redirect to the 'wait' route after export generation. Introduced tests to validate object status handling for pending and ready states.
2025-03-13 15:29:49 +01:00
1ebf838bde
Refactor ExportRequestGenerationMessageHandler logic.
Enhance the message handler to properly manage stored objects by leveraging `StoredObjectManagerInterface` and `EntityManagerInterface`. Added logic for writing generated content, updating stored object status, and ensuring data persistence with a DB flush.
2025-03-13 14:19:00 +01:00
85a9c6bb67
Refactor export manager and normalize configuration handling
Simplified formatter and aggregator logic by removing redundant fields and improving method checks (e.g., `hasAggregator`, `hasFilter`). Adjusted test cases to align with the updated structure and added tests for empty data normalization and denormalization. Improved code readability and ensured better handling of edge cases in export data processing.
2025-03-13 14:18:54 +01:00
db073fc920
Refactor ExportController to handle async generation of exports 2025-03-13 14:18:23 +01:00
46ebfca28f
add ExportNormalizerConfig service to DI configuration file 2025-03-12 22:15:43 +01:00
22a2605381
fix messenger config: remove AuthenticationMiddleware 2025-03-12 22:15:25 +01:00
4f6a7116a4
fixup! Add ChillBundle normalization methods rector rule 2025-03-12 21:57:54 +01:00
cac7d33a44
fixup! Add ChillBundle normalization methods rector rule 2025-03-12 21:51:24 +01:00
0609e3f4c3
fixup! Add Rector Rule to inject normalization methods into export classes 2025-03-12 21:50:33 +01:00
3a738179f2
use correct repository for filters and aggregators 2025-03-12 17:41:59 +01:00
a789bf5e1c
Add return type for getTargets() method in validator
Ensure the `getTargets()` method specifies its return type for better code clarity and type safety. This update aligns with modern PHP practices and improves maintainability.
2025-03-12 17:41:28 +01:00
0a21fada42
fixup! Add normalization and denormalization for RollingDate 2025-03-12 10:04:12 +01:00
4f030eb11a
Add date normalization and denormalization functionality
Introduce methods to normalize and denormalize DateTime objects using specific formats. Also, implement corresponding unit tests to ensure correct handling of single and multiple Doctrine entities, as well as date normalization.
2025-03-12 10:00:39 +01:00
0d2a487ae7
Add new normalization methods on filters, aggregators exports and formatter by applying rector rule 2025-03-11 22:28:42 +01:00
6cb23344fc
Add ChillBundle normalization methods rector rule
This commit introduces a new rector rule to add normalization methods for ChillBundle exports. It removes an outdated rector configuration and ensures alignment with current standards.
2025-03-11 22:18:04 +01:00
da0d7a3b9e
fixup! Add Rector Rule to inject normalization methods into export classes 2025-03-11 22:17:42 +01:00
fcc61aa4c0
fixup! Add Rector Rule to inject normalization methods into export classes 2025-03-11 16:21:16 +01:00
21ec96b75c
fixup! Add Rector Rule to inject normalization methods into export classes 2025-03-11 15:31:30 +01:00
93f934152f
!fixup fix rector rule 2025-03-11 15:28:28 +01:00
49f4cce72a
fixup! Rename getVersion to getNormalizationVersion. 2025-03-11 15:09:26 +01:00
e69b679938
Add Rector Rule to inject normalization methods into export classes
This update introduces a Rector rule to automatically add `normalizeFormData`, `denormalizeFormData`, and `getNormalizationVersion` methods to export-related classes implementing specific interfaces. It ensures consistency and reduces manual work by leveraging traits and default implementations for normalizing form data. Test fixtures and configurations are included to validate and support this functionality.
2025-03-11 15:08:48 +01:00
229f9b7125
Rename getVersion to getNormalizationVersion.
This change improves clarity by making the method name more descriptive and aligned with its purpose. All relevant interfaces, classes, and tests have been updated accordingly to reflect this renaming.
2025-03-10 21:37:32 +01:00
4fc433cd63
Rename and implement form data normalization for filters
The `StepFilterTest` was renamed to `StepFilterOnDateTest` for improved clarity. Added `normalizeFormData` and `denormalizeFormData` methods to `UserJobFilter` and `StepFilterOnDate` for handling form data conversions. Also introduced `ExportDataNormalizerTrait` to enhance consistency in data normalization processes.
2025-03-10 21:17:25 +01:00
2c91d2e10f
Add normalization and denormalization for RollingDate
Introduce methods to normalize and recreate RollingDate objects, ensuring consistent serialization and deserialization. Includes corresponding tests for both cases with and without a pivot date.
2025-03-10 21:07:54 +01:00