refactor(attachment): bring batch user_can_destroy, update tests

This commit is contained in:
Colin Darie 2022-11-21 18:32:17 +01:00
parent df135b080b
commit b609c3dae4
9 changed files with 152 additions and 89 deletions

View file

@ -1,2 +1,2 @@
- user_can_destroy = !@champ.mandatory? || @champ.dossier.brouillon?
= render Attachment::EditComponent.new(champ: @form.object, attached_file: @champ.piece_justificative_file, attachment: @champ.piece_justificative_file[0])
= render Attachment::EditComponent.new(champ: @form.object, attached_file: @champ.piece_justificative_file, attachment: @champ.piece_justificative_file[0], user_can_destroy:)