diff --git a/app/controllers/backoffice/dossiers/procedure_controller.rb b/app/controllers/backoffice/dossiers/procedure_controller.rb index 1f55c5f42..bb43d4584 100644 --- a/app/controllers/backoffice/dossiers/procedure_controller.rb +++ b/app/controllers/backoffice/dossiers/procedure_controller.rb @@ -5,7 +5,8 @@ class Backoffice::Dossiers::ProcedureController < ApplicationController before_action :authenticate_gestionnaire! def show - smartlisting_dossier (params[:liste] || 'a_traiter') + cookies[:liste] = params[:liste] || cookies[:liste] || 'a_traiter' + smartlisting_dossier cookies[:liste] render 'backoffice/dossiers/index' rescue ActiveRecord::RecordNotFound diff --git a/app/controllers/backoffice/dossiers_controller.rb b/app/controllers/backoffice/dossiers_controller.rb index 7c1187471..2497f1199 100644 --- a/app/controllers/backoffice/dossiers_controller.rb +++ b/app/controllers/backoffice/dossiers_controller.rb @@ -5,7 +5,8 @@ class Backoffice::DossiersController < ApplicationController before_action :authenticate_gestionnaire! def index - smartlisting_dossier (params[:liste] || 'a_traiter') + cookies[:liste] = params[:liste] || cookies[:liste] || 'a_traiter' + smartlisting_dossier (cookies[:liste]) end def show diff --git a/app/controllers/users/dossiers_controller.rb b/app/controllers/users/dossiers_controller.rb index 4193859c9..891bf600b 100644 --- a/app/controllers/users/dossiers_controller.rb +++ b/app/controllers/users/dossiers_controller.rb @@ -10,7 +10,8 @@ class Users::DossiersController < UsersController end def index - @dossiers_list_facade = DossiersListFacades.new current_user, (params[:liste] || 'a_traiter') + cookies[:liste] = params[:liste] || cookies[:liste] || 'a_traiter' + @dossiers_list_facade = DossiersListFacades.new current_user, cookies[:liste] @dossiers = smart_listing_create :dossiers, @dossiers_list_facade.dossiers_to_display,