From 72131dc2f81475de235891f823ad9a6cbc76be03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Fri, 27 Feb 2026 15:56:52 +0100 Subject: [PATCH] Add "list" action to audit functionality and French translations - Introduced `AUDIT_LIST` constant in `AuditTrail` entity to support "list" action auditing. - Updated French translations (`messages.fr.yml`) to include label for "list" action. --- src/Bundle/ChillMainBundle/Entity/AuditTrail.php | 2 ++ src/Bundle/ChillMainBundle/translations/messages.fr.yml | 1 + .../Controller/AccompanyingCourseApiController.php | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Bundle/ChillMainBundle/Entity/AuditTrail.php b/src/Bundle/ChillMainBundle/Entity/AuditTrail.php index 3778ff029..a2b86bcc8 100644 --- a/src/Bundle/ChillMainBundle/Entity/AuditTrail.php +++ b/src/Bundle/ChillMainBundle/Entity/AuditTrail.php @@ -24,6 +24,8 @@ class AuditTrail public const AUDIT_UPDATE = 'update'; public const AUDIT_DELETE = 'delete'; + public const AUDIT_LIST = 'list'; + public function __construct( #[ORM\Id] #[ORM\Column(name: 'id', type: 'uuid', unique: true)] diff --git a/src/Bundle/ChillMainBundle/translations/messages.fr.yml b/src/Bundle/ChillMainBundle/translations/messages.fr.yml index e3edcc596..83088c245 100644 --- a/src/Bundle/ChillMainBundle/translations/messages.fr.yml +++ b/src/Bundle/ChillMainBundle/translations/messages.fr.yml @@ -1018,6 +1018,7 @@ audit_trail: update: Mise à jour create: Création delete: Suppression + list: Liste list: title: Liste des événements associated_subject: Entités associées diff --git a/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseApiController.php b/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseApiController.php index d2696910d..a6bc0c3d0 100644 --- a/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseApiController.php +++ b/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseApiController.php @@ -263,7 +263,7 @@ final class AccompanyingCourseApiController extends ApiController AuditTrail::AUDIT_DELETE, $accompanyingPeriod, description: new TranslatableMessage('audit.accompanying_period.remove_requestor'), - metadata: ['t' => $accompanyingPeriod->getRequestorKind(), 'requestor' => $accompanyingPeriod->getRequestor()->getId()], + metadata: ['t' => $accompanyingPeriod->getRequestorKind()], ); } }