Commit Graph

7 Commits

Author SHA1 Message Date
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
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
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
54e2777fa2 Update AuditTrailRepository to improve user handling and fix nullable user type in AuditTrail
- Changed `getUser` method in `AuditTrail` to allow null values by updating the return type to `?User`.
- Updated `insert` method in `AuditTrailRepository` to handle nullable users, ensuring the `user_id` parameter is set only when applicable.
- Improved code robustness by adding null-check logic for user assignment in the SQL query.
2026-01-28 22:35:13 +01:00
ee624cae4b Add AuditTrailPersisterInterface and improve AuditTrailPersister
- Introduced `AuditTrailPersisterInterface` to define the persisting contract.
- Updated `AuditTrailPersister` to implement the interface and delegate persistence to `AuditTrailRepository`.
- Added `AuditTrailRepository` with `persistImmediately` method to save audit trails directly to the database.
2026-01-28 16:18:45 +01:00