add usual traitement time on procedure description page
This commit is contained in:
parent
bcb84d4070
commit
71f548dadb
5 changed files with 28 additions and 3 deletions
|
@ -20,6 +20,8 @@ module Users
|
|||
check_prefilled_dossier_ownership if @prefilled_dossier
|
||||
end
|
||||
|
||||
@usual_traitement_time = @procedure.stats_usual_traitement_time
|
||||
|
||||
render 'commencer/show'
|
||||
end
|
||||
|
||||
|
|
|
@ -69,12 +69,22 @@
|
|||
= pj.libelle
|
||||
= t('utils.no_mandatory') if !pj.mandatory?
|
||||
|
||||
- if procedure.persisted? && procedure.estimated_duration_visible?
|
||||
- if @usual_traitement_time.present?
|
||||
%section.fr-accordion
|
||||
%h2.fr-accordion__title
|
||||
%button.fr-accordion__btn{ "aria-controls" => "accordion-117", "aria-expanded" => "false" }
|
||||
= t('shared.procedure_description.estimated_fill_duration_title')
|
||||
= t('shared.procedure_description.usual_traitement_time_title')
|
||||
|
||||
#accordion-117.fr-collapse
|
||||
= t('shared.procedure_description.usual_traitement_time_detail_html', traitement_time: distance_of_time_in_words(@usual_traitement_time), percentile: ProcedureStatsConcern::USUAL_TRAITEMENT_TIME_PERCENTILE, days: ProcedureStatsConcern::NB_DAYS_RECENT_DOSSIERS, href: statistiques_path(procedure.path) )
|
||||
|
||||
|
||||
- if procedure.persisted? && procedure.estimated_duration_visible?
|
||||
%section.fr-accordion
|
||||
%h2.fr-accordion__title
|
||||
%button.fr-accordion__btn{ "aria-controls" => "accordion-118", "aria-expanded" => "false" }
|
||||
= t('shared.procedure_description.estimated_fill_duration_title')
|
||||
#accordion-118.fr-collapse
|
||||
= t('shared.procedure_description.estimated_fill_duration_detail', estimated_minutes: estimated_fill_duration_minutes(procedure))
|
||||
|
||||
.fr-my-3w
|
||||
|
@ -89,4 +99,3 @@
|
|||
= t('shared.procedure_description.sva_svr_prevision_date',
|
||||
delay: t("x_#{procedure.sva_svr_configuration.unit}", count: procedure.sva_svr_configuration.period.to_i, scope: 'datetime.distance_in_words'),
|
||||
date: l(SVASVRDecisionDateCalculatorService.decision_date_from_today(procedure), format: :long).gsub(' ', " "))
|
||||
|
||||
|
|
|
@ -849,6 +849,8 @@ en:
|
|||
estimated_fill_duration: "Estimated fill time: %{estimated_minutes} mn"
|
||||
estimated_fill_duration_title: What is the procedure estimated fill time ?
|
||||
estimated_fill_duration_detail: "The fill time is etimated to %{estimated_minutes} min. This period may vary depending on the options you choose"
|
||||
usual_traitement_time_title: What are the processing times for this procedure?
|
||||
usual_traitement_time_detail_html: Usually, files in this procedure are processed within %{traitement_time}. This estimate is calculated automatically from the processing times observed on %{percentile}% of requests that have been processed during the last %{days} days. Actual lead time may vary. For more information, you can <a href="%{href}" target="_blank" rel="noopener noreferrer">consult the statistics page</a> of this procedure.
|
||||
pieces_jointes : What are the required attachments ?
|
||||
pieces_jointes_conditionnal_list_title : Attachments list according to your situation
|
||||
sva_svr_title: "This procedure applies the « %{rule} »"
|
||||
|
|
|
@ -904,6 +904,8 @@ fr:
|
|||
estimated_fill_duration: "Temps de remplissage estimé : %{estimated_minutes} mn"
|
||||
estimated_fill_duration_title: Quelle est la durée de remplissage de la démarche ?
|
||||
estimated_fill_duration_detail: "La durée de remplissage est estimée à %{estimated_minutes} min. Ce délai peut varier selon les options que vous choisirez."
|
||||
usual_traitement_time_title: Quels sont des délais d'instruction pour cette démarche ?
|
||||
usual_traitement_time_detail_html: Habituellement, les dossiers de cette démarche sont traités dans un délai de %{traitement_time}. Cette estimation est calculée automatiquement à partir des délais d’instruction constatés sur %{percentile}% des demandes qui ont été traitées lors des %{days} derniers jours. Le délai réel peut être différent. Pour plus d'informations, vous pouvez <a href="%{href}" target="_blank" rel="noopener noreferrer">consulter la page statistiques</a> de cette démarche.
|
||||
pieces_jointes : Quelles sont les pièces justificatives à fournir ?
|
||||
pieces_jointes_conditionnal_list_title : Liste des pièces en fonction de votre situation
|
||||
sva_svr_title: "Cette démarche applique le « %{rule} »"
|
||||
|
|
|
@ -47,6 +47,16 @@ describe 'shared/_procedure_description', type: :view do
|
|||
end
|
||||
end
|
||||
|
||||
context 'when procedure has usual_traitement_time' do
|
||||
before { assign(:usual_traitement_time, 1.day) }
|
||||
|
||||
it 'shows a usual traitement text' do
|
||||
subject
|
||||
expect(rendered).to have_text("Quels sont des délais d'instruction pour cette démarche ?")
|
||||
expect(rendered).to have_text("Habituellement, les dossiers de cette démarche sont traités dans un délai de 1 jour.")
|
||||
end
|
||||
end
|
||||
|
||||
context 'when the procedure has pieces jointes' do
|
||||
let(:procedure) { create(:procedure, :draft, :with_titre_identite, :with_piece_justificative, :with_siret) }
|
||||
it 'shows the pieces jointes list for draft procedure' do
|
||||
|
|
Loading…
Reference in a new issue