Manager: improve dossier view

This commit is contained in:
simon lehericey 2019-02-19 12:38:33 +01:00
parent afc2f2cd8e
commit 2f66625f18
5 changed files with 50 additions and 10 deletions

View file

@ -23,15 +23,15 @@ class Champ < ApplicationRecord
end
def mandatory_and_blank?
if mandatory?
case type_de_champ.type_champ
when TypeDeChamp.type_champs.fetch(:carte)
value.blank? || value == '[]'
else
value.blank?
end
mandatory? && blank?
end
def blank?
case type_de_champ.type_champ
when TypeDeChamp.type_champs.fetch(:carte)
value.blank? || value == '[]'
else
false
value.blank?
end
end