layout
This commit is contained in:
parent
3555c9696a
commit
66f0fa35f2
4 changed files with 44 additions and 28 deletions
|
@ -5,31 +5,4 @@
|
|||
locals: { steps: [link_to(@procedure.libelle, instructeur_procedure_path(@procedure)),
|
||||
'Statistiques'] }
|
||||
|
||||
.statistiques
|
||||
-# Load Chartkick lazily, by using our React lazy-loader.
|
||||
-# (Chartkick itself doesn't use React though)
|
||||
= react_component('Chartkick')
|
||||
|
||||
%h1.new-h1= title
|
||||
.stat-cards
|
||||
- if @usual_traitement_time.present?
|
||||
.stat-card.big-number-card
|
||||
%span.big-number-card-title TEMPS DE TRAITEMENT USUEL
|
||||
%span.big-number-card-number
|
||||
= distance_of_time_in_words(@usual_traitement_time)
|
||||
%span.big-number-card-detail
|
||||
90% des demandes du mois dernier ont été traitées en moins de #{distance_of_time_in_words(@usual_traitement_time)}.
|
||||
|
||||
.stat-cards
|
||||
.stat-card.stat-card-half.pull-left
|
||||
%span.stat-card-title AVANCÉE DES DOSSIERS
|
||||
.chart-container
|
||||
.chart
|
||||
= area_chart @dossiers_funnel
|
||||
|
||||
.stat-card.stat-card-half.pull-left
|
||||
%span.stat-card-title TAUX D’ACCEPTATION
|
||||
.chart-container
|
||||
.chart
|
||||
- colors = %w(#C3D9FF #0069CC #1C7EC9) # from _colors.scss
|
||||
= pie_chart @termines_states, colors: colors
|
||||
= render partial: 'shared/procedures/stats', locals: { title: title }
|
||||
|
|
35
app/views/shared/procedures/_stats.html.haml
Normal file
35
app/views/shared/procedures/_stats.html.haml
Normal file
|
@ -0,0 +1,35 @@
|
|||
.statistiques
|
||||
-# Load Chartkick lazily, by using our React lazy-loader.
|
||||
-# (Chartkick itself doesn't use React though)
|
||||
= react_component('Chartkick')
|
||||
|
||||
%h1.new-h1= title
|
||||
.stat-cards
|
||||
- if @usual_traitement_time.present?
|
||||
.stat-card.big-number-card
|
||||
%span.big-number-card-title TEMPS DE TRAITEMENT USUEL
|
||||
%span.big-number-card-number
|
||||
= distance_of_time_in_words(@usual_traitement_time)
|
||||
%span.big-number-card-detail
|
||||
90% des demandes du mois dernier ont été traitées en moins de #{distance_of_time_in_words(@usual_traitement_time)}.
|
||||
|
||||
.stat-cards
|
||||
.stat-card.stat-card-half.pull-left
|
||||
%span.stat-card-title AVANCÉE DES DOSSIERS
|
||||
.chart-container
|
||||
.chart
|
||||
= area_chart @dossiers_funnel
|
||||
|
||||
.stat-card.stat-card-half.pull-left
|
||||
%span.stat-card-title TAUX D’ACCEPTATION
|
||||
.chart-container
|
||||
.chart
|
||||
- colors = %w(#C3D9FF #0069CC #1C7EC9) # from _colors.scss
|
||||
= pie_chart @termines_states, colors: colors
|
||||
|
||||
.stat-cards
|
||||
.stat-card.stat-card-half.pull-left
|
||||
%span.stat-card-title RÉPARTITION PAR SEMAINE
|
||||
.chart-container
|
||||
.chart
|
||||
= line_chart @termines_by_week, colors: ["#387EC3", "#AE2C2B", "#FAD859"]
|
4
app/views/statistiques/show.html.haml
Normal file
4
app/views/statistiques/show.html.haml
Normal file
|
@ -0,0 +1,4 @@
|
|||
- title = "Statistiques · #{@procedure.libelle}"
|
||||
- content_for(:title, title)
|
||||
|
||||
= render partial: 'shared/procedures/stats', locals: { title: title }
|
|
@ -33,6 +33,10 @@
|
|||
- horaires = "Horaires : #{formatted_horaires(service.horaires)}"
|
||||
= simple_format(horaires, {}, wrapper_tag: 'span')
|
||||
|
||||
%li
|
||||
Statistiques :
|
||||
= link_to "voir les statistiques de la démarche", statistiques_path(procedure.path)
|
||||
|
||||
|
||||
- politiques = politiques_conservation_de_donnees(procedure)
|
||||
- if politiques.present?
|
||||
|
|
Loading…
Reference in a new issue