amelioration(delai.traitement): revoie l'affichage du delais d'instruction

Co-authored-by: Colin Darie <colin@darie.eu>
This commit is contained in:
Martin 2023-11-21 12:33:39 +01:00
parent 474fde3380
commit f26a4bc041
8 changed files with 60 additions and 20 deletions

View file

@ -0,0 +1,6 @@
---
en:
explanation: "Based on %{pencentile}% during the last %{nb_recent_dossiers} days, the instruction time is :"
fast_html: "<strong>In the best cast scenario</strong> : <strong>%{estimation}</strong>."
mean_html: "If your file <strong>requires minor adjustments</strong>, the instruction time is <strong>%{estimation}</strong>."
slow_html: "If you file <strong>is missing some information</strong> which requires a lot of exchanges with the administration, the instruction time is around <strong>%{estimation}</strong>."

View file

@ -0,0 +1,6 @@
---
fr:
explanation: Selon nos estimations, à partir des délais dinstruction constatés sur %{percentile}% des demandes qui ont été traitées lors des %{nb_recent_dossiers} derniers jours, les délais dinstruction sont les suivants
fast_html: "<strong>Dans le meilleur des cas</strong>, le délai dinstruction est : <strong>%{estimation}</strong>."
mean_html: "Les <strong>dossiers demandant quelques échanges</strong> le délai dinstruction est denviron : <strong>%{estimation}</strong>."
slow_html: "Si votre <strong>dossier est incomplet</strong> ou quil faut beaucoup déchanges avec ladministration, le délai dinstruction est denviron <strong>%{estimation}</strong>."

View file

@ -0,0 +1,10 @@
- cache(@procedure.id, expires_in: 1.day) do
- if estimation_present?
= render Dsfr::AlertComponent.new(state: :info, size: :sm, extra_class_names: 'fr-mb-2w') do |c|
- c.body do
%p= t('.explanation', percentile: ProcedureStatsConcern::USUAL_TRAITEMENT_TIME_PERCENTILE, nb_recent_dossiers: ProcedureStatsConcern::NB_DAYS_RECENT_DOSSIERS)
%ul
%li= t('.fast_html', estimation: distance_of_time_in_words(@fastest))
%li= t('.mean_html', estimation: distance_of_time_in_words(@mean))
%li= t('.slow_html', estimation: distance_of_time_in_words(@slow))