diff --git a/app/controllers/backoffice/dossiers/procedure_controller.rb b/app/controllers/backoffice/dossiers/procedure_controller.rb index bb43d4584..d57a862a0 100644 --- a/app/controllers/backoffice/dossiers/procedure_controller.rb +++ b/app/controllers/backoffice/dossiers/procedure_controller.rb @@ -8,6 +8,8 @@ class Backoffice::Dossiers::ProcedureController < ApplicationController cookies[:liste] = params[:liste] || cookies[:liste] || 'a_traiter' smartlisting_dossier cookies[:liste] + current_gestionnaire.update_column :procedure_filter, [params[:id]] + render 'backoffice/dossiers/index' rescue ActiveRecord::RecordNotFound flash[:alert] = "Cette procédure n'existe pas ou vous n'y avez pas accès." diff --git a/app/controllers/backoffice/dossiers_controller.rb b/app/controllers/backoffice/dossiers_controller.rb index 2497f1199..ec0e0206d 100644 --- a/app/controllers/backoffice/dossiers_controller.rb +++ b/app/controllers/backoffice/dossiers_controller.rb @@ -6,6 +6,9 @@ class Backoffice::DossiersController < ApplicationController def index cookies[:liste] = params[:liste] || cookies[:liste] || 'a_traiter' + + current_gestionnaire.update_column :procedure_filter, [] + smartlisting_dossier (cookies[:liste]) end diff --git a/app/views/layouts/_navbar.html.haml b/app/views/layouts/_navbar.html.haml index 718624635..439eee8c4 100644 --- a/app/views/layouts/_navbar.html.haml +++ b/app/views/layouts/_navbar.html.haml @@ -6,7 +6,8 @@ = image_tag('marianne_small.png', class: 'logo') %a{href: '/'} = image_tag('logo-tps.png', class: 'logo') -%a{href: '/', class: 'btn btn-md'} + +%a{href: (current_gestionnaire.procedure_filter.empty? ? '/' : backoffice_dossiers_procedure_path(current_gestionnaire.procedure_filter)), class: 'btn btn-md'} -if gestionnaire_signed_in? || user_signed_in? Mes Dossiers -elsif administrateur_signed_in?