12394 Commits

Author SHA1 Message Date
9f32b5ac48
Refactor BySocialIssueFilter to enhance normalization logic
Added ExportDataNormalizerTrait to streamline data normalization and denormalization processes. Updated constructor to inject dependencies for SocialIssueRepository and NormalizerInterface, improving modularity and maintainability. Adjusted form data normalization methods to utilize the new utilities.
2025-05-26 14:15:51 +02:00
e89f5e4713
Add and enforce 'DUPLICATE' permissions for Saved Exports
Introduce a new 'DUPLICATE' permission in SavedExportVoter and update related logic in the controller and templates to enforce this rule. Ensure only authorized users can duplicate exports and adjust UI elements accordingly for better permission handling.
2025-05-26 12:26:48 +02:00
e79d6d670b
Fix CS 2025-05-26 10:35:36 +02:00
9adbde0308
Add export configuration comparison and update options logic
Introduced a method to compare export generation options with saved exports, enabling detection of configuration differences. Updated template logic to conditionally adjust UI elements based on configuration discrepancies. This enhances flexibility when managing saved export options.
2025-05-26 10:35:27 +02:00
fe31cfd544
Refactor export generation to handle saved exports conditionally
Simplified the creation of `ExportGeneration` by introducing a `match` expression to handle cases with and without `savedExport`. This improves readability and ensures consistent handling of saved exports while normalizing configuration options.
2025-05-26 10:28:55 +02:00
e8bca6a502
Do not sync user which are enabled with UserGroup related to UserJob.
Updated SQL queries to include checks for user.enabled status, ensuring proper handling of both enabled and null states. This improves the synchronization logic by aligning it with user activity and account status conditions.
2025-05-23 15:52:11 +02:00
ebdfa04843
Refactor user handling in filters for consistency
Updated `UserWorkingOnCourseFilter` and `ReferrerFilter` to ensure consistent handling of users via `userOrMe` methods. Also adjusted normalization/denormalization to align with these changes, enhancing readability and maintainability.
2025-04-25 21:04:30 +02:00
b11684fb3b
set defualt value 2025-04-25 18:26:56 +02:00
b8826c6c0f
remove unused property 2025-04-25 18:26:22 +02:00
a996b05ead
Fix CS 2025-04-25 18:25:29 +02:00
cfcecf1cdc
Refactor export management and configure messenger queue
Refactored the export initialization process by implementing the `ExportManagerAwareInterface` for better consistency. Added configuration to enable handling export requests via the messenger queue for improved task prioritization and execution efficiency.
2025-04-25 18:24:37 +02:00
b6985e0e5f
Refactor form data handling in export filters and aggregators
Improved normalization and denormalization of form data by introducing default values and null handling across various filters and aggregators. Added `ExportDataNormalizerTrait` and repository dependencies where necessary to streamline data processing. This ensures more robust data handling and better default value management.
2025-04-25 18:24:26 +02:00
6d76b94644
Refactor title translation logic in SpreadSheetFormatter.
Simplified and streamlined the handling of title translation. Added truncation for titles exceeding 30 characters to ensure proper formatting. This enhances code readability and ensures title length consistency.
2025-04-25 18:23:58 +02:00
ff6ec45575
Add center filtering logic to export generation
Introduced a `filterStatsByCenters` configuration in `ExportGenerator` to enable conditional center filtering during exports. Updated related methods and tests to account for this parameter, ensuring compatibility with both filtered and unfiltered scenarios.
2025-04-25 18:23:37 +02:00
f3fd18e6fb
Update export cancel button to redirect to saved exports
Changed the cancel button link in the export generation page to point to the saved exports list. This improves user navigation by directing them to their saved exports instead of the export index page.
2025-04-25 18:23:08 +02:00
c8851a8e8a
Handle empty array case in denormalizeDoctrineEntity method
Previously, the method did not explicitly handle empty arrays, which could lead to unexpected behavior. This update ensures that when an empty array is provided as an ID, an empty array is returned immediately.
2025-04-25 17:28:57 +02:00
abdfe49c33
Fix fixedDate logic to handle empty string check
Previously, the `fixedDate` logic did not account for empty strings, which could lead to unexpected behavior. This change ensures that `fixedDate` is validated for both null and empty string values before processing.
2025-04-25 14:38:32 +02:00
e933f3e781
Restrict user fields in UserGroupType based on user jobs.
Refactored the form to conditionally add 'users' and 'adminUsers' fields only if the UserGroup does not have associated user jobs. This ensures data consistency and adjusts the form behavior dynamically based on the entity state.
2025-04-25 13:10:44 +02:00
fb1c34f9c1
Add UserGroup and UserJob synchronization feature
Implement UserGroupRelatedToUserJobSync to manage associations between UserGroups and UserJobs, including creating, updating, and removing relationships. Introduce a cron job to automate the synchronization process and add tests to ensure functionality. Update translations and repository logic as part of the implementation.
2025-04-25 13:07:52 +02:00
d506409d93
Refactor docblocks in UserJob repository interfaces.
Removed redundant PHP docblocks for array return types, as the return type hints already provide sufficient clarity. Added a @template annotation to specify the UserJob entity for the ObjectRepository.
2025-04-25 13:07:41 +02:00
9be8a533ff
Add relation between UserGroup and UserJob
Introduce a ManyToOne relationship between UserGroup and UserJob entities to allow synchronization of group members with corresponding UserJobs. This includes a schema migration to add the `userJob_id` column, associated constraints, and an index, as well as updates to the UserGroup entity with new methods for managing the relationship.
2025-04-25 11:44:36 +02:00
b414b27ba9
Make methods private in ExportDataNormalizerTrait
Changed the visibility of several methods from public to private to improve encapsulation and restrict access to internal logic. This enhances code maintainability and prevents unintended use outside the intended scope.
2025-04-25 11:31:31 +02:00
8521672660
Make Security dependency readonly in SavedExportType
Marking the Security property as readonly ensures it cannot be reassigned after initialization. This enforces immutability, improving code safety and clarity.
2025-04-25 11:29:19 +02:00
3f5ce5f841
Refactor filters to support "me" as a user option.
Replaced `PickUserDynamicType` with `PickUserOrMeDynamicType` across filters to enable handling of the "me" option. Introduced normalization and denormalization methods for "me" and adjusted all relevant queries and test cases to accommodate this enhancement.
2025-04-25 11:24:33 +02:00
e1404bf16d
Fix test with new signature of FormatterInterface 2025-04-24 22:16:40 +02:00
65b7ed0755
Fix Cs (and problably signature of FormatterInterface) 2025-04-24 22:00:46 +02:00
a74118e5d4
Add context parameter to export generation methods 2025-04-24 22:00:13 +02:00
828739edf5
use context where FormatterInterface is in use 2025-04-24 21:58:18 +02:00
d0811c8118
change FilterInterface::describeAction signature to remove the $format parameter 2025-04-24 21:49:26 +02:00
176bff0551
change FilterInterface::describeAction signature to include context 2025-04-24 21:48:00 +02:00
66c089e862
Refactor title translation logic in SavedExportController
Simplified and centralized title translation by introducing a check for TranslatableInterface. This ensures consistent handling of translatable titles and improves code readability.
2025-04-24 15:44:02 +02:00
aa44577484
Merge branch 'master' into 339-partage-d'export-enregistré
# Conflicts:
#	src/Bundle/ChillMainBundle/Resources/views/Dev/dev.assets.html.twig
2025-04-24 14:26:06 +02:00
8c59cbc6a0
Merge remote-tracking branch 'origin/366-pick-user-or-me' into 339-partage-d'export-enregistré 2025-04-24 14:24:48 +02:00
8c5a7ac3e1
Restrict export filters and aggregators for limited users
Added restrictions on export filters and aggregators based on user permissions. Introduced `ExportConfigProcessor` to handle allowed configurations and updated form components to respect these restrictions. Enhanced validation to enforce access control for unauthorized filter editing.
2025-04-24 14:21:51 +02:00
a6e523ee0a
Fix string formatting style in SavedExportController
Replaced double quotes with single quotes for consistency in exception messages and translatable strings. This change improves code readability and maintains uniformity across the file.
2025-04-24 14:21:35 +02:00
d49058805a
Refactor aggregator and filter retrieval into a new class
Moved aggregator and filter retrieval logic from ExportGenerator to the newly introduced ExportConfigProcessor class. This improves separation of concerns, simplifies ExportGenerator, and enhances code maintainability and readability. Updated related tests accordingly.
2025-04-24 14:21:16 +02:00
73496e0e1f
Add documentation for trait ExportDataNormalizerTrait 2025-04-23 09:46:11 +02:00
973450110b
Add duplicate and update options for saved exports
Introduce functionality to duplicate saved exports and update options directly from export generations. Update translations, controllers, views, and entities to support the new features, providing better flexibility and user experience around saved export management.
2025-04-23 09:11:50 +02:00
0f6b10aa0a
Refactor SavedExport permissions and voter logic
Revised SavedExportVoter to improve consistency and streamline permission checks. Updated tests, controller logic, and templates to align with new voter structure and attributes. Fixed typos in permission constants and added checks for delete/edit actions in the UI.
2025-04-18 14:09:13 +02:00
edeb8edbea
Add role-based access controls for export functionality
Introduced `CHILL_MAIN_COMPOSE_EXPORT` and `CHILL_MAIN_GENERATE_SAVED_EXPORT` roles for managing export creation and execution permissions. Updated access checks, menu routing, and templates to align with the new roles. Added a migration to extend existing permission groups with the `CHILL_MAIN_COMPOSE_EXPORT` role.
2025-04-17 17:34:09 +02:00
fc8e3789e0
Refactor SavedExportVoter to improve export permission check
Revised the permission logic in `canUserGenerate` to enhance clarity and maintainability. Replaced nested condition with early return and updated the export permission check to use `isGrantedForElement`.
2025-04-17 15:47:38 +02:00
3e7f03d331
Add possibility to cancel a workflow if there is a pending signature [ci-skip] 2025-04-17 14:23:32 +02:00
b830952b9e
Release v3.11.0 v3.11.0 2025-04-17 14:22:35 +02:00
ad17313c61 Merge branch '380-remove-not-null-constraint-household-composition' into 'master'
Remove "not null" validation on HouseholdComposition properties

