[Fix #1016] display notifications for champs publics
This commit is contained in:
parent
dfbd52c7a0
commit
c6be745067
12 changed files with 81 additions and 13 deletions
|
@ -3,13 +3,14 @@ module NewGestionnaire
|
|||
include ActionView::Helpers::NumberHelper
|
||||
include ActionView::Helpers::TextHelper
|
||||
|
||||
after_action :mark_demande_as_read, only: :show
|
||||
|
||||
def attestation
|
||||
send_data(dossier.attestation.pdf.read, filename: 'attestation.pdf', type: 'application/pdf')
|
||||
end
|
||||
|
||||
def show
|
||||
dossier.notifications.demande.mark_as_read
|
||||
current_gestionnaire.mark_tab_as_seen(dossier, :demande)
|
||||
@demande_seen_at = current_gestionnaire.follows.find_by(dossier: dossier)&.demande_seen_at
|
||||
end
|
||||
|
||||
def messagerie
|
||||
|
@ -192,5 +193,10 @@ module NewGestionnaire
|
|||
|
||||
dossier&.attestation&.emailable?
|
||||
end
|
||||
|
||||
def mark_demande_as_read
|
||||
dossier.notifications.demande.mark_as_read
|
||||
current_gestionnaire.mark_tab_as_seen(dossier, :demande)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue