Group the cumulative and monthly charts
This commit is contained in:
parent
3215411547
commit
9585142468
2 changed files with 23 additions and 21 deletions
|
@ -10,11 +10,11 @@ class StatsController < ApplicationController
|
|||
@procedures_count = procedures.count
|
||||
@dossiers_count = dossiers.count
|
||||
|
||||
@procedures_in_the_last_4_months = last_four_months_hash(procedures)
|
||||
@dossiers_in_the_last_4_months = last_four_months_hash(dossiers, :initiated_at)
|
||||
|
||||
@procedures_cumulative = cumulative_hash(procedures)
|
||||
@procedures_in_the_last_4_months = last_four_months_hash(procedures)
|
||||
|
||||
@dossiers_cumulative = cumulative_hash(dossiers, :initiated_at)
|
||||
@dossiers_in_the_last_4_months = last_four_months_hash(dossiers, :initiated_at)
|
||||
|
||||
@dossier_instruction_mean_time = dossier_instruction_mean_time(dossiers)
|
||||
@dossier_filling_mean_time = dossier_filling_mean_time(dossiers)
|
||||
|
|
|
@ -14,34 +14,36 @@
|
|||
= number_with_delimiter(@dossiers_count)
|
||||
|
||||
.stat-card.stat-card-half.pull-left
|
||||
%span.stat-card-title Procédures dématérialisées / mois
|
||||
%ul.segmented-control.pull-right
|
||||
%li.segmented-control-item.segmented-control-item-active{ :onclick => "TPS.toggleChart(event, '.monthly-procedures-chart');" }
|
||||
Par mois
|
||||
%li.segmented-control-item{ :onclick => "TPS.toggleChart(event, '.cumulative-procedures-chart');" }
|
||||
Cumul
|
||||
%span.stat-card-title.pull-left Procédures dématérialisées
|
||||
.clearfix
|
||||
|
||||
.chart-container
|
||||
.chart
|
||||
.chart.monthly-procedures-chart
|
||||
= column_chart @procedures_in_the_last_4_months,
|
||||
:colors => ["rgba(61, 149, 236, 1)"]
|
||||
|
||||
.stat-card.stat-card-half.pull-left
|
||||
%span.stat-card-title Dossiers déposés / mois
|
||||
|
||||
.chart-container
|
||||
.chart
|
||||
= column_chart @dossiers_in_the_last_4_months,
|
||||
:colors => ["rgba(61, 149, 236, 1)"]
|
||||
|
||||
.stat-card.stat-card-half.pull-left
|
||||
%span.stat-card-title Procédures dématérialisées
|
||||
|
||||
.chart-container
|
||||
.chart.cumulative-procedures-chart
|
||||
.chart.cumulative-procedures-chart.hidden
|
||||
= area_chart @procedures_cumulative,
|
||||
:colors => ["rgba(61, 149, 236, 1)"]
|
||||
|
||||
.stat-card.stat-card-half.pull-left
|
||||
%span.stat-card-title Dossiers déposés
|
||||
%ul.segmented-control.pull-right
|
||||
%li.segmented-control-item.segmented-control-item-active{ :onclick => "TPS.toggleChart(event, '.monthly-dossiers-chart');" }
|
||||
Par mois
|
||||
%li.segmented-control-item{ :onclick => "TPS.toggleChart(event, '.cumulative-dossiers-chart');" }
|
||||
Cumul
|
||||
%span.stat-card-title.pull-left Dossiers déposés
|
||||
.clearfix
|
||||
|
||||
.chart-container
|
||||
.chart.cumulative-dossiers-chart
|
||||
.chart.monthly-dossiers-chart
|
||||
= column_chart @dossiers_in_the_last_4_months,
|
||||
:colors => ["rgba(61, 149, 236, 1)"]
|
||||
.chart.cumulative-dossiers-chart.hidden
|
||||
= area_chart @dossiers_cumulative,
|
||||
:colors => ["rgba(61, 149, 236, 1)"]
|
||||
|
||||
|
|
Loading…
Reference in a new issue