diff --git a/app/models/dossier.rb b/app/models/dossier.rb index c47c5c935..1b8516399 100644 --- a/app/models/dossier.rb +++ b/app/models/dossier.rb @@ -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 diff --git a/app/views/new_user/_procedure_footer.html.haml b/app/views/new_user/_procedure_footer.html.haml index 838a18913..81e5c7ccb 100644 --- a/app/views/new_user/_procedure_footer.html.haml +++ b/app/views/new_user/_procedure_footer.html.haml @@ -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