refactor(attestation): hide libelle of empty repetitions

This commit is contained in:
Colin Darie 2024-09-04 17:32:21 +02:00
parent 9f9720d65b
commit 247bb6f8c6
No known key found for this signature in database
GPG key ID: 4FB865FDBCA4BCC4
4 changed files with 33 additions and 5 deletions

View file

@ -31,13 +31,14 @@ class ChampPresentations::RepetitionPresentation < ChampPresentations::BasePrese
[
{
type: 'descriptionTerm',
attrs: champ.blank? ? { class: 'invisible' } : nil, # still render libelle so width & alignment are preserved
content: [
{
type: 'text',
text: champ.libelle
}
]
},
}.compact,
{
type: 'descriptionDetails',
content: [