2024-01-30 11:16:24 +01:00
|
|
|
ProcedureDetail = Struct.new(:id, :libelle, :published_at, :aasm_state, :estimated_dossiers_count, :admin_count, :template, keyword_init: true) do
|
2022-12-16 15:24:05 +01:00
|
|
|
include SpreadsheetArchitect
|
|
|
|
|
|
|
|
def spreadsheet_columns
|
2024-01-30 11:16:24 +01:00
|
|
|
[:id, :libelle, :published_at, :aasm_state, :admin_count, :template].map do |attribute|
|
2022-12-16 15:24:05 +01:00
|
|
|
[I18n.t(attribute, scope: 'activerecord.attributes.procedure_export'), attribute]
|
|
|
|
end
|
|
|
|
end
|
2023-01-06 17:53:20 +01:00
|
|
|
|
2024-01-16 18:40:45 +01:00
|
|
|
AdministrateursCounter = Struct.new(:count)
|
|
|
|
|
2023-01-06 17:53:20 +01:00
|
|
|
def administrateurs
|
2024-01-16 18:40:45 +01:00
|
|
|
AdministrateursCounter.new(admin_count)
|
2023-01-06 17:53:20 +01:00
|
|
|
end
|
2022-12-16 15:24:05 +01:00
|
|
|
end
|