-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
amelioration(estimation_delay): evite des estimations de date similaire
- Loading branch information
Martin
committed
Dec 7, 2023
1 parent
f26a4bc
commit a66fd42
Showing
9 changed files
with
33 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
app/components/procedure/estimated_delay_component/estimated_delay_component.en.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
--- | ||
en: | ||
explanation: "Based on %{pencentile}% during the last %{nb_recent_dossiers} days, the instruction time is :" | ||
explanation: "Based on %{percentile}% 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>." |
13 changes: 4 additions & 9 deletions
13
app/components/procedure/estimated_delay_component/estimated_delay_component.html.haml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,5 @@ | ||
- 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)) | ||
%p= t('.explanation', percentile: ProcedureStatsConcern::USUAL_TRAITEMENT_TIME_PERCENTILE, nb_recent_dossiers: ProcedureStatsConcern::NB_DAYS_RECENT_DOSSIERS) | ||
%ul | ||
- cleaned_nearby_estimation do |estimation, i18n_key| | ||
%li= t(".#{i18n_key}", estimation: estimation) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters