[Fix #762] move dossier instruction -> dossier annotations_privees
This commit is contained in:
parent
a421f0257e
commit
f5a227fa92
6 changed files with 9 additions and 10 deletions
|
@ -2,7 +2,7 @@
|
|||
@import "common";
|
||||
@import "constants";
|
||||
|
||||
#dossier-instruction {
|
||||
#dossier-annotations-privees {
|
||||
h1 {
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
|
@ -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
|
||||
|
|
|
@ -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' }
|
||||
|
|
|
@ -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
|
|
@ -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'
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue