From 95fb3671fb6d6f9586fb46222339fe9372b02175 Mon Sep 17 00:00:00 2001 From: simon lehericey Date: Mon, 9 Oct 2023 17:12:27 +0200 Subject: [PATCH] feat: when previous dossiers existing, redirect to list filtered by procedure_id --- app/views/commencer/show.html.haml | 2 +- spec/views/commencer/show.html.haml_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/commencer/show.html.haml b/app/views/commencer/show.html.haml index 4f79e78ef..98e292f7d 100644 --- a/app/views/commencer/show.html.haml +++ b/app/views/commencer/show.html.haml @@ -52,7 +52,7 @@ = render Dsfr::CalloutComponent.new(title: t("views.commencer.show.existing_dossiers"), heading_level: 'h2') do |c| - c.body do %ul.fr-btns-group.fr-btns-group--inline - %li= link_to t('views.commencer.show.show_dossiers'), dossiers_path, class: "fr-btn" + %li= link_to t('views.commencer.show.show_dossiers'), dossiers_path(procedure_id: @procedure.id), class: "fr-btn" %li= link_to t('views.commencer.show.start_new_file'), url_for_new_dossier(@revision), class: "fr-btn fr-btn--secondary" diff --git a/spec/views/commencer/show.html.haml_spec.rb b/spec/views/commencer/show.html.haml_spec.rb index a4b484208..882e90f04 100644 --- a/spec/views/commencer/show.html.haml_spec.rb +++ b/spec/views/commencer/show.html.haml_spec.rb @@ -74,7 +74,7 @@ RSpec.describe 'commencer/show', type: :view do it 'renders a link to the dossiers list' do subject - expect(rendered).to have_link('Voir mes dossiers en cours', href: dossiers_path) + expect(rendered).to have_link('Voir mes dossiers en cours', href: dossiers_path(procedure_id: procedure.id)) end end