diff --git a/app/models/report_element.rb b/app/models/report_element.rb index 131d3d528..9c5e2345b 100644 --- a/app/models/report_element.rb +++ b/app/models/report_element.rb @@ -1,22 +1,5 @@ class ReportElement < ActiveRecord::Base - enum type_of: { - project_header: 0, - my_module: 1, - step: 2, - result_asset: 3, - result_table: 4, - result_text: 5, - my_module_activity: 6, - my_module_samples: 7, - step_checklist: 8, - step_asset: 9, - step_table: 10, - step_comments: 11, - result_comments: 12, - project_activity: 13, # TODO - project_samples: 14, # TODO - experiment: 15 - } + enum type_of: Extends::REPORT_ELEMENT_TYPES # This is only used by certain elements enum sort_order: { diff --git a/config/initializers/extends.rb b/config/initializers/extends.rb index 7883381d9..9b9728b46 100644 --- a/config/initializers/extends.rb +++ b/config/initializers/extends.rb @@ -17,4 +17,21 @@ class Extends TASKS_STATES = { uncompleted: 0, completed: 1 } + + REPORT_ELEMENT_TYPES = { project_header: 0, + my_module: 1, + step: 2, + result_asset: 3, + result_table: 4, + result_text: 5, + my_module_activity: 6, + my_module_samples: 7, + step_checklist: 8, + step_asset: 9, + step_table: 10, + step_comments: 11, + result_comments: 12, + project_activity: 13, # TODO + project_samples: 14, # TODO + experiment: 15 } end