notifications_for_procedure is now based on instructeur.groupe_instructeurs
This commit is contained in:
parent
d411bfddc8
commit
4febf1851f
2 changed files with 8 additions and 5 deletions
|
@ -110,8 +110,10 @@ class Instructeur < ApplicationRecord
|
|||
end
|
||||
|
||||
def notifications_for_procedure(procedure, scope)
|
||||
procedure
|
||||
.defaut_groupe_instructeur.dossiers
|
||||
target_groupes = groupe_instructeurs.where(procedure: procedure)
|
||||
|
||||
Dossier
|
||||
.where(groupe_instructeur: target_groupes)
|
||||
.send(scope) # :en_cours or :termine or :not_archived (or any other Dossier scope)
|
||||
.merge(followed_dossiers)
|
||||
.with_notifications
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue