|
| 1 | +<div class="fr-container fr-my-4w"> |
| 2 | + <h1 class="fr-h4"><%= title %></h1> |
| 3 | + |
| 4 | + <div class="fr-grid-row fr-grid-row--gutters"> |
| 5 | + <% if @usual_traitement_time.present? && (local_assigns[:show_user_indication] || @procedure.estimated_processing_duration_visible?) -%> |
| 6 | + <div class="fr-col-xs-12"> |
| 7 | + <div class="fr-callout"> |
| 8 | + <h2 class="fr-callout__title"> |
| 9 | + <%= t('.usual_processing_time') %> |
| 10 | + |
| 11 | + <% if local_assigns[:show_user_indication] -%> |
| 12 | + <%= t('.user_indication') %> |
| 13 | + <% end -%> |
| 14 | + </h2> |
| 15 | + |
| 16 | + <%= render Procedure::EstimatedDelayComponent.new(procedure: @procedure, fallback_to_placeholder: local_assigns[:show_user_indication]) %> |
| 17 | + </div> |
| 18 | + </div> |
| 19 | + <% end -%> |
| 20 | + |
| 21 | + <div class="fr-col-xs-12 fr-col-sm-12 fr-col-lg-6"> |
| 22 | + <div class="fr-callout" data-controller="chartkick"> |
| 23 | + <h2 class="fr-callout__title"><%= t('.processing_time') %></h2> |
| 24 | + |
| 25 | + <p class="fr-callout__text fr-text--md"> |
| 26 | + <%= t('.since_procedure_creation') %> |
| 27 | + </p> |
| 28 | + |
| 29 | + <div class="fr-mt-4w"> |
| 30 | + <div class="chart-procedures-chart" data-chartkick-target="chart"> |
| 31 | + <%= column_chart @usual_traitement_time_by_month, |
| 32 | + library: Chartkick.options[:default_library_config], |
| 33 | + ytitle: t('.nb_days'), legend: "bottom", label: t('.processing_time_graph_description') %> |
| 34 | + </div> |
| 35 | + </div> |
| 36 | + </div> |
| 37 | + </div> |
| 38 | + |
| 39 | + <div class="fr-col-xs-12 fr-col-sm-12 fr-col-lg-6"> |
| 40 | + <div class="fr-callout"> |
| 41 | + <h2 class="fr-callout__title"><%= t('.status_evolution') %></h2> |
| 42 | + |
| 43 | + <p class="fr-callout__text fr-text--md"> |
| 44 | + <%= t('.status_evolution_details') %> |
| 45 | + </p> |
| 46 | + |
| 47 | + <div class="fr-mt-4w"> |
| 48 | + <div class="chart"> |
| 49 | + <%= area_chart @dossiers_funnel, |
| 50 | + library: Chartkick.options[:default_library_config], |
| 51 | + ytitle: t('.dossiers_count'), label: t('.dossiers_count') %> |
| 52 | + </div> |
| 53 | + </div> |
| 54 | + </div> |
| 55 | + </div> |
| 56 | + |
| 57 | + <div class="fr-col-xs-12 fr-col-sm-12 fr-col-lg-6"> |
| 58 | + <div class="fr-callout"> |
| 59 | + <h2 class="fr-callout__title"><%= t('.acceptance_rate') %></h2> |
| 60 | + |
| 61 | + <p class="fr-callout__text fr-text--md"> |
| 62 | + <%= t('.acceptance_rate_details') %> |
| 63 | + </p> |
| 64 | + |
| 65 | + <div class="fr-mt-4w"> |
| 66 | + <div class="chart"> |
| 67 | + <%= pie_chart @termines_states, |
| 68 | + library: Chartkick.options[:default_library_config], |
| 69 | + code: true, |
| 70 | + colors: ["var(--background-flat-success)", "var(--background-flat-error)", "#FAD859"], |
| 71 | + label: t('.rate'), |
| 72 | + suffix: '%' %> |
| 73 | + </div> |
| 74 | + </div> |
| 75 | + </div> |
| 76 | + </div> |
| 77 | + |
| 78 | + <div class="fr-col-xs-12 fr-col-sm-12 fr-col-lg-6"> |
| 79 | + <div class="fr-callout"> |
| 80 | + <h2 class="fr-callout__title"><%= t('.weekly_distribution') %></h2> |
| 81 | + |
| 82 | + <p class="fr-callout__text fr-text--md"> |
| 83 | + <%= t('.weekly_distribution_details') %> |
| 84 | + </p> |
| 85 | + |
| 86 | + <div class="fr-mt-4w"> |
| 87 | + <div class="chart"> |
| 88 | + <%= line_chart @termines_by_week, |
| 89 | + library: Chartkick.options[:default_library_config], |
| 90 | + colors: ["var(--background-flat-success)", "var(--background-flat-error)", "#FAD859"], |
| 91 | + ytitle: t('.dossiers_count') %> |
| 92 | + </div> |
| 93 | + </div> |
| 94 | + </div> |
| 95 | + </div> |
| 96 | + </div> |
| 97 | +</div> |
0 commit comments