Show notifications on dossiers terminé

Closes #1138
This commit is contained in:
Paul Chavard 2018-02-20 15:53:07 +01:00
parent 55f15b2354
commit 2cf0985585
2 changed files with 5 additions and 1 deletions

View file

@ -37,6 +37,8 @@
%li
%object
= link_to(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
.stats-number
= termines_count

View file

@ -23,6 +23,8 @@
%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
= t('pluralize.processed', count: @termines_dossiers.count)
%span.badge= @termines_dossiers.count
@ -94,7 +96,7 @@
%td.folder-col
= link_to(dossier_path(@procedure, dossier), class: 'cell-link') do
%span.icon.folder
- if current_gestionnaire.notifications_for_procedure(@procedure).include?(dossier.id)
- if current_gestionnaire.notifications_for_procedure(@procedure, :not_archived).include?(dossier.id)
%span.notifications{ 'aria-label': 'notifications' }
%td.number-col