feat: notify administrateur and gestionnaire by email when new commentaire + for administrateur highlight card and commentaires if any unread
This commit is contained in:
parent
86fb28bda0
commit
46c19014f9
20 changed files with 159 additions and 34 deletions
|
@ -145,4 +145,12 @@ class Administrateur < ApplicationRecord
|
|||
# required to display feature flags field in manager
|
||||
def features
|
||||
end
|
||||
|
||||
def unread_commentaires?
|
||||
commentaire_seen_at.nil? || commentaire_seen_at < commentaire_groupe_gestionnaires.last.created_at
|
||||
end
|
||||
|
||||
def mark_commentaire_as_seen
|
||||
update(commentaire_seen_at: Time.zone.now)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue