From b6d454691ab41d638e0918a39596f69076d2ffb3 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Tue, 20 May 2025 09:38:39 +0200 Subject: [PATCH] Git add desactivation date for social action csv export --- src/Bundle/ChillMainBundle/translations/messages.fr.yml | 1 + .../Service/SocialWork/SocialActionCSVExportService.php | 6 ++---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/Bundle/ChillMainBundle/translations/messages.fr.yml b/src/Bundle/ChillMainBundle/translations/messages.fr.yml index f70f6d03a..4313da429 100644 --- a/src/Bundle/ChillMainBundle/translations/messages.fr.yml +++ b/src/Bundle/ChillMainBundle/translations/messages.fr.yml @@ -740,6 +740,7 @@ export: id: Identifiant de l'action social_issue_id: Identifiant de la problématique sociale social_issue: Problématique sociale + desactivation_date: Date de désactivation social_issue_ordering: Ordre de la problématique sociale action_label: Action d'accompagnement action_ordering: Ordre diff --git a/src/Bundle/ChillPersonBundle/Service/SocialWork/SocialActionCSVExportService.php b/src/Bundle/ChillPersonBundle/Service/SocialWork/SocialActionCSVExportService.php index adff4a588..d19b01382 100644 --- a/src/Bundle/ChillPersonBundle/Service/SocialWork/SocialActionCSVExportService.php +++ b/src/Bundle/ChillPersonBundle/Service/SocialWork/SocialActionCSVExportService.php @@ -30,9 +30,6 @@ final readonly class SocialActionCSVExportService private TranslatorInterface $translator, ) {} - /** - * @param list $actions - */ public function generateCsv(array $actions): Writer { // CSV headers @@ -84,7 +81,8 @@ final readonly class SocialActionCSVExportService 'action_id' => $action->getId(), 'social_issue_id' => $action->getIssue()?->getId(), 'problematique_label' => null !== $action->getIssue() ? $this->socialIssueRender->renderString($action->getIssue(), []) : null, - 'social_issue_ordering' => null !== $action->getIssue() ? $action->getIssue()->getOrdering() : null, + 'desactivation_date' => $action->getDesactivationDate()?->format('Y-m-d'), + 'social_issue_ordering' => $action->getIssue()?->getOrdering(), 'action_label' => $this->socialActionRender->renderString($action, []), 'action_ordering' => $action->getOrdering(), 'goal_label' => null !== $goal ? $this->stringHelper->localize($goal->getTitle()) : null,