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: ->
|
constructor: ->
|
||||||
super
|
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(
|
new App.ControllerGenericIndex(
|
||||||
el: @el
|
el: @el
|
||||||
id: @id
|
id: @id
|
||||||
|
|
|
@ -1466,13 +1466,7 @@ class App.OverviewSettings extends App.ControllerModal
|
||||||
null: true
|
null: true
|
||||||
nulloption: true
|
nulloption: true
|
||||||
translate: true
|
translate: true
|
||||||
options:
|
options: App.Overview.groupByAttributes()
|
||||||
customer: 'Customer'
|
|
||||||
organization: 'Organization'
|
|
||||||
state: 'State'
|
|
||||||
priority: 'Priority'
|
|
||||||
group: 'Group'
|
|
||||||
owner: 'Owner'
|
|
||||||
})
|
})
|
||||||
|
|
||||||
controller = new App.ControllerForm(
|
controller = new App.ControllerForm(
|
||||||
|
|
|
@ -74,3 +74,11 @@ Sie können auch individuelle Übersichten für einzelne Agenten oder agenten Gr
|
||||||
|
|
||||||
uiUrl: ->
|
uiUrl: ->
|
||||||
"#ticket/view/#{@link}"
|
"#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