Add new total numbers to the Stats page

This commit is contained in:
gregoirenovel 2017-04-03 17:04:31 +02:00
parent 52ea4a1b8d
commit 11015787bf
4 changed files with 36 additions and 1 deletions

View file

@ -3,7 +3,7 @@ var TPS = TPS || {};
TPS.toggleChart = function(event, chartClass) {
var nextSelectorItem = $(event.target),
nextChart = $(chartClass),
nextChartId = nextChart.children().first().attr('id'),
nextChartId = nextChart.children().first().attr("id"),
currentSelectorItem = nextSelectorItem.parent().find(".segmented-control-item-active"),
currentChart = nextSelectorItem.parent().parent().find(".chart:not(.hidden)");

View file

@ -1,6 +1,7 @@
@import "card";
$dark-grey: #333333;
$light-grey: #999999;
$blue: rgba(61, 149, 236, 1);
$blue-hover: rgba(61, 149, 236, 0.8);
@ -100,3 +101,24 @@ $segmented-control-item-border-radius: 2 * $default-space;
.chart {
width: 100%;
}
$big-number-card-padding: 2 * $segmented-control-item-border-radius;
.big-number-card {
padding: $big-number-card-padding;
}
.big-number-card-title {
display: block;
text-align: center;
margin: 0 auto;
color: $light-grey;
}
.big-number-card-number {
display: block;
text-align: center;
font-size: 90px;
line-height: 90px;
font-weight: bold;
color: $blue;
}

View file

@ -9,6 +9,9 @@ class StatsController < ApplicationController
@procedures_cumulative = cumulative_hash(procedures)
@dossiers_cumulative = cumulative_hash(dossiers)
@procedures_count = procedures.count
@dossiers_count = dossiers.count
end
private

View file

@ -40,4 +40,14 @@
= line_chart @dossiers_30_days_flow,
:colors => ["rgba(61, 149, 236, 1)"]
.stat-card.stat-card-half.big-number-card.pull-left
%span.big-number-card-title TOTAL DÉMARCHES DÉMATÉRIALISÉES
%span.big-number-card-number
= @procedures_count
.stat-card.stat-card-half.big-number-card.pull-left
%span.big-number-card-title TOTAL DOSSIERS DÉPOSÉS
%span.big-number-card-number
= @dossiers_count
.clearfix