Generate list for overview group by based on current ticket attributes.
This commit is contained in:
parent
3c1744af0b
commit
c4c96d0f2b
3 changed files with 36 additions and 29 deletions
|
@ -4,6 +4,11 @@ class Index extends App.ControllerSubContent
|
|||
constructor: ->
|
||||
super
|
||||
|
||||
# update group by with current attributes
|
||||
for attribute in App.Overview.configure_attributes
|
||||
if attribute.name is 'group_by'
|
||||
attribute.options = App.Overview.groupByAttributes()
|
||||
|
||||
new App.ControllerGenericIndex(
|
||||
el: @el
|
||||
id: @id
|
||||
|
|
|
@ -1466,13 +1466,7 @@ class App.OverviewSettings extends App.ControllerModal
|
|||
null: true
|
||||
nulloption: true
|
||||
translate: true
|
||||
options:
|
||||
customer: 'Customer'
|
||||
organization: 'Organization'
|
||||
state: 'State'
|
||||
priority: 'Priority'
|
||||
group: 'Group'
|
||||
owner: 'Owner'
|
||||
options: App.Overview.groupByAttributes()
|
||||
})
|
||||
|
||||
controller = new App.ControllerForm(
|
||||
|
|
|
@ -74,3 +74,11 @@ Sie können auch individuelle Übersichten für einzelne Agenten oder agenten Gr
|
|||
|
||||
uiUrl: ->
|
||||
"#ticket/view/#{@link}"
|
||||
|
||||
@groupByAttributes: ->
|
||||
groupByAttributes = {}
|
||||
for key, attribute of App.Ticket.attributesGet()
|
||||
if !key.match(/(_at|_no)$/) && attribute.tag isnt 'datetime' && key isnt 'number' && key isnt 'tags'
|
||||
key = key.replace(/_(id|ids)$/, '')
|
||||
groupByAttributes[key] = attribute.display
|
||||
groupByAttributes
|
||||
|
|
Loading…
Reference in a new issue