mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-10-09 05:18:01 +08:00
adds enum extends to report element part of SCI-1003
This commit is contained in:
parent
634336e1a4
commit
e1b3dcc2ba
2 changed files with 18 additions and 18 deletions
|
@ -1,22 +1,5 @@
|
||||||
class ReportElement < ActiveRecord::Base
|
class ReportElement < ActiveRecord::Base
|
||||||
enum type_of: {
|
enum type_of: Extends::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
|
|
||||||
}
|
|
||||||
|
|
||||||
# This is only used by certain elements
|
# This is only used by certain elements
|
||||||
enum sort_order: {
|
enum sort_order: {
|
||||||
|
|
|
@ -17,4 +17,21 @@ class Extends
|
||||||
|
|
||||||
TASKS_STATES = { uncompleted: 0,
|
TASKS_STATES = { uncompleted: 0,
|
||||||
completed: 1 }
|
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
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue