Gestionnaire: move procedure_path gestionnaire_procedure_path
This commit is contained in:
parent
0dc101e375
commit
4a70087f7a
4 changed files with 16 additions and 16 deletions
|
@ -3,7 +3,7 @@
|
||||||
.flex.justify-between
|
.flex.justify-between
|
||||||
%ul.breadcrumbs
|
%ul.breadcrumbs
|
||||||
%li
|
%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
|
%li
|
||||||
= "Dossier nº #{dossier.id}"
|
= "Dossier nº #{dossier.id}"
|
||||||
.mixed-buttons-bar
|
.mixed-buttons-bar
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
%ul.procedure-list
|
%ul.procedure-list
|
||||||
- @procedures.each do |p|
|
- @procedures.each do |p|
|
||||||
%li.procedure-item.flex.align-start
|
%li.procedure-item.flex.align-start
|
||||||
= link_to(procedure_path(p)) do
|
= link_to(gestionnaire_procedure_path(p)) do
|
||||||
.flex
|
.flex
|
||||||
|
|
||||||
.procedure-logo{ style: p.logo.present? ? "background-image: url(#{p.logo.url})" : nil }
|
.procedure-logo{ style: p.logo.present? ? "background-image: url(#{p.logo.url})" : nil }
|
||||||
|
@ -18,7 +18,7 @@
|
||||||
%ul.procedure-stats.flex
|
%ul.procedure-stats.flex
|
||||||
%li
|
%li
|
||||||
%object
|
%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
|
- a_suivre_count = @dossiers_a_suivre_count_per_procedure[p.id] || 0
|
||||||
.stats-number
|
.stats-number
|
||||||
= a_suivre_count
|
= a_suivre_count
|
||||||
|
@ -26,7 +26,7 @@
|
||||||
à suivre
|
à suivre
|
||||||
%li
|
%li
|
||||||
%object
|
%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?
|
- if current_gestionnaire.notifications_per_procedure[p.id].present?
|
||||||
%span.notifications{ 'aria-label': "notifications" }
|
%span.notifications{ 'aria-label': "notifications" }
|
||||||
- followed_count = @followed_dossiers_count_per_procedure[p.id] || 0
|
- followed_count = @followed_dossiers_count_per_procedure[p.id] || 0
|
||||||
|
@ -36,7 +36,7 @@
|
||||||
= t('pluralize.followed', count: followed_count)
|
= t('pluralize.followed', count: followed_count)
|
||||||
%li
|
%li
|
||||||
%object
|
%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?
|
- if current_gestionnaire.notifications_per_procedure(:termine)[p.id].present?
|
||||||
%span.notifications{ 'aria-label': "notifications" }
|
%span.notifications{ 'aria-label': "notifications" }
|
||||||
- termines_count = @dossiers_termines_count_per_procedure[p.id] || 0
|
- termines_count = @dossiers_termines_count_per_procedure[p.id] || 0
|
||||||
|
@ -46,7 +46,7 @@
|
||||||
= t('pluralize.processed', count: termines_count)
|
= t('pluralize.processed', count: termines_count)
|
||||||
%li
|
%li
|
||||||
%object
|
%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
|
- dossier_count = @dossiers_count_per_procedure[p.id] || 0
|
||||||
.stats-number
|
.stats-number
|
||||||
= dossier_count
|
= dossier_count
|
||||||
|
@ -54,7 +54,7 @@
|
||||||
= t('pluralize.case', count: dossier_count)
|
= t('pluralize.case', count: dossier_count)
|
||||||
%li
|
%li
|
||||||
%object
|
%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
|
- archived_count = @dossiers_archived_count_per_procedure[p.id] || 0
|
||||||
.stats-number
|
.stats-number
|
||||||
= archived_count
|
= archived_count
|
||||||
|
|
|
@ -11,31 +11,31 @@
|
||||||
%h1= @procedure.libelle
|
%h1= @procedure.libelle
|
||||||
%ul.tabs
|
%ul.tabs
|
||||||
%li{ class: (@statut == 'a-suivre') ? 'active' : nil }>
|
%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
|
à suivre
|
||||||
%span.badge= @a_suivre_dossiers.count
|
%span.badge= @a_suivre_dossiers.count
|
||||||
|
|
||||||
%li{ class: (@statut == 'suivis') ? 'active' : nil }>
|
%li{ class: (@statut == 'suivis') ? 'active' : nil }>
|
||||||
- if current_gestionnaire.notifications_for_procedure(@procedure).present?
|
- if current_gestionnaire.notifications_for_procedure(@procedure).present?
|
||||||
%span.notifications{ 'aria-label': 'notifications' }
|
%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)
|
= t('pluralize.followed', count: @followed_dossiers.count)
|
||||||
%span.badge= @followed_dossiers.count
|
%span.badge= @followed_dossiers.count
|
||||||
|
|
||||||
%li{ class: (@statut == 'traites') ? 'active' : nil }>
|
%li{ class: (@statut == 'traites') ? 'active' : nil }>
|
||||||
- if current_gestionnaire.notifications_for_procedure(@procedure, :termine).present?
|
- if current_gestionnaire.notifications_for_procedure(@procedure, :termine).present?
|
||||||
%span.notifications{ 'aria-label': 'notifications' }
|
%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)
|
= t('pluralize.processed', count: @termines_dossiers.count)
|
||||||
%span.badge= @termines_dossiers.count
|
%span.badge= @termines_dossiers.count
|
||||||
|
|
||||||
%li{ class: (@statut == 'tous') ? 'active' : nil }>
|
%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
|
tous les dossiers
|
||||||
%span.badge= @all_state_dossiers.count
|
%span.badge= @all_state_dossiers.count
|
||||||
|
|
||||||
%li{ class: (@statut == 'archives') ? 'active' : nil }>
|
%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)
|
= t('pluralize.archived', count: @archived_dossiers.count)
|
||||||
%span.badge= @archived_dossiers.count
|
%span.badge= @archived_dossiers.count
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ feature 'The gestionnaire part' do
|
||||||
expect(page).to have_current_path(procedures_path)
|
expect(page).to have_current_path(procedures_path)
|
||||||
|
|
||||||
click_on procedure.libelle
|
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
|
click_on dossier.user.email
|
||||||
expect(page).to have_current_path(gestionnaire_dossier_path(procedure, dossier))
|
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')
|
dossier_present?(dossier.id, 'en construction')
|
||||||
|
|
||||||
click_on 'Suivre le dossier'
|
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)
|
test_statut_bar(suivi: 1, tous_les_dossiers: 1)
|
||||||
expect(page).to have_text('Aucun dossier')
|
expect(page).to have_text('Aucun dossier')
|
||||||
|
|
||||||
click_on 'suivi'
|
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')
|
dossier_present?(dossier.id, 'en construction')
|
||||||
|
|
||||||
click_on 'Ne plus suivre'
|
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)
|
test_statut_bar(a_suivre: 1, tous_les_dossiers: 1)
|
||||||
expect(page).to have_text('Aucun dossier')
|
expect(page).to have_text('Aucun dossier')
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue