dossier: add a messagerie_available? method
This commit is contained in:
parent
ad57c6ef99
commit
ce9c5da6e1
2 changed files with 5 additions and 1 deletions
|
@ -170,6 +170,10 @@ class Dossier < ApplicationRecord
|
|||
brouillon? || en_construction?
|
||||
end
|
||||
|
||||
def messagerie_available?
|
||||
!brouillon? && !archived
|
||||
end
|
||||
|
||||
def retention_end_date
|
||||
if instruction_commencee?
|
||||
en_instruction_at + procedure.duree_conservation_dossiers_dans_ds.months
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
%li.footer-column
|
||||
%h3.footer-header Poser une question sur votre dossier :
|
||||
%p
|
||||
- if dossier.present? && !dossier.brouillon?
|
||||
- if dossier.present? && dossier.messagerie_available?
|
||||
Directement
|
||||
= link_to "par la messagerie", messagerie_dossier_path(dossier)
|
||||
- else
|
||||
|
|
Loading…
Reference in a new issue