Disable Messagerie in archived Dossiers and procedures
* Use the existing Dossier#messagerie_available? method * Raise when attempting to build a Commentaire if not messagerie_available? * Disable the Messagerie form if not messagerie_available? * Add tests :) * Tweak the Horaires formatting while we’re here.
This commit is contained in:
parent
8febe8c21f
commit
bd47bf2691
8 changed files with 58 additions and 5 deletions
|
@ -177,7 +177,7 @@ class Dossier < ApplicationRecord
|
|||
end
|
||||
|
||||
def messagerie_available?
|
||||
!brouillon? && !archived
|
||||
!brouillon? && !archived && !procedure.archivee?
|
||||
end
|
||||
|
||||
def retention_end_date
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue