Merge pull request #9305 from colinux/instructeurs-improve-sva

ETQ instructeur, le badge SVA d'un dossier intègre la date prévisionnelle de décision au survol
This commit is contained in:
Colin Darie 2023-07-12 10:38:03 +00:00 committed by GitHub
commit 74e58daf95
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 20 additions and 2 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?

View file

@ -177,7 +177,7 @@
- if @procedure.sva_svr_enabled? - if @procedure.sva_svr_enabled?
%td %td
%span.cell-link %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 %td.action-col.follow-col
%ul.inline.fr-btns-group.fr-btns-group--sm.fr-btns-group--inline.fr-btns-group--icon-right %ul.inline.fr-btns-group.fr-btns-group--sm.fr-btns-group--inline.fr-btns-group--icon-right