diff --git a/app/assets/javascripts/app/controllers/agent_ticket_zoom.js.coffee b/app/assets/javascripts/app/controllers/agent_ticket_zoom.js.coffee index 897ed452c..d4bb8783b 100644 --- a/app/assets/javascripts/app/controllers/agent_ticket_zoom.js.coffee +++ b/app/assets/javascripts/app/controllers/agent_ticket_zoom.js.coffee @@ -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( diff --git a/app/assets/javascripts/app/views/agent_ticket_zoom.jst.eco b/app/assets/javascripts/app/views/agent_ticket_zoom.jst.eco index c5f08eadf..1c1fc0d0f 100644 --- a/app/assets/javascripts/app/views/agent_ticket_zoom.jst.eco +++ b/app/assets/javascripts/app/views/agent_ticket_zoom.jst.eco @@ -22,7 +22,7 @@ <%- @T( @ticket.ticket_state.name ) %> - <%- @T( @ticket.ticket_priority.name ) %> - ? - <% if @ticket.escalation_time: %> + <% if @isCustomer && @ticket.escalation_time: %> - <%- @T('Escalation in') %> ? <% end %>