UI uses average_dossier_weight

Co-authored-by: Christophe Robillard <christophe.robillard@beta.gouv.fr>
This commit is contained in:
simon lehericey 2021-05-26 16:19:20 +02:00 committed by Christophe Robillard
parent 9e43823f9a
commit 895eed5a27
2 changed files with 2 additions and 1 deletions

View file

@ -4,6 +4,7 @@ module Instructeurs
def index
@procedure = procedure
@average_dossier_weight = procedure.average_dossier_weight
@archivable_months = archivable_months
@count_dossiers_termines_by_month = Traitement.count_dossiers_termines_by_month(@procedure)

View file

@ -70,7 +70,7 @@
- if matching_archive.present? && matching_archive.available?
- weight = matching_archive.file.byte_size
- else
weight = ProcedureArchiveService::dossiers_files_size(dossiers_termines)
- weight = nb_dossiers_termines * @average_dossier_weight
= number_to_human_size(weight)
%td
- if nb_dossiers_termines > 0