tag old methods to be remove in a next pr
This commit is contained in:
parent
c28087ba3b
commit
59b7b3dc91
2 changed files with 8 additions and 0 deletions
|
@ -132,6 +132,7 @@ module Instructeurs
|
||||||
@statut = 'supprime'
|
@statut = 'supprime'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# TODO: to remove because of new procedure_presentation_controller
|
||||||
def update_displayed_fields
|
def update_displayed_fields
|
||||||
ids = (params['values'].presence || []).reject(&:empty?)
|
ids = (params['values'].presence || []).reject(&:empty?)
|
||||||
|
|
||||||
|
@ -140,12 +141,14 @@ module Instructeurs
|
||||||
redirect_back(fallback_location: instructeur_procedure_url(procedure))
|
redirect_back(fallback_location: instructeur_procedure_url(procedure))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# TODO: to remove because of new procedure_presentation_controller
|
||||||
def update_sort
|
def update_sort
|
||||||
procedure_presentation.update!(sorted_column_params)
|
procedure_presentation.update!(sorted_column_params)
|
||||||
|
|
||||||
redirect_back(fallback_location: instructeur_procedure_url(procedure))
|
redirect_back(fallback_location: instructeur_procedure_url(procedure))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# TODO: to remove because of new procedure_presentation_controller
|
||||||
def add_filter
|
def add_filter
|
||||||
if !procedure_presentation.update(filter_params)
|
if !procedure_presentation.update(filter_params)
|
||||||
# complicated way to display inner error messages
|
# complicated way to display inner error messages
|
||||||
|
@ -156,6 +159,7 @@ module Instructeurs
|
||||||
redirect_back(fallback_location: instructeur_procedure_url(procedure))
|
redirect_back(fallback_location: instructeur_procedure_url(procedure))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# TODO: to remove because of new procedure_presentation_controller
|
||||||
def update_filter
|
def update_filter
|
||||||
@statut = statut
|
@statut = statut
|
||||||
@procedure = procedure
|
@procedure = procedure
|
||||||
|
@ -407,10 +411,12 @@ module Instructeurs
|
||||||
"exports_#{@procedure.id}_seen_at"
|
"exports_#{@procedure.id}_seen_at"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# TODO: to remove because of new procedure_presentation_controller
|
||||||
def sorted_column_params
|
def sorted_column_params
|
||||||
params.permit(sorted_column: [:order, :id])
|
params.permit(sorted_column: [:order, :id])
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# TODO: to remove because of new procedure_presentation_controller
|
||||||
def filter_params
|
def filter_params
|
||||||
keys = [:tous_filters, :a_suivre_filters, :suivis_filters, :traites_filters, :expirant_filters, :archives_filters, :supprimes_filters]
|
keys = [:tous_filters, :a_suivre_filters, :suivis_filters, :traites_filters, :expirant_filters, :archives_filters, :supprimes_filters]
|
||||||
h = keys.index_with { [:id, :filter] }
|
h = keys.index_with { [:id, :filter] }
|
||||||
|
|
|
@ -488,11 +488,13 @@ Rails.application.routes.draw do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# TODO: to remove because of new procedure_presentation_controller
|
||||||
patch 'update_displayed_fields'
|
patch 'update_displayed_fields'
|
||||||
get 'update_sort' => 'procedures#update_sort', as: 'update_sort'
|
get 'update_sort' => 'procedures#update_sort', as: 'update_sort'
|
||||||
post 'add_filter'
|
post 'add_filter'
|
||||||
post 'update_filter'
|
post 'update_filter'
|
||||||
get 'remove_filter'
|
get 'remove_filter'
|
||||||
|
|
||||||
get 'download_export'
|
get 'download_export'
|
||||||
post 'download_export'
|
post 'download_export'
|
||||||
get 'polling_last_export'
|
get 'polling_last_export'
|
||||||
|
|
Loading…
Add table
Reference in a new issue