diff --git a/app/components/instructeurs/sva_svr_decision_badge_component.rb b/app/components/instructeurs/sva_svr_decision_badge_component.rb index d53a44b27..cd0aef7e4 100644 --- a/app/components/instructeurs/sva_svr_decision_badge_component.rb +++ b/app/components/instructeurs/sva_svr_decision_badge_component.rb @@ -53,4 +53,14 @@ class Instructeurs::SVASVRDecisionBadgeComponent < ApplicationComponent def label_for_badge sva? ? "SVA :" : "SVR :" end + + def title + return if without_date? + + if pending_correction? + t(".dossier_terminated_x_days_after_correction", count: days_count) + else + t(".dossier_terminated_on", date: helpers.l(object.sva_svr_decision_on)) + end + end end diff --git a/app/components/instructeurs/sva_svr_decision_badge_component/sva_svr_decision_badge_component.en.yml b/app/components/instructeurs/sva_svr_decision_badge_component/sva_svr_decision_badge_component.en.yml index 90fbf5873..54bfb9bae 100644 --- a/app/components/instructeurs/sva_svr_decision_badge_component/sva_svr_decision_badge_component.en.yml +++ b/app/components/instructeurs/sva_svr_decision_badge_component/sva_svr_decision_badge_component.en.yml @@ -8,3 +8,7 @@ other: in %{count} days remaining_days_after_correction: other: "%{count} d. after correction" + dossier_terminated_x_days_after_correction: + one: "The file will be automatically processed %{count} day after the applicant has re-submitted his file" + other: "The file will be automatically processed %{count} days after the applicant has re-submitted his file" + dossier_terminated_on: "The file will be automatically processed on %{date}" diff --git a/app/components/instructeurs/sva_svr_decision_badge_component/sva_svr_decision_badge_component.fr.yml b/app/components/instructeurs/sva_svr_decision_badge_component/sva_svr_decision_badge_component.fr.yml index 51bff16a3..b06a63f49 100644 --- a/app/components/instructeurs/sva_svr_decision_badge_component/sva_svr_decision_badge_component.fr.yml +++ b/app/components/instructeurs/sva_svr_decision_badge_component/sva_svr_decision_badge_component.fr.yml @@ -8,3 +8,7 @@ other: dans %{count} jours remaining_days_after_correction: other: "%{count} j. après correction" + dossier_terminated_x_days_after_correction: + one: "Le dossier sera automatiquement traité %{count} jour après que le demandeur a re-déposé son dossier" + other: "Le dossier sera automatiquement traité %{count} jours après que le demandeur a re-déposé son dossier" + dossier_terminated_on: "Le dossier sera automatiquement traité le %{date}" diff --git a/app/components/instructeurs/sva_svr_decision_badge_component/sva_svr_decision_badge_component.html.haml b/app/components/instructeurs/sva_svr_decision_badge_component/sva_svr_decision_badge_component.html.haml index 76511ad4e..0dcfcfa34 100644 --- a/app/components/instructeurs/sva_svr_decision_badge_component/sva_svr_decision_badge_component.html.haml +++ b/app/components/instructeurs/sva_svr_decision_badge_component/sva_svr_decision_badge_component.html.haml @@ -2,7 +2,7 @@ %span.fr-badge.fr-badge--sm = t(sva? ? '.no_sva' : '.no_svr') - else - %span{ class: classes } + %span{ class: classes, title: title } - if with_label.present? = label_for_badge - if pending_correction? diff --git a/app/views/instructeurs/procedures/show.html.haml b/app/views/instructeurs/procedures/show.html.haml index b88d0415a..6c39ff86a 100644 --- a/app/views/instructeurs/procedures/show.html.haml +++ b/app/views/instructeurs/procedures/show.html.haml @@ -177,7 +177,7 @@ - if @procedure.sva_svr_enabled? %td %span.cell-link - = link_to_if p.hidden_by_administration_at.blank?, render(Instructeurs::SVASVRDecisionBadgeComponent.new(projection_or_dossier: p, procedure: @procedure), path) + = link_to_if p.hidden_by_administration_at.blank?, render(Instructeurs::SVASVRDecisionBadgeComponent.new(projection_or_dossier: p, procedure: @procedure)), path %td.action-col.follow-col %ul.inline.fr-btns-group.fr-btns-group--sm.fr-btns-group--inline.fr-btns-group--icon-right