feat(sva): show decision date in badge title

This commit is contained in:
Colin Darie 2023-07-12 10:27:35 +02:00
parent 2a8b97a30d
commit cd95762383
4 changed files with 19 additions and 1 deletions

View file

@ -53,4 +53,14 @@ class Instructeurs::SVASVRDecisionBadgeComponent < ApplicationComponent
def label_for_badge def label_for_badge
sva? ? "SVA :" : "SVR :" sva? ? "SVA :" : "SVR :"
end 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 end

View file

@ -8,3 +8,7 @@
other: in %{count} days other: in %{count} days
remaining_days_after_correction: remaining_days_after_correction:
other: "%{count} d. 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}"

View file

@ -8,3 +8,7 @@
other: dans %{count} jours other: dans %{count} jours
remaining_days_after_correction: remaining_days_after_correction:
other: "%{count} j. après 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}"

View file

@ -2,7 +2,7 @@
%span.fr-badge.fr-badge--sm %span.fr-badge.fr-badge--sm
= t(sva? ? '.no_sva' : '.no_svr') = t(sva? ? '.no_sva' : '.no_svr')
- else - else
%span{ class: classes } %span{ class: classes, title: title }
- if with_label.present? - if with_label.present?
= label_for_badge = label_for_badge
- if pending_correction? - if pending_correction?