cache not_archived notification list

This commit is contained in:
clemkeirua 2020-09-14 13:52:28 +02:00 committed by LeSim (Rebase PR Action)
parent 47181ca80b
commit e96709a4f8
2 changed files with 3 additions and 1 deletions

View file

@ -98,6 +98,8 @@ module Instructeurs
@archived_dossiers
end
@not_archived_notifications_dossier_ids = current_instructeur.notifications_for_procedure(@procedure, :not_archived).pluck(:id)
sorted_ids = procedure_presentation.sorted_ids(@dossiers, current_instructeur)
if @current_filters.count > 0

View file

@ -135,7 +135,7 @@
%td.folder-col
= link_to(instructeur_dossier_path(@procedure, dossier), class: 'cell-link') do
%span.icon.folder
- if current_instructeur.notifications_for_procedure(@procedure, :not_archived).include?(dossier)
- if @not_archived_notifications_dossier_ids.include?(dossier.id)
%span.notifications{ 'aria-label': 'notifications' }
%td.number-col