remove useless archivable_months

Co-authored-by: Christophe Robillard <christophe.robillard@beta.gouv.fr>
This commit is contained in:
simon lehericey 2021-05-26 17:55:18 +02:00 committed by Christophe Robillard
parent d7ce26662f
commit e933a80c55

View file

@ -5,7 +5,6 @@ module Instructeurs
def index def index
@procedure = procedure @procedure = procedure
@average_dossier_weight = procedure.average_dossier_weight @average_dossier_weight = procedure.average_dossier_weight
@archivable_months = archivable_months
@count_dossiers_termines_by_month = Traitement.count_dossiers_termines_by_month(@procedure) @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"] } @nb_dossiers = @count_dossiers_termines_by_month.sum { |count_by_month| count_by_month["count"] }
@poids_total = @nb_dossiers * @average_dossier_weight @poids_total = @nb_dossiers * @average_dossier_weight
@ -36,16 +35,6 @@ module Instructeurs
end end
end end
def archivable_months
start_date = procedure.published_at.to_date
end_date = Time.zone.now.to_date
(start_date...end_date)
.map(&:beginning_of_month)
.uniq
.reverse
end
def procedure def procedure
current_instructeur current_instructeur
.procedures .procedures