Skip to content

Commit

Permalink
Redirect on vox /profil after readhesion (#10928)
Browse files Browse the repository at this point in the history
  • Loading branch information
Remg authored Oct 30, 2024
1 parent dc781e4 commit feed6cb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Controller/Renaissance/Adhesion/AdhesionController.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public function __invoke(Request $request): Response
if (($currentUser = $this->getUser()) instanceof Adherent && $currentUser->hasActiveMembership()) {
$this->addFlash('success', 'Vous êtes déjà à jour de cotisation.');

return $this->redirectToRoute('vox_app_redirect');
return $this->redirectToRoute('vox_app_redirect', ['state' => '/profil']);
}

/** @var MembershipRequest $membershipRequest */
Expand Down
3 changes: 2 additions & 1 deletion templates/renaissance/adhesion/finish.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@
</p>
{% endif %}

<twig:ReButton tag="a" href="{{ path('vox_app_redirect') }}" class="w-full" >
{% set parameters = (type is same as('readhesion')) ? { state: '/profil' } : null %}
<twig:ReButton tag="a" href="{{ path('vox_app_redirect', parameters) }}" class="w-full" >
Accéder à mon espace
</twig:ReButton>
</twig:Atoms:ReCard>
Expand Down

0 comments on commit feed6cb

Please sign in to comment.