fix(users): don't show procedures filter when there are not enough procedures
This commit is contained in:
parent
f0e1c1688b
commit
c76213cb87
2 changed files with 2 additions and 1 deletions
|
@ -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"
|
= 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
|
%button.fr-btn.fr-btn--sm
|
||||||
= t('views.users.dossiers.search.simple')
|
= t('views.users.dossiers.search.simple')
|
||||||
- if @procedures_for_select.present?
|
- if @procedures_for_select.size > 1
|
||||||
.fr-col
|
.fr-col
|
||||||
= render Dossiers::UserProcedureFilterComponent.new(procedures_for_select: @procedures_for_select)
|
= render Dossiers::UserProcedureFilterComponent.new(procedures_for_select: @procedures_for_select)
|
||||||
|
|
||||||
|
|
|
@ -19,6 +19,7 @@ describe 'users/dossiers/index', type: :view do
|
||||||
assign(:dossier_transferes, Kaminari.paginate_array([]).page(1))
|
assign(:dossier_transferes, Kaminari.paginate_array([]).page(1))
|
||||||
assign(:dossiers_close_to_expiration, 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(:dossiers, Kaminari.paginate_array(user_dossiers).page(1))
|
||||||
|
assign(:procedures_for_select, user_dossiers.map(&:procedure))
|
||||||
assign(:statut, statut)
|
assign(:statut, statut)
|
||||||
assign(:filter, filter)
|
assign(:filter, filter)
|
||||||
assign(:all_dossiers_uniq_procedures_count, 0)
|
assign(:all_dossiers_uniq_procedures_count, 0)
|
||||||
|
|
Loading…
Reference in a new issue