fix incrementation of success dossiers in batch alert
This commit is contained in:
parent
b44a2f9ce4
commit
1e7add3b6e
4 changed files with 13 additions and 17 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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' }
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue