Get gestionnaire unread notifications for his follows files
This commit is contained in:
parent
ce5bf8d622
commit
2e13cb6818
4 changed files with 9 additions and 9 deletions
|
@ -63,7 +63,11 @@ class Gestionnaire < ActiveRecord::Base
|
|||
PreferenceSmartListingPage.create(page: 1, procedure: nil, gestionnaire: self, liste: 'a_traiter')
|
||||
end
|
||||
|
||||
def unread_notifications procedure
|
||||
def notifications
|
||||
Notification.where(already_read: false, dossier_id: follows.pluck(:dossier_id) )
|
||||
end
|
||||
|
||||
def notifications_for procedure
|
||||
procedure_ids = dossiers_follow.pluck(:procedure_id)
|
||||
|
||||
if procedure_ids.include?(procedure.id)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue