Keep procedure filter when gestionnaire select on

This commit is contained in:
Xavier J 2016-09-26 13:58:54 +02:00
parent 1f1b235283
commit ee9c38c0f8
3 changed files with 7 additions and 1 deletions

View file

@ -8,6 +8,8 @@ class Backoffice::Dossiers::ProcedureController < ApplicationController
cookies[:liste] = params[:liste] || cookies[:liste] || 'a_traiter' cookies[:liste] = params[:liste] || cookies[:liste] || 'a_traiter'
smartlisting_dossier cookies[:liste] smartlisting_dossier cookies[:liste]
current_gestionnaire.update_column :procedure_filter, [params[:id]]
render 'backoffice/dossiers/index' render 'backoffice/dossiers/index'
rescue ActiveRecord::RecordNotFound rescue ActiveRecord::RecordNotFound
flash[:alert] = "Cette procédure n'existe pas ou vous n'y avez pas accès." flash[:alert] = "Cette procédure n'existe pas ou vous n'y avez pas accès."

View file

@ -6,6 +6,9 @@ class Backoffice::DossiersController < ApplicationController
def index def index
cookies[:liste] = params[:liste] || cookies[:liste] || 'a_traiter' cookies[:liste] = params[:liste] || cookies[:liste] || 'a_traiter'
current_gestionnaire.update_column :procedure_filter, []
smartlisting_dossier (cookies[:liste]) smartlisting_dossier (cookies[:liste])
end end

View file

@ -6,7 +6,8 @@
= image_tag('marianne_small.png', class: 'logo') = image_tag('marianne_small.png', class: 'logo')
%a{href: '/'} %a{href: '/'}
= image_tag('logo-tps.png', class: 'logo') = 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? -if gestionnaire_signed_in? || user_signed_in?
Mes Dossiers Mes Dossiers
-elsif administrateur_signed_in? -elsif administrateur_signed_in?