use nb_dossiers to estimate total weight
Co-authored-by: Christophe Robillard <christophe.robillard@beta.gouv.fr>
This commit is contained in:
parent
1a6337cf37
commit
09b3cf98f6
2 changed files with 3 additions and 3 deletions
|
@ -5,11 +5,11 @@ 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)
|
||||
@nb_dossiers = @count_dossiers_termines_by_month.sum { |count_by_month| count_by_month["count"] }
|
||||
@dossiers_termines = @procedure.dossiers.state_termine
|
||||
@poids_total = ProcedureArchiveService.procedure_files_size(@procedure)
|
||||
@poids_total = @nb_dossiers * @average_dossier_weight
|
||||
groupe_instructeur = current_instructeur.groupe_instructeurs.where(procedure: @procedure.id).first
|
||||
@archives = Archive.for_groupe_instructeur(groupe_instructeur).to_a
|
||||
end
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
%td
|
||||
Tous les dossiers
|
||||
%td
|
||||
= @count_dossiers_termines_by_month.sum { |count_by_month| count_by_month["count"] }
|
||||
= @nb_dossiers
|
||||
%td
|
||||
- if matching_archive.present? && matching_archive.available?
|
||||
- weight = matching_archive.file.byte_size
|
||||
|
|
Loading…
Reference in a new issue