modify controllers
This commit is contained in:
parent
b4b4e9f0d9
commit
6ed339e7aa
2 changed files with 22 additions and 0 deletions
|
@ -209,6 +209,7 @@ module Instructeurs
|
||||||
@usual_traitement_time = @procedure.stats_usual_traitement_time
|
@usual_traitement_time = @procedure.stats_usual_traitement_time
|
||||||
@dossiers_funnel = @procedure.stats_dossiers_funnel
|
@dossiers_funnel = @procedure.stats_dossiers_funnel
|
||||||
@termines_states = @procedure.stats_termines_states
|
@termines_states = @procedure.stats_termines_states
|
||||||
|
@termines_by_week = @procedure.stats_termines_by_week
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
21
app/controllers/users/statistiques_controller.rb
Normal file
21
app/controllers/users/statistiques_controller.rb
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
module Users
|
||||||
|
class StatistiquesController < ApplicationController
|
||||||
|
def statistiques
|
||||||
|
@procedure = procedure
|
||||||
|
return procedure_not_found if @procedure.blank? || @procedure.brouillon?
|
||||||
|
|
||||||
|
@usual_traitement_time = @procedure.stats_usual_traitement_time
|
||||||
|
@dossiers_funnel = @procedure.stats_dossiers_funnel
|
||||||
|
@termines_states = @procedure.stats_termines_states
|
||||||
|
@termines_by_week = @procedure.stats_termines_by_week
|
||||||
|
|
||||||
|
render :show
|
||||||
|
end
|
||||||
|
|
||||||
|
private
|
||||||
|
|
||||||
|
def procedure
|
||||||
|
Procedure.publiees.or(Procedure.brouillons).find_by(path: params[:path])
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
Loading…
Reference in a new issue