feat(Champ.repetition): hide destroy button of first repetition row when the repetition is mandatory

This commit is contained in:
mfo 2024-04-12 08:34:34 +02:00
parent 4d90b1f662
commit 4773d9ebad
No known key found for this signature in database
GPG key ID: 7CE3E1F5B794A8EC
4 changed files with 18 additions and 5 deletions

View file

@ -4,7 +4,7 @@
.notice{ notice_params }= render SimpleFormatComponent.new(@champ.description, allow_a: true)
.repetition{ id: dom_id(@champ, :rows) }
.repetition{ id: dom_id(@champ, :rows), class: class_names('utils-repetition-required' => @champ.mandatory?) }
- @champ.row_ids.each.with_index(1) do |row_id, row_number|
= render EditableChamp::RepetitionRowComponent.new(form: @form, dossier: @champ.dossier, type_de_champ: @champ.type_de_champ, row_id:, row_number:, seen_at: @seen_at)