mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Add flash message for successful ACPW merge
This update informs users when accompanying period works are successfully merged by adding a success flash message. A new translatable message was also added for proper localization of this notification.
This commit is contained in:
parent
5632697c05
commit
52a80f9621
@ -18,7 +18,9 @@ use Chill\PersonBundle\Repository\AccompanyingPeriod\AccompanyingPeriodWorkRepos
|
||||
use Chill\PersonBundle\Service\AccompanyingPeriodWork\AccompanyingPeriodWorkMergeService;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\Session\Session;
|
||||
use Symfony\Component\Routing\Annotation\Route;
|
||||
use Symfony\Component\Translation\TranslatableMessage;
|
||||
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
|
||||
|
||||
@ -91,6 +93,11 @@ class AccompanyingPeriodWorkDuplicateController extends AbstractController
|
||||
|
||||
$this->accompanyingPeriodWorkMergeService->merge($acpw1, $acpw2);
|
||||
|
||||
$session = $request->getSession();
|
||||
if ($session instanceof Session) {
|
||||
$session->getFlashBag()->add('success', new TranslatableMessage('acpw_duplicate.Successfully merged'));
|
||||
}
|
||||
|
||||
return $this->redirectToRoute('chill_person_accompanying_period_work_show', ['id' => $acpw1->getId()]);
|
||||
}
|
||||
|
||||
|
@ -1508,3 +1508,4 @@ acpw_duplicate:
|
||||
Accompanying period work to keep: Action d'accompagnement à conserver
|
||||
to keep: Action d'accompagnement à conserver
|
||||
to delete: Action d'accompagnement à supprimer
|
||||
Successfully merged: Action d'accompagnement fusionnée avec succès.
|
||||
|
Loading…
x
Reference in New Issue
Block a user