perf(admin): replace ProcedureDetail open struct with proper struct

This commit is contained in:
Colin Darie 2024-01-16 18:40:45 +01:00
parent 15e78e94f3
commit 461e311d3d
No known key found for this signature in database
GPG key ID: 8C76CADD40253590

View file

@ -1,4 +1,4 @@
class ProcedureDetail < OpenStruct
ProcedureDetail = Struct.new(:id, :libelle, :published_at, :aasm_state, :estimated_dossiers_count, :admin_count, keyword_init: true) do
include SpreadsheetArchitect
def spreadsheet_columns
@ -7,9 +7,9 @@ class ProcedureDetail < OpenStruct
end
end
def administrateurs
Administrateurs.new(admin_count)
end
AdministrateursCounter = Struct.new(:count)
Administrateurs = Struct.new(:count)
def administrateurs
AdministrateursCounter.new(admin_count)
end
end