remove useless count
Co-authored-by: Christophe Robillard <christophe.robillard@beta.gouv.fr>
This commit is contained in:
parent
b5c1200bf1
commit
1c1e990d2a
2 changed files with 1 additions and 2 deletions
|
@ -8,7 +8,6 @@ module Instructeurs
|
|||
@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 = @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
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
- elsif matching_archive.try(&:pending?)
|
||||
%span.icon.retry
|
||||
= t(:archive_pending_html, created_period: time_ago_in_words(matching_archive.created_at), scope: [:instructeurs, :procedure])
|
||||
- elsif @dossiers_termines.count > 0
|
||||
- elsif @nb_dossiers > 0
|
||||
= link_to instructeur_archives_path(@procedure, type: 'everything'), method: :post, class: "button" do
|
||||
%span.icon.new-folder
|
||||
Demander la création
|
||||
|
|
Loading…
Reference in a new issue