<?php namespace AloVoice; ?>
<style>
.row{
	display:flex !important;
}
.queues_content{
	position: absolute;
    width: 100%;
    left: 0;
}
.queues_agent_icon {
    position: absolute; 
    bottom: 21px; 
    right: 30px;
    width: 15px;
    height: 15px;
}
</style>

<div class="queues_content px-2">
	<div class="row" >
		<h3 class="h3 card-body text-center">Статистика агентов</h3>
	</div>
	<div class="row p-1 bg-light border">
		<div class="col-12">
            <div id="agentstats"> Ждите, загружается информация...</div>
            <div>
                <button type="button" class="btn btn-outline-info" id="queues_update">
                    <i data-feather="rotate-ccw" class="w-2 h-2" width="0.7em" height="0.7em"></i> Обновить 
                </button>
            </div>
        </div>
	</div>
</div>


<br/>


<script>
// if (window.intervalId) {
    // console.log(intervalId);
    // try {
        // clearInterval(window.intervalId)
    // } catch (error) {      
    // }
// }

var afterLoadPage = function () {
    window.makeStatistics = function() {
		loadAloVoiceInfo("alovoice_get_agents", function (res) {
			// window.res = res
			// console.warn(res)
			console.log('Res Agents:', res)
			
			
		});
    }
	
	window.makeStatistics();
}
</script>