Closes #380

See merge request Chill-Projet/chill-bundles!818
2025-04-17 09:03:15 +00:00
620515ad15
Remove "not null" validation on HouseholdComposition properties
This change removes the "not null" constraint on specific properties in the HouseholdComposition entity to allow null values. The adjustment addresses Issue #380 and ensures better flexibility without impacting the schema.
2025-04-17 10:56:45 +02:00
50c377ee22 Merge branch 'fix/fix-stored-object-version-not-delete-when-not-exists-on-disk' into 'master'
Fix error when cleaning non-existent stored object versions

See merge request Chill-Projet/chill-bundles!816
2025-04-17 08:36:36 +00:00
cc7e7a90ee Merge branch 'fix/cancel-stale-workflow-handle-fails-silently' into 'master'
Add consistent LOG_PREFIX and key to CancelStaleWorkflowHandler logs

See merge request Chill-Projet/chill-bundles!817
2025-04-16 19:10:37 +00:00
1d4ef19051
Add key to log messages context and add log prefix to enhance CancelStaleWorkflowHandler messages
Introduced a consistent LOG_PREFIX to all log messages in CancelStaleWorkflowHandler. This ensures clearer contextual identification in logs and improves traceability when debugging or monitoring workflow actions.
2025-04-16 21:03:29 +02:00
8337a724d1
Fix error when cleaning non-existent stored object versions
Prevent the `RemoveOldVersionMessageHandler` from throwing errors when the stored object version is missing on disk. Introduced a check to log a notice instead of attempting deletion in such cases and added corresponding test coverage.
2025-04-16 16:26:02 +02:00
8ca377d5d4 Merge branch 'button-signature-zone' into 'master'
Add button unique signature zone

See merge request Chill-Projet/chill-bundles!812
2025-04-15 13:09:54 +00:00