Merge pull request #9345 from adullact/feature-ouidou/existing_procedure_hidden_as_template

ETQ superadmin, je peux masquer une démarche de la liste des démarches proposées à la création
This commit is contained in:
krichtof 2023-09-25 08:46:31 +00:00 committed by GitHub
commit f019f1e316
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 113 additions and 7 deletions

View file

@ -540,6 +540,19 @@ class Procedure < ApplicationRecord
whitelisted_at.present?
end
def hidden_as_template?
hidden_at_as_template.present?
end
def hide_as_template!
touch(:hidden_at_as_template)
end
def unhide_as_template!
self.hidden_at_as_template = nil
save
end
def total_dossier
self.dossiers.state_not_brouillon.size
end