modify controllers

This commit is contained in:
kara Diaby 2021-06-02 12:45:47 +02:00
parent b4b4e9f0d9
commit 6ed339e7aa
2 changed files with 22 additions and 0 deletions

View file

@ -209,6 +209,7 @@ module Instructeurs
@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
end
private

View 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