cache encours/termine has notifications

This commit is contained in:
clemkeirua 2020-10-14 15:47:52 +02:00 committed by LeSim (Rebase PR Action)
parent e96709a4f8
commit 5d7680150b
2 changed files with 5 additions and 2 deletions

View file

@ -98,6 +98,9 @@ module Instructeurs
@archived_dossiers
end
@has_en_cours_notifications = current_instructeur.notifications_for_procedure(@procedure, :en_cours).exists?
@has_termine_notifications = current_instructeur.notifications_for_procedure(@procedure, :termine).exists?
@not_archived_notifications_dossier_ids = current_instructeur.notifications_for_procedure(@procedure, :not_archived).pluck(:id)
sorted_ids = procedure_presentation.sorted_ids(@dossiers, current_instructeur)

View file

@ -30,13 +30,13 @@
instructeur_procedure_path(@procedure, statut: 'suivis'),
active: @statut == 'suivis',
badge: number_with_html_delimiter(@followed_dossiers.count),
notification: current_instructeur.notifications_for_procedure(@procedure, :en_cours).exists?)
notification: @has_en_cours_notifications)
= tab_item(t('pluralize.processed', count: @termines_dossiers.count),
instructeur_procedure_path(@procedure, statut: 'traites'),
active: @statut == 'traites',
badge: number_with_html_delimiter(@termines_dossiers.count),
notification: current_instructeur.notifications_for_procedure(@procedure, :termine).exists?)
notification: @has_termine_notifications)
= tab_item('tous les dossiers',
instructeur_procedure_path(@procedure, statut: 'tous'),