Merge pull request #10656 from colinux/fix-when-removing-all-displayed-fields

ETQ instructeur, pas d'erreur quand on veut enlever la dernière colonne affichée dans le tableau
This commit is contained in:
Paul Chavard 2024-07-30 08:11:02 +00:00 committed by GitHub
commit 12c11c563f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 8 additions and 1 deletions

View file

@ -134,7 +134,8 @@ module Instructeurs
end
def update_displayed_fields
values = params['values'].presence || []
values = (params['values'].presence || []).reject(&:empty?)
procedure_presentation.update_displayed_fields(values)
redirect_back(fallback_location: instructeur_procedure_url(procedure))

View file

@ -60,6 +60,12 @@ describe "procedure filters" do
expect(page).not_to have_link(type_de_champ.libelle)
expect(page).not_to have_link(champ.value)
end
# Test removal of all customizable fields
remove_column("Demandeur")
within ".dossiers-table" do
expect(page).not_to have_link("Demandeur")
end
end
scenario "should be able to add and remove filter", js: true do