A cookie file keep the last navigation tab for user and gestionnaire
This commit is contained in:
parent
c5035ca81e
commit
30acd9bb3e
3 changed files with 6 additions and 3 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue