2016-09-27 17:26:49 +02:00
|
|
|
class Backoffice::Dossiers::ProcedureController < Backoffice::DossiersListController
|
|
|
|
def index
|
|
|
|
super
|
2016-09-06 11:07:26 +02:00
|
|
|
|
2016-09-27 17:26:49 +02:00
|
|
|
dossiers_list_facade.service.filter_procedure! params[:id]
|
2016-11-23 15:21:42 +01:00
|
|
|
|
2016-09-06 11:07:26 +02:00
|
|
|
render 'backoffice/dossiers/index'
|
|
|
|
rescue ActiveRecord::RecordNotFound
|
2016-12-16 17:15:13 +01:00
|
|
|
flash.alert = "Cette procédure n'existe pas ou vous n'y avez pas accès."
|
2016-09-06 11:07:26 +02:00
|
|
|
redirect_to backoffice_dossiers_path
|
|
|
|
end
|
|
|
|
|
2016-10-04 19:19:03 +02:00
|
|
|
def filter
|
|
|
|
super
|
|
|
|
|
2016-12-16 17:15:13 +01:00
|
|
|
redirect_to backoffice_dossiers_procedure_path(id: params[:id])
|
2016-10-04 19:19:03 +02:00
|
|
|
end
|
|
|
|
|
2016-09-06 11:07:26 +02:00
|
|
|
private
|
|
|
|
|
|
|
|
def retrieve_procedure
|
|
|
|
current_gestionnaire.procedures.find params[:id]
|
|
|
|
end
|
2017-04-27 12:17:50 +02:00
|
|
|
|
2016-09-06 11:07:26 +02:00
|
|
|
end
|