views: improve the state button

- Turn the "accepted" infos into standard dropdown sections
- Display the justificatif even if there is no motivation
This commit is contained in:
Pierre de La Morinerie 2019-10-15 10:42:51 +00:00
parent dd57953b76
commit db0fede521
11 changed files with 74 additions and 20 deletions

View file

@ -145,6 +145,15 @@ FactoryBot.define do
end
end
trait :with_justificatif do
after(:create) do |dossier, _evaluator|
dossier.justificatif_motivation.attach(
io: StringIO.new('Hello World'),
filename: 'hello.txt'
)
end
end
trait :with_all_champs do
after(:create) do |dossier, _evaluator|
dossier.champs = dossier.procedure.types_de_champ.map do |type_de_champ|