Gestionnaire: move avis_path to gestionnaire_avis_path
This commit is contained in:
parent
0308345008
commit
9db5e82b41
6 changed files with 9 additions and 9 deletions
|
@ -5,7 +5,7 @@ module DossierLinkHelper
|
|||
else
|
||||
avis = dossier.avis.find_by(gestionnaire: gestionnaire)
|
||||
if avis.present?
|
||||
avis_path(avis)
|
||||
gestionnaire_avis_path(avis)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
%li= "#{dossier.procedure.libelle}, dossier nº #{dossier.id}"
|
||||
|
||||
%ul.tabs
|
||||
%li{ class: current_page?(avis_path(avis)) ? 'active' : nil }
|
||||
= link_to 'Demande', avis_path(avis)
|
||||
%li{ class: current_page?(gestionnaire_avis_path(avis)) ? 'active' : nil }
|
||||
= link_to 'Demande', gestionnaire_avis_path(avis)
|
||||
%li{ class: current_page?(instruction_gestionnaire_avis_path(avis)) ? 'active' : nil }
|
||||
= link_to 'Avis', instruction_gestionnaire_avis_path(avis)
|
||||
- if avis.answer == nil
|
||||
|
|
|
@ -30,11 +30,11 @@
|
|||
- @avis.each do |avis|
|
||||
%tr
|
||||
%td.number-col
|
||||
= link_to(avis_path(avis), class: 'cell-link') do
|
||||
= link_to(gestionnaire_avis_path(avis), class: 'cell-link') do
|
||||
%span.icon.folder
|
||||
#{avis.dossier.id}
|
||||
%td= link_to(avis.dossier.user.email, avis_path(avis), class: 'cell-link')
|
||||
%td= link_to(avis.dossier.procedure.libelle, avis_path(avis), class: 'cell-link')
|
||||
%td= link_to(avis.dossier.user.email, gestionnaire_avis_path(avis), class: 'cell-link')
|
||||
%td= link_to(avis.dossier.procedure.libelle, gestionnaire_avis_path(avis), class: 'cell-link')
|
||||
= paginate(@avis)
|
||||
- else
|
||||
%h2.empty-text Aucun avis
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
%span.date Demande d'avis envoyée le #{I18n.l(@avis.created_at.localtime, format: '%d/%m/%y')}
|
||||
%p.introduction= @avis.introduction
|
||||
|
||||
= form_for @avis, url: avis_path(@avis), html: { class: 'form' } do |f|
|
||||
= form_for @avis, url: gestionnaire_avis_path(@avis), html: { class: 'form' } do |f|
|
||||
= f.text_area :answer, rows: 3, placeholder: 'Votre avis', required: true
|
||||
.flex.justify-between.align-baseline
|
||||
%p.confidentiel.flex
|
||||
|
|
|
@ -80,7 +80,7 @@ feature 'The gestionnaire part' do
|
|||
expect(page).to have_text('avis donnés 0')
|
||||
|
||||
click_on dossier.user.email
|
||||
expect(page).to have_current_path(avis_path(dossier.avis.first))
|
||||
expect(page).to have_current_path(gestionnaire_avis_path(dossier.avis.first))
|
||||
|
||||
within(:css, '.tabs') do
|
||||
click_on 'Avis'
|
||||
|
|
|
@ -21,7 +21,7 @@ describe DossierLinkHelper do
|
|||
let(:gestionnaire) { create(:gestionnaire) }
|
||||
let!(:avis) { create(:avis, dossier: dossier, gestionnaire: gestionnaire) }
|
||||
|
||||
it { expect(helper.dossier_linked_path(gestionnaire, dossier)).to eq(avis_path(avis)) }
|
||||
it { expect(helper.dossier_linked_path(gestionnaire, dossier)).to eq(gestionnaire_avis_path(avis)) }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue