[#2180] Fix ordering of piece jointe champs
This commit is contained in:
parent
73168f3046
commit
21dbe44e07
2 changed files with 39 additions and 1 deletions
|
@ -33,7 +33,13 @@ class PiecesJustificativesService
|
|||
end
|
||||
|
||||
def self.types_pj_as_types_de_champ(procedure)
|
||||
order_place = procedure.types_de_champ.last&.order_place || 0
|
||||
last_champ = procedure.types_de_champ.last
|
||||
if last_champ.present?
|
||||
order_place = last_champ.order_place + 1
|
||||
else
|
||||
order_place = 0
|
||||
end
|
||||
|
||||
types_de_champ = [
|
||||
TypeDeChamp.new(
|
||||
libelle: "Pièces jointes",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue