diff --git a/app/assets/stylesheets/new_design/dossier_instruction.scss b/app/assets/stylesheets/new_design/dossier_annotations_privees.scss similarity index 83% rename from app/assets/stylesheets/new_design/dossier_instruction.scss rename to app/assets/stylesheets/new_design/dossier_annotations_privees.scss index 9a0747fb8..f92b704a0 100644 --- a/app/assets/stylesheets/new_design/dossier_instruction.scss +++ b/app/assets/stylesheets/new_design/dossier_annotations_privees.scss @@ -2,7 +2,7 @@ @import "common"; @import "constants"; -#dossier-instruction { +#dossier-annotations-privees { h1 { font-size: 18px; font-weight: bold; diff --git a/app/controllers/new_gestionnaire/dossiers_controller.rb b/app/controllers/new_gestionnaire/dossiers_controller.rb index c93d42fb7..85f753a1a 100644 --- a/app/controllers/new_gestionnaire/dossiers_controller.rb +++ b/app/controllers/new_gestionnaire/dossiers_controller.rb @@ -14,9 +14,8 @@ module NewGestionnaire dossier.notifications.messagerie.mark_as_read end - def instruction + def annotations_privees @dossier = dossier - dossier.notifications.instruction.mark_as_read end def avis @@ -78,7 +77,7 @@ module NewGestionnaire def update_annotations dossier = current_gestionnaire.dossiers.includes(champs_private: :type_de_champ).find(params[:dossier_id]) dossier.update_attributes(champs_private_params) - redirect_to instruction_dossier_path(dossier.procedure, dossier) + redirect_to annotations_privees_dossier_path(dossier.procedure, dossier) end private diff --git a/app/views/new_gestionnaire/dossiers/_header.html.haml b/app/views/new_gestionnaire/dossiers/_header.html.haml index 6fd791c69..631ac63a4 100644 --- a/app/views/new_gestionnaire/dossiers/_header.html.haml +++ b/app/views/new_gestionnaire/dossiers/_header.html.haml @@ -15,8 +15,8 @@ - if notifications_summary[:demande] %span.notifications{ 'aria-label': 'notifications' } = link_to "Demande", dossier_path(dossier.procedure, dossier) - %li{ class: current_page?(instruction_dossier_path(dossier.procedure, dossier)) ? 'active' : nil } - = link_to "Annotations Privées", instruction_dossier_path(dossier.procedure, dossier) + %li{ class: current_page?(annotations_privees_dossier_path(dossier.procedure, dossier)) ? 'active' : nil } + = link_to "Annotations Privées", annotations_privees_dossier_path(dossier.procedure, dossier) %li{ class: current_page?(avis_dossier_path(dossier.procedure, dossier)) ? 'active' : nil } - if notifications_summary[:instruction] %span.notifications{ 'aria-label': 'notifications' } diff --git a/app/views/new_gestionnaire/dossiers/instruction.html.haml b/app/views/new_gestionnaire/dossiers/annotations_privees.html.haml similarity index 94% rename from app/views/new_gestionnaire/dossiers/instruction.html.haml rename to app/views/new_gestionnaire/dossiers/annotations_privees.html.haml index ccc8752e0..6aaece0df 100644 --- a/app/views/new_gestionnaire/dossiers/instruction.html.haml +++ b/app/views/new_gestionnaire/dossiers/annotations_privees.html.haml @@ -1,6 +1,6 @@ = render partial: "header", locals: { dossier: @dossier } -#dossier-instruction.container +#dossier-annotations-privees.container - if @dossier.ordered_champs_private.present? %section %h1.private-annotations Annotations privées diff --git a/config/routes.rb b/config/routes.rb index c7064cb16..c0272c9ef 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -243,7 +243,7 @@ Rails.application.routes.draw do member do get 'attestation' get 'messagerie' - get 'instruction' + get 'annotations-privees' => 'dossiers#annotations_privees' get 'avis' patch 'follow' patch 'unfollow' diff --git a/spec/controllers/new_gestionnaire/dossiers_controller_spec.rb b/spec/controllers/new_gestionnaire/dossiers_controller_spec.rb index 083dffa4a..16343dcf8 100644 --- a/spec/controllers/new_gestionnaire/dossiers_controller_spec.rb +++ b/spec/controllers/new_gestionnaire/dossiers_controller_spec.rb @@ -88,7 +88,7 @@ describe NewGestionnaire::DossiersController, type: :controller do end context '#instruction' do - let(:method) { :instruction } + let(:method) { :annotations_privees } it { expect(dossier.notifications.map(&:already_read)).to match([false, true, false]) } it { expect(response).to have_http_status(:success) } end @@ -179,6 +179,6 @@ describe NewGestionnaire::DossiersController, type: :controller do it { expect(champ_multiple_drop_down_list.value).to eq('["un", "deux"]') } it { expect(champ_datetime.value).to eq('21/12/2019 13:17') } - it { expect(response).to redirect_to(instruction_dossier_path(dossier.procedure, dossier)) } + it { expect(response).to redirect_to(annotations_privees_dossier_path(dossier.procedure, dossier)) } end end