Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ETQ instructeur] je retrouve les labels dans les exports #11209

Merged
merged 2 commits into from
Jan 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions app/assets/stylesheets/dsfr.scss
Original file line number Diff line number Diff line change
Expand Up @@ -262,3 +262,8 @@ input[type='radio'] {
display: none !important;
}
}

// We want labels to be centered inside dossiers table
.fr-table .fr-tags-group .fr-tag {
margin-top: 0.5rem;
}
2 changes: 2 additions & 0 deletions app/models/columns/dossier_column.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ def value(dossier)
dossier.individual.public_send(column)
when 'groupe_instructeur'
dossier.groupe_instructeur.label
when 'dossier_labels'
dossier.labels.map(&:name).join(' ')
when 'followers_instructeurs'
dossier.followers_instructeurs.map(&:email).join(' ')
end
Expand Down
1 change: 1 addition & 0 deletions app/models/concerns/columns_concern.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
columns.concat([dossier_motivation_column])
columns.concat(sva_svr_columns(for_export: true)) if sva_svr_enabled?
columns.concat([groupe_instructeurs_id_column, followers_instructeurs_email_column])
columns.concat([dossier_labels_column])

Check warning on line 57 in app/models/concerns/columns_concern.rb

View check run for this annotation

Codecov / codecov/patch

app/models/concerns/columns_concern.rb#L57

Added line #L57 was not covered by tests

# ensure the columns exist in main list
# otherwise, they will be found by the find_column method
Expand Down
3 changes: 2 additions & 1 deletion spec/models/concerns/columns_concern_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,8 @@
procedure.find_column(label: "Date de traitement"),
procedure.find_column(label: "Motivation de la décision"),
procedure.find_column(label: "Instructeurs"),
procedure.find_column(label: "Groupe instructeur")
procedure.find_column(label: "Groupe instructeur"),
procedure.find_column(label: "Labels")
]
actuals = procedure.dossier_columns_for_export.map(&:h_id)
expected.each do |expected_col|
Expand Down
Loading