refactor: minor piece_justificative_multiple? question mark use
This commit is contained in:
parent
a726350f0d
commit
636645f686
2 changed files with 3 additions and 2 deletions
|
@ -1,5 +1,6 @@
|
|||
- user_can_destroy = !@champ.mandatory? || @champ.dossier.brouillon?
|
||||
= render Attachment::MultipleComponent.new(form: @form, attached_file: @champ.piece_justificative_file, user_can_destroy: user_can_destroy, max: @champ.procedure&.piece_justificative_multiple == false ? 1 : nil) do |c|
|
||||
- max = [true, nil].include?(@champ.procedure&.piece_justificative_multiple?) ? 10 : 1
|
||||
= render Attachment::MultipleComponent.new(form: @form, attached_file: @champ.piece_justificative_file, user_can_destroy:, max:) do |c|
|
||||
- if @champ.type_de_champ.piece_justificative_template&.attached?
|
||||
- c.with_template do
|
||||
%p
|
||||
|
|
|
@ -397,7 +397,7 @@ module Administrateurs
|
|||
:tags
|
||||
]
|
||||
|
||||
editable_params << :piece_justificative_multiple if @procedure&.piece_justificative_multiple == false
|
||||
editable_params << :piece_justificative_multiple if @procedure && !@procedure.piece_justificative_multiple?
|
||||
|
||||
permited_params = if @procedure&.locked?
|
||||
params.require(:procedure).permit(*editable_params)
|
||||
|
|
Loading…
Add table
Reference in a new issue