Maintenance: Improve core workflow order and fix naming for admin dialog.

This commit is contained in:
Rolf Schmidt 2021-09-10 08:42:17 +01:00 committed by Thorsten Eckel
parent 854b936f0d
commit 179b87ffe0
2 changed files with 2 additions and 2 deletions

View file

@ -5,7 +5,7 @@ class App.CoreWorkflow extends App.Model
@configure_attributes = [
{ name: 'name', display: 'Name', tag: 'input', type: 'text', limit: 100, null: false },
{ name: 'object', display: 'Object', tag: 'select', null: false, nulloption: true },
{ name: 'preferences::screen', display: 'Action', tag: 'select', translate: true, null: true, multiple: true, nulloption: true },
{ name: 'preferences::screen', display: 'Context', tag: 'select', translate: true, null: true, multiple: true, nulloption: true },
{ name: 'condition_selected', display: 'Selected conditions', tag: 'core_workflow_condition', null: true, preview: false },
{ name: 'condition_saved', display: 'Saved conditions', tag: 'core_workflow_condition', null: true, preview: false },
{ name: 'perform', display: 'Action', tag: 'core_workflow_perform', null: true, preview: false },

View file

@ -4,7 +4,7 @@ class CoreWorkflow < ApplicationModel
include ChecksClientNotification
include CoreWorkflow::Assets
default_scope { order(priority: :asc, id: :asc) }
default_scope { order('priority ASC, name ASC, id ASC') }
scope :active, -> { where(active: true) }
scope :changeable, -> { where(changeable: true) }
scope :object, ->(object) { where(object: [object, nil]) }