diff --git a/app/controllers/new_gestionnaire/dossiers_controller.rb b/app/controllers/new_gestionnaire/dossiers_controller.rb index 4760a23f6..a986538fa 100644 --- a/app/controllers/new_gestionnaire/dossiers_controller.rb +++ b/app/controllers/new_gestionnaire/dossiers_controller.rb @@ -160,7 +160,7 @@ module NewGestionnaire def create_avis Avis.create(avis_params.merge(claimant: current_gestionnaire, dossier: dossier)) - redirect_to avis_dossier_path(procedure, dossier) + redirect_to avis_gestionnaire_dossier_path(procedure, dossier) end def update_annotations diff --git a/app/views/new_gestionnaire/dossiers/_header.html.haml b/app/views/new_gestionnaire/dossiers/_header.html.haml index df48dae9e..27c1dd6fd 100644 --- a/app/views/new_gestionnaire/dossiers/_header.html.haml +++ b/app/views/new_gestionnaire/dossiers/_header.html.haml @@ -27,10 +27,10 @@ - if notifications_summary[:annotations_privees] %span.notifications{ 'aria-label': 'notifications' } = link_to "Annotations privées", annotations_privees_gestionnaire_dossier_path(dossier.procedure, dossier) - %li{ class: current_page?(avis_dossier_path(dossier.procedure, dossier)) ? 'active' : nil } + %li{ class: current_page?(avis_gestionnaire_dossier_path(dossier.procedure, dossier)) ? 'active' : nil } - if notifications_summary[:avis] %span.notifications{ 'aria-label': 'notifications' } - = link_to "Avis externes", avis_dossier_path(dossier.procedure, dossier) + = link_to "Avis externes", avis_gestionnaire_dossier_path(dossier.procedure, dossier) %li{ class: current_page?(messagerie_gestionnaire_dossier_path(dossier.procedure, dossier)) ? 'active' : nil } - if notifications_summary[:messagerie] %span.notifications{ 'aria-label': 'notifications' } diff --git a/app/views/new_gestionnaire/dossiers/avis.html.haml b/app/views/new_gestionnaire/dossiers/avis.html.haml index 89e09fae6..87ce6b25a 100644 --- a/app/views/new_gestionnaire/dossiers/avis.html.haml +++ b/app/views/new_gestionnaire/dossiers/avis.html.haml @@ -3,6 +3,6 @@ = render partial: "header", locals: { dossier: @dossier } .container - = render partial: "new_gestionnaire/shared/avis/form", locals: { url: avis_dossier_path(@dossier.procedure, @dossier), must_be_confidentiel: false } + = render partial: "new_gestionnaire/shared/avis/form", locals: { url: avis_gestionnaire_dossier_path(@dossier.procedure, @dossier), must_be_confidentiel: false } = render partial: 'new_gestionnaire/shared/avis/list', locals: { avis: @dossier.avis, avis_seen_at: @avis_seen_at } diff --git a/spec/controllers/new_gestionnaire/dossiers_controller_spec.rb b/spec/controllers/new_gestionnaire/dossiers_controller_spec.rb index dfe7ef057..5b1f5354a 100644 --- a/spec/controllers/new_gestionnaire/dossiers_controller_spec.rb +++ b/spec/controllers/new_gestionnaire/dossiers_controller_spec.rb @@ -350,7 +350,7 @@ describe NewGestionnaire::DossiersController, type: :controller do it { expect(saved_avis.confidentiel).to eq(true) } it { expect(saved_avis.dossier).to eq(dossier) } it { expect(saved_avis.claimant).to eq(gestionnaire) } - it { expect(response).to redirect_to(avis_dossier_path(dossier.procedure, dossier)) } + it { expect(response).to redirect_to(avis_gestionnaire_dossier_path(dossier.procedure, dossier)) } end describe "#update_annotations" do diff --git a/spec/features/new_gestionnaire/gestionnaire_spec.rb b/spec/features/new_gestionnaire/gestionnaire_spec.rb index cd9f01d41..a2a59d601 100644 --- a/spec/features/new_gestionnaire/gestionnaire_spec.rb +++ b/spec/features/new_gestionnaire/gestionnaire_spec.rb @@ -63,7 +63,7 @@ feature 'The gestionnaire part' do click_on dossier.user.email click_on 'Avis externes' - expect(page).to have_current_path(avis_dossier_path(procedure, dossier)) + expect(page).to have_current_path(avis_gestionnaire_dossier_path(procedure, dossier)) expert_email = 'expert@tps.com' ask_confidential_avis(expert_email, 'a good introduction') @@ -115,7 +115,7 @@ feature 'The gestionnaire part' do click_on dossier.user.email click_on 'Avis externes' - expect(page).to have_current_path(avis_dossier_path(procedure, dossier)) + expect(page).to have_current_path(avis_gestionnaire_dossier_path(procedure, dossier)) expert_email = 'expert@tps.com' ask_confidential_avis(expert_email, 'a good introduction')