diff --git a/sources/AppBundle/Controller/Admin/Accounting/Configuration/AddAccountAction.php b/sources/AppBundle/Controller/Admin/Accounting/Configuration/AddAccountAction.php index 1a6e3b74c..a486ba36b 100644 --- a/sources/AppBundle/Controller/Admin/Accounting/Configuration/AddAccountAction.php +++ b/sources/AppBundle/Controller/Admin/Accounting/Configuration/AddAccountAction.php @@ -28,7 +28,7 @@ public function __invoke(Request $request): Response $this->accountRepository->save($account); $this->audit->log('Ajout du compte ' . $account->getName()); $this->addFlash('notice', 'Le compte ' . $account->getName() . ' a été créé'); - return $this->redirect('/pages/administration/index.php?page=compta_conf_compte&action=lister&filtre=' . $account->getName()); + return $this->redirectToRoute('admin_accounting_accounts_list'); } return $this->render('admin/accounting/configuration/account_add.html.twig', [ diff --git a/sources/AppBundle/Controller/Admin/Accounting/Configuration/ArchiveAccountAction.php b/sources/AppBundle/Controller/Admin/Accounting/Configuration/ArchiveAccountAction.php index e15031fda..ad3f68e4b 100644 --- a/sources/AppBundle/Controller/Admin/Accounting/Configuration/ArchiveAccountAction.php +++ b/sources/AppBundle/Controller/Admin/Accounting/Configuration/ArchiveAccountAction.php @@ -20,7 +20,7 @@ public function __invoke(int $id): RedirectResponse if (!$account instanceof Account) { $this->addFlash('error', 'Compte non trouvé'); - return $this->redirect('/pages/administration/index.php?page=compta_conf_compte&action=lister'); + return $this->redirectToRoute('admin_accounting_accounts_list'); } $account->setArchivedAt(new \DateTime()); diff --git a/sources/AppBundle/Controller/Admin/Accounting/Configuration/EditAccountAction.php b/sources/AppBundle/Controller/Admin/Accounting/Configuration/EditAccountAction.php index 1efa55190..f0d277caf 100644 --- a/sources/AppBundle/Controller/Admin/Accounting/Configuration/EditAccountAction.php +++ b/sources/AppBundle/Controller/Admin/Accounting/Configuration/EditAccountAction.php @@ -27,7 +27,7 @@ public function __invoke(int $id,Request $request): Response $this->accountRepository->save($account); $this->audit->log('Modification du compte ' . $account->getName()); $this->addFlash('notice', 'Le compte ' . $account->getName() . ' a été modifié'); - return $this->redirect('/pages/administration/index.php?page=compta_conf_compte&action=lister&filtre=' . $account->getName()); + return $this->redirectToRoute('admin_accounting_accounts_list'); } return $this->render('admin/accounting/configuration/account_edit.html.twig', [ diff --git a/sources/AppBundle/Controller/Admin/Accounting/Configuration/RestoreAccountAction.php b/sources/AppBundle/Controller/Admin/Accounting/Configuration/RestoreAccountAction.php index b6fbd2258..6d2cf81f0 100644 --- a/sources/AppBundle/Controller/Admin/Accounting/Configuration/RestoreAccountAction.php +++ b/sources/AppBundle/Controller/Admin/Accounting/Configuration/RestoreAccountAction.php @@ -20,7 +20,7 @@ public function __invoke(int $id): RedirectResponse if (!$account instanceof Account) { $this->addFlash('error', 'Compte non trouvé'); - return $this->redirect('/pages/administration/index.php?page=compta_conf_compte&action=lister'); + return $this->redirectToRoute('admin_accounting_accounts_list'); } $account->setArchivedAt(null);