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 00f94d2d7..611138379 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 @@ -7,7 +7,7 @@ en: in_progress: text_success: one: 1/1 is being archived - other: "%{progress_count}/%{count} files have been archived" + other: "%{success_count}/%{count} files have been archived" passer_en_instruction: finish: text_success: @@ -16,7 +16,7 @@ en: in_progress: text_success: one: 1/1 is being changed to instructing - other: "%{progress_count}/%{count} files have been changed to instructing" + other: "%{success_count}/%{count} files have been changed to instructing" accepter: finish: text_success: @@ -25,7 +25,7 @@ en: in_progress: text_success: one: 1/1 is being accepted - other: "%{progress_count}/%{count} files have been accepted" + other: "%{success_count}/%{count} files have been accepted" follow: finish: text_success: @@ -34,7 +34,7 @@ en: in_progress: text_success: one: 1/1 is being followed - other: "%{progress_count}/%{count} files have been followed" + other: "%{success_count}/%{count} files have been followed" unfollow: finish: text_success: @@ -43,7 +43,7 @@ en: in_progress: text_success: one: 1/1 is being unfollowed - other: "%{progress_count}/%{count} files have been unfollowed" + other: "%{success_count}/%{count} files have been unfollowed" repasser_en_construction: finish: text_success: @@ -52,7 +52,7 @@ en: in_progress: text_success: one: 1/1 is being changed to in progress - other: "%{progress_count}/%{count} files have been changed to in progress" + other: "%{success_count}/%{count} files have been changed to in progress" title: finish: The bulk action is finished in_progress: A bulk action is processing 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 69d7f7f51..54e3cb8c3 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 @@ -7,7 +7,7 @@ fr: in_progress: text_success: one: 1 dossier sera archivé - other: "%{progress_count}/%{count} dossiers ont été archivés" + other: "%{success_count}/%{count} dossiers ont été archivés" passer_en_instruction: finish: text_success: @@ -16,7 +16,7 @@ fr: in_progress: text_success: one: 1 dossier sera passé en instruction - other: "%{progress_count}/%{count} dossiers ont été passés en instruction" + other: "%{success_count}/%{count} dossiers ont été passés en instruction" accepter: finish: text_success: @@ -25,7 +25,7 @@ fr: in_progress: text_success: one: 1 dossier sera accepté - other: "%{progress_count}/%{count} dossiers ont été acceptés" + other: "%{success_count}/%{count} dossiers ont été acceptés" follow: finish: text_success: @@ -34,7 +34,7 @@ fr: in_progress: text_success: one: 1 dossier sera suivi - other: "%{progress_count}/%{count} dossiers ont été suivis" + other: "%{success_count}/%{count} dossiers ont été suivis" unfollow: finish: text_success: @@ -43,7 +43,7 @@ fr: in_progress: text_success: one: 1 dossier ne sera plus suivi - other: "%{progress_count}/%{count} dossiers ne sont plus suivis" + other: "%{success_count}/%{count} dossiers ne sont plus suivis" repasser_en_construction: finish: text_success: @@ -52,7 +52,7 @@ fr: in_progress: text_success: one: 1 dossier sera repassé en construction - other: "%{progress_count}/%{count} dossiers ont été repassés en construction" + other: "%{success_count}/%{count} dossiers ont été repassés en construction" title: finish: L'action de masse est terminée in_progress: Une action de masse est en cours 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 06eaec50f..b4fe07f9c 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 @@ -9,7 +9,7 @@ - else = render Dsfr::AlertComponent.new(title: t(".title.in_progress"), state: :info, heading_level: 'h2') do |c| - c.body do - %p= t(".#{batch.operation}.in_progress.text_success", count: @batch.total_count, progress_count: @batch.progress_count) + %p= t(".#{batch.operation}.in_progress.text_success", count: @batch.total_count, success_count: @batch.success_count) %p = link_to t('.link_text'), instructeur_procedure_path(@procedure, statut: params["statut"]), data: { action: 'turbo-poll#refresh' } diff --git a/app/models/batch_operation.rb b/app/models/batch_operation.rb index 1d2e46499..0fe2d43e0 100644 --- a/app/models/batch_operation.rb +++ b/app/models/batch_operation.rb @@ -128,10 +128,6 @@ class BatchOperation < ApplicationRecord dossier_operations.size end - def progress_count - dossier_operations.pending.size - end - def success_count dossier_operations.success.size end