diff --git a/app/views/new_gestionnaire/dossiers/_header.html.haml b/app/views/new_gestionnaire/dossiers/_header.html.haml index efeb63593..ddeb9d4a5 100644 --- a/app/views/new_gestionnaire/dossiers/_header.html.haml +++ b/app/views/new_gestionnaire/dossiers/_header.html.haml @@ -3,7 +3,7 @@ .flex.justify-between %ul.breadcrumbs %li - = link_to dossier.procedure.libelle.truncate_words(10), procedure_path(dossier.procedure), title: dossier.procedure.libelle + = link_to dossier.procedure.libelle.truncate_words(10), gestionnaire_procedure_path(dossier.procedure), title: dossier.procedure.libelle %li = "Dossier nº #{dossier.id}" .mixed-buttons-bar diff --git a/app/views/new_gestionnaire/procedures/index.html.haml b/app/views/new_gestionnaire/procedures/index.html.haml index c4faed67a..a1f6782be 100644 --- a/app/views/new_gestionnaire/procedures/index.html.haml +++ b/app/views/new_gestionnaire/procedures/index.html.haml @@ -6,7 +6,7 @@ %ul.procedure-list - @procedures.each do |p| %li.procedure-item.flex.align-start - = link_to(procedure_path(p)) do + = link_to(gestionnaire_procedure_path(p)) do .flex .procedure-logo{ style: p.logo.present? ? "background-image: url(#{p.logo.url})" : nil } @@ -18,7 +18,7 @@ %ul.procedure-stats.flex %li %object - = link_to(procedure_path(p, statut: 'a-suivre')) do + = link_to(gestionnaire_procedure_path(p, statut: 'a-suivre')) do - a_suivre_count = @dossiers_a_suivre_count_per_procedure[p.id] || 0 .stats-number = a_suivre_count @@ -26,7 +26,7 @@ à suivre %li %object - = link_to(procedure_path(p, statut: 'suivis')) do + = link_to(gestionnaire_procedure_path(p, statut: 'suivis')) do - if current_gestionnaire.notifications_per_procedure[p.id].present? %span.notifications{ 'aria-label': "notifications" } - followed_count = @followed_dossiers_count_per_procedure[p.id] || 0 @@ -36,7 +36,7 @@ = t('pluralize.followed', count: followed_count) %li %object - = link_to(procedure_path(p, statut: 'traites')) do + = link_to(gestionnaire_procedure_path(p, statut: 'traites')) do - if current_gestionnaire.notifications_per_procedure(:termine)[p.id].present? %span.notifications{ 'aria-label': "notifications" } - termines_count = @dossiers_termines_count_per_procedure[p.id] || 0 @@ -46,7 +46,7 @@ = t('pluralize.processed', count: termines_count) %li %object - = link_to(procedure_path(p, statut: 'tous')) do + = link_to(gestionnaire_procedure_path(p, statut: 'tous')) do - dossier_count = @dossiers_count_per_procedure[p.id] || 0 .stats-number = dossier_count @@ -54,7 +54,7 @@ = t('pluralize.case', count: dossier_count) %li %object - = link_to(procedure_path(p, statut: 'archives')) do + = link_to(gestionnaire_procedure_path(p, statut: 'archives')) do - archived_count = @dossiers_archived_count_per_procedure[p.id] || 0 .stats-number = archived_count diff --git a/app/views/new_gestionnaire/procedures/show.html.haml b/app/views/new_gestionnaire/procedures/show.html.haml index b0b460876..01d9b34bb 100644 --- a/app/views/new_gestionnaire/procedures/show.html.haml +++ b/app/views/new_gestionnaire/procedures/show.html.haml @@ -11,31 +11,31 @@ %h1= @procedure.libelle %ul.tabs %li{ class: (@statut == 'a-suivre') ? 'active' : nil }> - = link_to(procedure_path(@procedure, statut: 'a-suivre')) do + = link_to(gestionnaire_procedure_path(@procedure, statut: 'a-suivre')) do à suivre %span.badge= @a_suivre_dossiers.count %li{ class: (@statut == 'suivis') ? 'active' : nil }> - if current_gestionnaire.notifications_for_procedure(@procedure).present? %span.notifications{ 'aria-label': 'notifications' } - = link_to(procedure_path(@procedure, statut: 'suivis')) do + = link_to(gestionnaire_procedure_path(@procedure, statut: 'suivis')) do = t('pluralize.followed', count: @followed_dossiers.count) %span.badge= @followed_dossiers.count %li{ class: (@statut == 'traites') ? 'active' : nil }> - if current_gestionnaire.notifications_for_procedure(@procedure, :termine).present? %span.notifications{ 'aria-label': 'notifications' } - = link_to(procedure_path(@procedure, statut: 'traites')) do + = link_to(gestionnaire_procedure_path(@procedure, statut: 'traites')) do = t('pluralize.processed', count: @termines_dossiers.count) %span.badge= @termines_dossiers.count %li{ class: (@statut == 'tous') ? 'active' : nil }> - = link_to(procedure_path(@procedure, statut: 'tous')) do + = link_to(gestionnaire_procedure_path(@procedure, statut: 'tous')) do tous les dossiers %span.badge= @all_state_dossiers.count %li{ class: (@statut == 'archives') ? 'active' : nil }> - = link_to(procedure_path(@procedure, statut: 'archives')) do + = link_to(gestionnaire_procedure_path(@procedure, statut: 'archives')) do = t('pluralize.archived', count: @archived_dossiers.count) %span.badge= @archived_dossiers.count diff --git a/spec/features/new_gestionnaire/gestionnaire_spec.rb b/spec/features/new_gestionnaire/gestionnaire_spec.rb index 65292c2c2..fdf4dea9c 100644 --- a/spec/features/new_gestionnaire/gestionnaire_spec.rb +++ b/spec/features/new_gestionnaire/gestionnaire_spec.rb @@ -13,7 +13,7 @@ feature 'The gestionnaire part' do expect(page).to have_current_path(procedures_path) click_on procedure.libelle - expect(page).to have_current_path(procedure_path(procedure)) + expect(page).to have_current_path(gestionnaire_procedure_path(procedure)) click_on dossier.user.email expect(page).to have_current_path(gestionnaire_dossier_path(procedure, dossier)) @@ -40,16 +40,16 @@ feature 'The gestionnaire part' do dossier_present?(dossier.id, 'en construction') click_on 'Suivre le dossier' - expect(page).to have_current_path(procedure_path(procedure)) + expect(page).to have_current_path(gestionnaire_procedure_path(procedure)) test_statut_bar(suivi: 1, tous_les_dossiers: 1) expect(page).to have_text('Aucun dossier') click_on 'suivi' - expect(page).to have_current_path(procedure_path(procedure, statut: 'suivis')) + expect(page).to have_current_path(gestionnaire_procedure_path(procedure, statut: 'suivis')) dossier_present?(dossier.id, 'en construction') click_on 'Ne plus suivre' - expect(page).to have_current_path(procedure_path(procedure, statut: 'suivis')) + expect(page).to have_current_path(gestionnaire_procedure_path(procedure, statut: 'suivis')) test_statut_bar(a_suivre: 1, tous_les_dossiers: 1) expect(page).to have_text('Aucun dossier') end