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,9 +46,9 @@ class Index extends App.Controller
|
||||||
view: @view
|
view: @view
|
||||||
processData: true
|
processData: true
|
||||||
success: (data, status, xhr) =>
|
success: (data, status, xhr) =>
|
||||||
if _.isEqual( @dataLastCall, data)
|
if @dataLastCall
|
||||||
return
|
return if _.isEqual( @dataLastCall.ticket, data.ticket)
|
||||||
if @dataLastCall && $('[name="body"]').val()
|
if $('[name="body"]').val()
|
||||||
App.Event.trigger 'notify', {
|
App.Event.trigger 'notify', {
|
||||||
type: 'success'
|
type: 'success'
|
||||||
msg: App.i18n.translateContent('Ticket has changed!')
|
msg: App.i18n.translateContent('Ticket has changed!')
|
||||||
|
@ -135,6 +135,7 @@ class Index extends App.Controller
|
||||||
ticket: @ticket
|
ticket: @ticket
|
||||||
articles: @articles
|
articles: @articles
|
||||||
nav: @nav
|
nav: @nav
|
||||||
|
isCustomer: @isRole('Customer')
|
||||||
)
|
)
|
||||||
|
|
||||||
new App.ControllerForm(
|
new App.ControllerForm(
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
<%- @T( @ticket.ticket_state.name ) %> -
|
<%- @T( @ticket.ticket_state.name ) %> -
|
||||||
<%- @T( @ticket.ticket_priority.name ) %> -
|
<%- @T( @ticket.ticket_priority.name ) %> -
|
||||||
<span class="humanTimeFromNow" data-time="<%- @ticket.created_at %>">?</span>
|
<span class="humanTimeFromNow" data-time="<%- @ticket.created_at %>">?</span>
|
||||||
<% if @ticket.escalation_time: %>
|
<% if @isCustomer && @ticket.escalation_time: %>
|
||||||
- <%- @T('Escalation in') %>
|
- <%- @T('Escalation in') %>
|
||||||
<span class="humanTimeFromNow escalation" data-time="<%- @ticket.escalation_time %>">?</span>
|
<span class="humanTimeFromNow escalation" data-time="<%- @ticket.escalation_time %>">?</span>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
Loading…
Reference in a new issue