small refactors

This commit is contained in:
simon lehericey 2024-09-27 10:00:48 +02:00
parent 097074fdc7
commit 3e73ff0d35
No known key found for this signature in database
GPG key ID: CDE670D827C7B3C5
3 changed files with 3 additions and 7 deletions

View file

@ -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

View file

@ -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:)

View file

@ -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