12398 Commits

Author SHA1 Message Date
8e952cc966
Implements new return types 2025-04-07 14:35:29 +02:00
1c4ee37507
Refactor entity normalization to handle Doctrine Collection.
Updated `normalizeDoctrineEntity` to support normalizing `Collection` objects and handle null values in arrays. This ensures compatibility with a broader range of entity structures and improves data integrity during normalization.
2025-04-07 14:35:07 +02:00
8331a836f2
Add explicit return types and TranslatableInterface support
Updated interfaces to include explicit return types for improved type safety and readability. Integrated support for Symfony's TranslatableInterface in relevant methods to enhance translation handling.
2025-04-07 14:26:11 +02:00
2482dcc62e
Refactor ExportManager integration and remove ExportsCompilerPass
Replaced direct ExportManager dependencies in formatters with an ExportManagerAwareTrait to decouple components and enhance flexibility. Removed the ExportsCompilerPass as it is no longer required, and adjusted service configurations to improve reliability and consistency.
2025-04-07 12:42:28 +02:00
f9a55a1bfd
Fix debug artifact in ExportFormHelper
Removed unnecessary `dump()` calls when resolving centers and regroupments. This ensures cleaner processing and
2025-04-07 12:37:29 +02:00
15aa565caf
Add custom exception classes for export errors
Introduced `ExportRuntimeException` and `ExportLogicException` to better categorize exceptions in the export process. Updated `ExportGenerationException` to extend `ExportRuntimeException` for clearer hierarchy and improved maintainability.
2025-04-07 11:38:42 +02:00
566b72ec9e
Add $context parameter to export query generation
This update introduces the $context parameter to the query generator method. It ensures additional contextual data can be passed and utilized, improving the flexibility of export generation logic.
2025-04-07 11:31:52 +02:00
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
1af3e4c7ec Eslint fixes and phpcs fixer 2025-03-18 14:39:19 +01:00
5d0fc7a189 remove comment 2025-03-18 14:25:59 +01:00
483d50e776 Return a string 'me' in EntityToJsonTransformer.php 2025-03-18 14:25:59 +01:00
b4c6ccf309 Add missing rendering condition 2025-03-18 14:25:59 +01:00
ac6a81cbd8 Adjust styling of current user selected 2025-03-18 14:25:59 +01:00
9503cb89b6 Setup if condition in EntityToJsonTransformer.php for when 'me' is passed 2025-03-18 14:25:59 +01:00
b130dbdcdc Add translations for current user in pick entity component 2025-03-18 14:25:59 +01:00
b2b1865837 WIP backend userOrMePicker 2025-03-18 14:25:59 +01:00
ec5c4d51b3 Frontend: display and behavior of pickUserOrMe form field 2025-03-18 14:25:56 +01:00
fe6949ea26 Update chill bundles to v3.10.3 v3.10.3 2025-03-18 13:47:31 +01:00
8a444a12f4 Turn off eslint error ban-ts-comment 2025-03-18 10:57:24 +01:00
8b7b5ceed7
Release v3.10.2 v3.10.2 2025-03-17 22:30:17 +01:00
b0e826d05a
Revert "Remove unnecessary ts-expect-error"
This reverts commit 7f101ba61652324430cd554190151ef1c6aa94fd.
2025-03-17 22:22:37 +01:00
6fb9c3af3f
Release v3.10.1 v3.10.1 2025-03-17 21:59:32 +01:00
7f101ba616
Remove unnecessary ts-expect-error 2025-03-17 21:59:16 +01:00
cea82fac10 Merge branch '333-removing-node-deps-to-symfony-ux-translator' into 'master'
Copy Symfony UX Translator module into to chill-bundles

Closes #333

See merge request Chill-Projet/chill-bundles!808
2025-03-17 20:45:48 +00:00
1344fc33e1 Copy Symfony UX Translator module into to chill-bundles 2025-03-17 20:45:48 +00:00
c8e09a28e6 Eslint fixes 2025-03-17 17:32:28 +01:00
c52d4b2a0e
Release v3.10.0 v3.10.0 2025-03-17 16:41:07 +01:00
7f326d5441
Fix typing of argument in FullCAlendar slot 2025-03-17 16:29:59 +01: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
2840c06476 Merge branch '368-fix-user-search-engine' into 'master'
Fix search query for user-groups

Closes #368

See merge request Chill-Projet/chill-bundles!806
2025-03-14 14:10:53 +00:00
7ddf84ea5a Fix ts errors upon prod compilation 2025-03-14 15:07:23 +01:00
f202625ea8
Fix LIKE clause logic in UserGroupRepository query
Adjusted the parameter order and ensured consistent use of LOWER and UNACCENT functions in the LIKE clause. This resolves potential mismatches and improves query reliability for pattern matching.
2025-03-14 15:04:22 +01:00