small refactors
This commit is contained in:
parent
097074fdc7
commit
3e73ff0d35
3 changed files with 3 additions and 7 deletions
|
@ -39,11 +39,7 @@ class Instructeurs::ColumnFilterComponent < ApplicationComponent
|
|||
end
|
||||
|
||||
def filterable_columns_options
|
||||
procedure.columns.filter_map do |column|
|
||||
next if column.filterable == false
|
||||
|
||||
[column.label, column.id]
|
||||
end
|
||||
@procedure.columns.filter(&:filterable).map { [_1.label, _1.id] }
|
||||
end
|
||||
|
||||
private
|
||||
|
|
|
@ -3,4 +3,4 @@
|
|||
= t('views.instructeurs.dossiers.filters.title')
|
||||
|
||||
- menu.with_form do
|
||||
= render Instructeurs::ColumnFilterComponent.new(procedure:, procedure_presentation: @procedure_presentation, statut:)
|
||||
= render Instructeurs::ColumnFilterComponent.new(procedure:, procedure_presentation:, statut:)
|
||||
|
|
|
@ -61,7 +61,7 @@
|
|||
%hr
|
||||
.flex.align-center
|
||||
- if @filtered_sorted_paginated_ids.present? || @current_filters.count > 0
|
||||
= render partial: "dossiers_filter_dropdown", locals: { procedure: @procedure, statut: @statut}
|
||||
= render partial: "dossiers_filter_dropdown", locals: { procedure: @procedure, statut: @statut, procedure_presentation: @procedure_presentation }
|
||||
= render Dossiers::NotifiedToggleComponent.new(procedure: @procedure, procedure_presentation: @procedure_presentation) if @statut != 'a-suivre'
|
||||
|
||||
.fr-ml-auto
|
||||
|
|
Loading…
Reference in a new issue