simplify new

This commit is contained in:
simon lehericey 2024-11-12 09:43:27 +01:00
parent b3fd3e6570
commit ec9a88a64e
No known key found for this signature in database
GPG key ID: CDE670D827C7B3C5
2 changed files with 3 additions and 3 deletions

View file

@ -1,9 +1,9 @@
# frozen_string_literal: true # frozen_string_literal: true
class Dossiers::NotifiedToggleComponent < ApplicationComponent class Dossiers::NotifiedToggleComponent < ApplicationComponent
def initialize(procedure:, procedure_presentation:) def initialize(procedure_presentation:)
@procedure = procedure
@procedure_presentation = procedure_presentation @procedure_presentation = procedure_presentation
@procedure = procedure_presentation.procedure
@sorted_column = procedure_presentation.sorted_column @sorted_column = procedure_presentation.sorted_column
end end
end end

View file

@ -62,7 +62,7 @@
.flex.align-center .flex.align-center
- if @filtered_sorted_paginated_ids.present? || @current_filters.count > 0 - if @filtered_sorted_paginated_ids.present? || @current_filters.count > 0
= render partial: "dossiers_filter_dropdown", locals: { procedure: @procedure, statut: @statut, procedure_presentation: @procedure_presentation } = 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' = render Dossiers::NotifiedToggleComponent.new(procedure_presentation: @procedure_presentation) if @statut != 'a-suivre'
.fr-ml-auto .fr-ml-auto
- if @dossiers_count > 0 - if @dossiers_count > 0