2021-10-22 01:03:05 +08:00

99 lines
4.1 KiB
Handlebars

<div class="widget-box transparent" style="padding-top: 2px; border: 1px solid #ddd;">
{{grid-header}}
<div class="widget-body">
<!-- #section:custom/scrollbar -->
<div class="widget-main no-padding">
<table class="table table-striped table-bordered table-hover dataTable">
<thead class="thin-border-bottom">
<tr>
<th>
账户
</th>
<th>
{{th-filter name='registered'
text='注册状态'
options=(array
(hash value=true text='在线')
(hash value=false text='离线')
)
}}
</th>
<th>
{{th-filter name='status'
text='坐席状态'
options=(array
(hash value='READY' text='就绪')
(hash value='NOT_READY' text='未就绪')
(hash value='OFFLINE' text='离线')
)
}}
</th>
<th>
{{th-filter name='state'
text='话机状态'
options=(array
(hash value='IDLE' text='空闲')
(hash value='IN_A_CALL' text='通话中')
(hash value='ACW' text='话后事务')
)
}}
</th>
{{#sortable-th name='idleTime'}}
空闲时间
{{/sortable-th}}
<th>
{{th-filter name='queueId'
text='队列'
options=model.queues
value-field='id'
text-field='name'
}}
</th>
<th>
事件Key
</th>
</tr>
</thead>
<tbody>
{{#each model.data as |it|}}
<tr>
<td>
{{it.account}}({{it.agent}})
</td>
<td>
{{status-cell model=it
field='registered'
enabled-text='在线'
disabled-text='离线'}}
</td>
<td>
{{option-text (array (hash value='READY' text='就绪')
(hash value='NOT_READY' text='未就绪')
(hash value='OFFLINE' text='离线')) it.status}}
</td>
<td>
{{option-text (array
(hash value='IDLE' text='空闲')
(hash value='IN_A_CALL' text='通话中')
(hash value='ACW' text='话后事务')) it.state}}
</td>
<td>
{{date-cell value=it.idleTime}}
</td>
<td>
{{option-text model.queues it.queueId 'id' 'name'}}
</td>
<td>
{{it.eventKey}}
</td>
</tr>
{{/each}}
</tbody>
</table>
</div>
{{pagination-bar}}
</div>
</div>
{{outlet}}