adds enum extends to report element part of SCI-1003

This commit is contained in:
zmagod 2017-02-27 13:53:46 +01:00
parent 634336e1a4
commit e1b3dcc2ba
2 changed files with 18 additions and 18 deletions

View file

@ -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: {

View file

@ -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