2022-12-16 15:24:05 +01:00
|
|
|
class ProcedureDetail < OpenStruct
|
|
|
|
include SpreadsheetArchitect
|
|
|
|
|
|
|
|
def spreadsheet_columns
|
|
|
|
[:id, :libelle, :published_at, :aasm_state, :admin_count].map do |attribute|
|
|
|
|
[I18n.t(attribute, scope: 'activerecord.attributes.procedure_export'), attribute]
|
|
|
|
end
|
|
|
|
end
|
2023-01-06 17:53:20 +01:00
|
|
|
|
|
|
|
def administrateurs
|
|
|
|
Administrateurs.new(count: admin_count)
|
|
|
|
end
|
|
|
|
|
|
|
|
Administrateurs = Struct.new(:count)
|
2022-12-16 15:24:05 +01:00
|
|
|
end
|