Merge pull request #11035 from demarches-simplifiees/use_new_controller_to_sort_notification
Tech: déplace le le tri par notification vers le controller dédié
This commit is contained in:
commit
e84071a14a
3 changed files with 6 additions and 5 deletions
|
@ -1,8 +1,9 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class Dossiers::NotifiedToggleComponent < ApplicationComponent
|
||||
def initialize(procedure:, procedure_presentation:)
|
||||
@procedure = procedure
|
||||
def initialize(procedure_presentation:)
|
||||
@procedure_presentation = procedure_presentation
|
||||
@procedure = procedure_presentation.procedure
|
||||
@sorted_column = procedure_presentation.sorted_column
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
= form_tag update_sort_instructeur_procedure_path(@procedure),
|
||||
method: :get, data: { controller: 'autosubmit' } do
|
||||
= form_with model: [:instructeur, @procedure_presentation],
|
||||
data: { controller: 'autosubmit' } do
|
||||
.fr-fieldset__element.fr-m-0
|
||||
.fr-checkbox-group.fr-checkbox-group--sm
|
||||
= hidden_field_tag 'sorted_column[id]', @procedure.notifications_column.id
|
||||
|
|
|
@ -62,7 +62,7 @@
|
|||
.flex.align-center
|
||||
- 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 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
|
||||
- if @dossiers_count > 0
|
||||
|
|
Loading…
Reference in a new issue