fix(repetition): re-add repetition style and indexing

This commit is contained in:
Martin 2024-02-08 16:41:24 +01:00 committed by Paul Chavard
parent 2eb1f54aa1
commit 436caa2305

View file

@ -2,8 +2,10 @@
- if champ.repetition? - if champ.repetition?
- types_de_champ = champ.dossier.revision.children_of(champ.type_de_champ) - types_de_champ = champ.dossier.revision.children_of(champ.type_de_champ)
- champs_by_stable_id_with_row = champ.dossier.champs_by_stable_id_with_row - champs_by_stable_id_with_row = champ.dossier.champs_by_stable_id_with_row
- champ.row_ids.each do |row_id| - champ.row_ids.each.with_index do |row_id, i|
= render ViewableChamp::SectionComponent.new(types_de_champ:, champs_by_stable_id_with_row:, row_id:, demande_seen_at: seen_at, profile:) .fr-background-alt--grey.fr-p-2w.fr-my-3w.fr-ml-2w.champ-repetition
%p.font-weight-bold= "#{champ.libelle} #{i + 1} :"
= render ViewableChamp::SectionComponent.new(types_de_champ:, champs_by_stable_id_with_row:, row_id:, demande_seen_at: seen_at, profile:)
- else - else
= render Dossiers::RowShowComponent.new(label: champ.libelle, seen_at:, profile:, content_class: champ.type_champ, updated_at: updated_after_deposer?(champ) ? champ.updated_at : nil) do |c| = render Dossiers::RowShowComponent.new(label: champ.libelle, seen_at:, profile:, content_class: champ.type_champ, updated_at: updated_after_deposer?(champ) ? champ.updated_at : nil) do |c|