Fixed issue #1478 - Allow cti log entries to check done (also if no hangup state is available).
This commit is contained in:
parent
31b11546f4
commit
2075117635
2 changed files with 9 additions and 4 deletions
|
@ -142,7 +142,7 @@ class App.CTI extends App.Controller
|
||||||
|
|
||||||
for item in @list
|
for item in @list
|
||||||
item.status_class = ''
|
item.status_class = ''
|
||||||
|
item.disabled = true
|
||||||
if item.state is 'newCall'
|
if item.state is 'newCall'
|
||||||
item.state_human = 'ringing'
|
item.state_human = 'ringing'
|
||||||
item.status_class = 'neutral'
|
item.status_class = 'neutral'
|
||||||
|
@ -150,6 +150,7 @@ class App.CTI extends App.Controller
|
||||||
item.state_human = 'connected'
|
item.state_human = 'connected'
|
||||||
item.status_class = 'ok'
|
item.status_class = 'ok'
|
||||||
else if item.state is 'hangup'
|
else if item.state is 'hangup'
|
||||||
|
item.disabled = false
|
||||||
item.state_human = switch item.comment
|
item.state_human = switch item.comment
|
||||||
when 'cancel', 'noAnswer', 'congestion' then 'not reached'
|
when 'cancel', 'noAnswer', 'congestion' then 'not reached'
|
||||||
when 'busy' then 'busy'
|
when 'busy' then 'busy'
|
||||||
|
@ -164,6 +165,10 @@ class App.CTI extends App.Controller
|
||||||
if item.start && item.end
|
if item.start && item.end
|
||||||
item.duration = format((Date.parse(item.end) - Date.parse(item.start))/1000)
|
item.duration = format((Date.parse(item.end) - Date.parse(item.start))/1000)
|
||||||
|
|
||||||
|
diff_in_min = ((Date.now() - Date.parse(item.created_at)) / 1000) / 60
|
||||||
|
if diff_in_min > 1
|
||||||
|
item.disabled = false
|
||||||
|
|
||||||
@userPopupsDestroy()
|
@userPopupsDestroy()
|
||||||
@callerLog.html( App.view('cti/caller_log')(list: @list))
|
@callerLog.html( App.view('cti/caller_log')(list: @list))
|
||||||
@userPopups()
|
@userPopups()
|
||||||
|
|
|
@ -11,10 +11,10 @@
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<% for item in @list: %>
|
<% for item in @list: %>
|
||||||
<tr <% if item.state is 'hangup' && item.done: %>class="is-grayed-out"<% end %> data-id="<%- item.id %>">
|
<tr <% if item.done: %>class="is-grayed-out"<% end %> data-id="<%- item.id %>">
|
||||||
<td class="table-checkbox" style="vertical-align: middle">
|
<td class="table-checkbox" style="vertical-align: middle">
|
||||||
<label class="checkbox-replacement<% if item.state isnt 'hangup': %> is-disabled<% end %>">
|
<label class="checkbox-replacement<% if item.disabled is true: %> is-disabled<% end %>">
|
||||||
<input type="checkbox" class="js-check"<% if item.done: %> checked<% end %><% if item.state isnt 'hangup': %> disabled<% end %>>
|
<input type="checkbox" class="js-check"<% if item.done: %> checked<% end %><% if item.disabled is true: %> disabled<% end %>>
|
||||||
<%- @Icon('checkbox', 'icon-unchecked') %>
|
<%- @Icon('checkbox', 'icon-unchecked') %>
|
||||||
<%- @Icon('checkbox-checked', 'icon-checked') %>
|
<%- @Icon('checkbox-checked', 'icon-checked') %>
|
||||||
</label>
|
</label>
|
||||||
|
|
Loading…
Reference in a new issue