diff --git a/app/views/users/dossiers/index.html.haml b/app/views/users/dossiers/index.html.haml index b98bda8b8..b481b94c3 100644 --- a/app/views/users/dossiers/index.html.haml +++ b/app/views/users/dossiers/index.html.haml @@ -17,7 +17,7 @@ = text_field_tag "q", "#{@search_terms if @search_terms.present?}", placeholder: t('views.users.dossiers.search.search_file'), class: "fr-input" %button.fr-btn.fr-btn--sm = t('views.users.dossiers.search.simple') - - if @procedures_for_select.present? + - if @procedures_for_select.size > 1 .fr-col = render Dossiers::UserProcedureFilterComponent.new(procedures_for_select: @procedures_for_select) diff --git a/spec/views/users/dossiers/index.html.haml_spec.rb b/spec/views/users/dossiers/index.html.haml_spec.rb index 15bff1f26..b4eb96b2b 100644 --- a/spec/views/users/dossiers/index.html.haml_spec.rb +++ b/spec/views/users/dossiers/index.html.haml_spec.rb @@ -19,6 +19,7 @@ describe 'users/dossiers/index', type: :view do assign(:dossier_transferes, Kaminari.paginate_array([]).page(1)) assign(:dossiers_close_to_expiration, Kaminari.paginate_array([]).page(1)) assign(:dossiers, Kaminari.paginate_array(user_dossiers).page(1)) + assign(:procedures_for_select, user_dossiers.map(&:procedure)) assign(:statut, statut) assign(:filter, filter) assign(:all_dossiers_uniq_procedures_count, 0)