Merge pull request #4834 from betagouv/4832-perfs-dossiers-traites

[#4832] Amélioration des performances des écrans de listes de dossiers
This commit is contained in:
Keirua 2020-02-26 15:48:43 +01:00 committed by GitHub
commit 4934a6359b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -75,7 +75,6 @@ class ProcedurePresentation < ApplicationRecord
end
def sorted_ids(dossiers, instructeur)
dossiers.each { |dossier| assert_matching_procedure(dossier) }
table, column, order = sort.values_at('table', 'column', 'order')
case table
@ -110,7 +109,6 @@ class ProcedurePresentation < ApplicationRecord
end
def filtered_ids(dossiers, statut)
dossiers.each { |dossier| assert_matching_procedure(dossier) }
filters[statut].group_by { |filter| filter.values_at('table', 'column') } .map do |(table, column), filters|
values = filters.pluck('value')
case table