12237 Commits

Author SHA1 Message Date
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
1751c65731
add missing arguments to method alterQuery (wip) 2025-02-24 16:49:15 +01:00
791f5bb4be
Remove custom Messenger authentication logic (WIP)
Eliminated the `AuthenticationMiddleware`, `AuthenticatedMessengerToken`, and `AuthenticationStamp` classes, along with their service declarations. This cleanup removes unused or unnecessary code, simplifying the project and reducing maintenance overhead.
2025-02-24 16:13:20 +01:00
2c812fc5fe
Generate export using denormalization 2025-02-23 23:16:30 +01:00
1f1d38acef
infrastructure for normalizing form config [WIP] 2025-02-21 15:08:09 +01:00
057c34610d
First step to async generation [WIP] 2025-02-20 14:33:50 +01:00
732b7dc8f7
Add missing return types
This will avoid deprecation messages
2025-02-19 21:40:39 +01:00
cb068cdee7
Add ExportGeneration entity and migration
Introduce the `ExportGeneration` entity for managing export generation data, including related properties such as `exportAlias`, `options`, and `deleteAt`. Add corresponding database migration to create the `chill_main_export_generation` table with necessary constraints and indices. Update `composer.json` to include the `symfony/uid` package.
2025-02-19 16:45:37 +01:00
350661a4fa Merge branch '341-export-csv-thirdparties' into 'master'
Resolve "Extraction de la liste des tiers au format CSV"

Closes #341

See merge request Chill-Projet/chill-bundles!789
2025-02-19 11:37:46 +00:00
08207b656a Resolve "Extraction de la liste des tiers au format CSV" 2025-02-19 11:37:46 +00:00
8de63de6d6 Merge branch '343-social_issue_action_export' into 'master'
Resolve "Permettre de télécharger la liste des problématiques et la liste des actions en CSV"

Closes #343

See merge request Chill-Projet/chill-bundles!785
2025-02-19 11:18:05 +00:00
51804b10c0 Resolve "Permettre de télécharger la liste des problématiques et la liste des actions en CSV" 2025-02-19 11:18:04 +00:00
02f555efae Merge branch '333-working-with-translations' into 'master'
Setup alias for use in standalone chill-bundles project and replace relative paths

Closes #333

See merge request Chill-Projet/chill-bundles!766
2025-02-19 10:57:59 +00:00
d2fcb6945b Setup alias for use in standalone chill-bundles project and replace relative paths 2025-02-19 10:57:59 +00:00