mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-09-20 14:45:56 +08:00
Add colors to extends.rb, remove myModuleStatus updates for el.sign.
This commit is contained in:
parent
e3f111debc
commit
6c4de5dc71
|
@ -494,9 +494,9 @@ class Extends
|
|||
DEFAULT_FLOW_NAME = 'SciNote Free default task flow'
|
||||
|
||||
DEFAULT_FLOW_STATUSES = [
|
||||
{ name: 'Not started', color: '#406d86' },
|
||||
{ name: 'In progress', color: '#0065ff', consequences: ['MyModuleStatusConsequences::Uncompletion'] },
|
||||
{ name: 'Completed', color: '#00b900', consequences: ['MyModuleStatusConsequences::Completion'] }
|
||||
{ name: 'Not started', color: '#FFFFFF' },
|
||||
{ name: 'In progress', color: '#3070ED', consequences: ['MyModuleStatusConsequences::Uncompletion'] },
|
||||
{ name: 'Completed', color: '#5EC66F', consequences: ['MyModuleStatusConsequences::Completion'] }
|
||||
]
|
||||
|
||||
REPORT_TEMPLATES = {}
|
||||
|
|
|
@ -1,19 +1,17 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# rubocop:disable Rails/SkipsModelValidations
|
||||
class UpdateValuesInMyModuleStatuses < ActiveRecord::Migration[7.0]
|
||||
def up
|
||||
MyModuleStatus.where(name: 'Not started').update_all(color: '#FFFFFF')
|
||||
MyModuleStatus.where(name: 'In progress').update_all(color: '#3070ED')
|
||||
MyModuleStatus.where(name: 'Completed').update_all(color: '#5EC66F')
|
||||
MyModuleStatus.where(name: 'In review').update_all(color: '#E9A845')
|
||||
MyModuleStatus.where(name: 'Done').update_all(color: '#6F2DC1')
|
||||
end
|
||||
|
||||
def down
|
||||
MyModuleStatus.where(name: 'Not started').update_all(color: '#406d86')
|
||||
MyModuleStatus.where(name: 'In progress').update_all(color: '#0065ff')
|
||||
MyModuleStatus.where(name: 'Completed').update_all(color: '#00b900')
|
||||
MyModuleStatus.where(name: 'In review').update_all(color: '#ff4500')
|
||||
MyModuleStatus.where(name: 'Done').update_all(color: '#0ecdc0')
|
||||
end
|
||||
end
|
||||
# rubocop:enable Rails/SkipsModelValidations
|
||||
|
|
Loading…
Reference in a new issue