Small improvment to show if ticket is modified.
This commit is contained in:
parent
16812c16af
commit
5bcab031c0
2 changed files with 14 additions and 13 deletions
|
@ -46,15 +46,15 @@ class Index extends App.Controller
|
|||
view: @view
|
||||
processData: true
|
||||
success: (data, status, xhr) =>
|
||||
if _.isEqual( @dataLastCall, data)
|
||||
return
|
||||
if @dataLastCall && $('[name="body"]').val()
|
||||
App.Event.trigger 'notify', {
|
||||
type: 'success'
|
||||
msg: App.i18n.translateContent('Ticket has changed!')
|
||||
timeout: 30000
|
||||
}
|
||||
return
|
||||
if @dataLastCall
|
||||
return if _.isEqual( @dataLastCall.ticket, data.ticket)
|
||||
if $('[name="body"]').val()
|
||||
App.Event.trigger 'notify', {
|
||||
type: 'success'
|
||||
msg: App.i18n.translateContent('Ticket has changed!')
|
||||
timeout: 30000
|
||||
}
|
||||
return
|
||||
@dataLastCall = data
|
||||
|
||||
@load(data)
|
||||
|
@ -132,9 +132,10 @@ class Index extends App.Controller
|
|||
]
|
||||
|
||||
@html App.view('agent_ticket_zoom')(
|
||||
ticket: @ticket
|
||||
articles: @articles
|
||||
nav: @nav
|
||||
ticket: @ticket
|
||||
articles: @articles
|
||||
nav: @nav
|
||||
isCustomer: @isRole('Customer')
|
||||
)
|
||||
|
||||
new App.ControllerForm(
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
<%- @T( @ticket.ticket_state.name ) %> -
|
||||
<%- @T( @ticket.ticket_priority.name ) %> -
|
||||
<span class="humanTimeFromNow" data-time="<%- @ticket.created_at %>">?</span>
|
||||
<% if @ticket.escalation_time: %>
|
||||
<% if @isCustomer && @ticket.escalation_time: %>
|
||||
- <%- @T('Escalation in') %>
|
||||
<span class="humanTimeFromNow escalation" data-time="<%- @ticket.escalation_time %>">?</span>
|
||||
<% end %>
|
||||
|
|
Loading…
Reference in a new issue