add @dossiers_states to compute more dossier count
This commit is contained in:
parent
6e17eeb635
commit
e9adcdd7fc
2 changed files with 4 additions and 2 deletions
|
@ -4,6 +4,8 @@ class StatsController < ApplicationController
|
|||
MEAN_NUMBER_OF_CHAMPS_IN_A_FORM = 24.0
|
||||
|
||||
def index
|
||||
@dossiers_states = dossiers_states
|
||||
|
||||
procedures = Procedure.publiees_ou_closes
|
||||
dossiers = Dossier.state_not_brouillon
|
||||
|
||||
|
@ -14,7 +16,7 @@ class StatsController < ApplicationController
|
|||
|
||||
@contact_percentage = contact_percentage
|
||||
|
||||
@dossiers_states = dossiers_states
|
||||
@dossiers_states_for_pie = @dossiers_states.slice("Brouillon", "En construction", "En instruction", "Terminé")
|
||||
|
||||
@procedures_cumulative = cumulative_hash(procedures, :published_at)
|
||||
@procedures_in_the_last_4_months = last_four_months_hash(procedures, :published_at)
|
||||
|
|
|
@ -55,7 +55,7 @@
|
|||
|
||||
.chart-container
|
||||
.chart
|
||||
= pie_chart @dossiers_states,
|
||||
= pie_chart @dossiers_states_for_pie,
|
||||
colors: ["rgba(222, 238, 265, 1)", "rgba(191, 220, 249, 1)", "rgba(113, 176, 239, 1)", "rgba(61, 149, 236, 1)"]
|
||||
|
||||
.stat-card.stat-card-half.pull-left
|
||||
|
|
Loading…
Reference in a new issue