diff --git a/app/components/dossiers/batch_alert_component/batch_alert_component.en.yml b/app/components/dossiers/batch_alert_component/batch_alert_component.en.yml index 611138379..4895eaa8c 100644 --- a/app/components/dossiers/batch_alert_component/batch_alert_component.en.yml +++ b/app/components/dossiers/batch_alert_component/batch_alert_component.en.yml @@ -58,3 +58,4 @@ en: in_progress: A bulk action is processing link_text: Refresh this webpage after_link_text: to check if the process is over. + context: This bulk action was created by %{mail}, %{time_ago} diff --git a/app/components/dossiers/batch_alert_component/batch_alert_component.fr.yml b/app/components/dossiers/batch_alert_component/batch_alert_component.fr.yml index 54e3cb8c3..43ba3b568 100644 --- a/app/components/dossiers/batch_alert_component/batch_alert_component.fr.yml +++ b/app/components/dossiers/batch_alert_component/batch_alert_component.fr.yml @@ -58,3 +58,4 @@ fr: in_progress: Une action de masse est en cours link_text: Recharger la page after_link_text: pour voir si l'opération est finie. + context: Cette opération a été lancée par %{mail}, il y a %{time_ago} diff --git a/app/components/dossiers/batch_alert_component/batch_alert_component.html.haml b/app/components/dossiers/batch_alert_component/batch_alert_component.html.haml index b4fe07f9c..5b1fbdb56 100644 --- a/app/components/dossiers/batch_alert_component/batch_alert_component.html.haml +++ b/app/components/dossiers/batch_alert_component/batch_alert_component.html.haml @@ -14,3 +14,6 @@ %p = link_to t('.link_text'), instructeur_procedure_path(@procedure, statut: params["statut"]), data: { action: 'turbo-poll#refresh' } = t('.after_link_text') + + %p.fr-mt-2w + %small= t('.context', mail: @batch.instructeur.email, time_ago: time_ago_in_words(@batch.created_at)) diff --git a/spec/components/dossiers/batch_alert_component_spec.rb b/spec/components/dossiers/batch_alert_component_spec.rb index 1963ad5e9..91bfb68bc 100644 --- a/spec/components/dossiers/batch_alert_component_spec.rb +++ b/spec/components/dossiers/batch_alert_component_spec.rb @@ -23,6 +23,7 @@ RSpec.describe Dossiers::BatchAlertComponent, type: :component do it { is_expected.to have_selector('.fr-alert--info') } it { is_expected.to have_text("Une action de masse est en cours") } it { is_expected.to have_text("1/2 dossiers ont été archivés") } + it { is_expected.to have_text("Cette opération a été lancée par #{instructeur.email}, il y a moins d'une minute") } end context 'finished and success' do