Thống kê thời gian tư vấn
@if($sumTimeTvv != '')
@php
$h = floor($sumTimeTvv/60/60);
$m = floor(($sumTimeTvv/60/60 - $h)*60);
$s = $sumTimeTvv % 60;
$sumTimeTvv = $h.' giờ '.$m.' phút '.$s.' giây';
if ($h < 1 && $m > 0) {
$sumTimeTvv = $m.' phút';
}
if ($h < 1 && $m > 0 && $s > 0) {
$sumTimeTvv = $m.' phút '.$s.' giây';
}
if ($h < 1 && $m < 1) {
$sumTimeTvv = $s.' giây';
}
@endphp
@endif
Tổng thời gian của tư vấn viên bạn là: {{($sumTimeTvv)?$sumTimeTvv:'Chưa có dữ liệu'}}
| STT | Ảnh khách hàng | Tên khách hàng | Mã khách hàng | Kiểu chat | Số phút | Thời gian chat |
|---|---|---|---|---|---|---|
| {{$key+1}} |
|
{{@$item->customer->name}} | {{@$item->customer->code_kh}} | @if ($item->type_chat === \App\Constants\ConsultingHistoryConstant::TYPE_CHAT) Chat @elseif ($item->type_chat === \App\Constants\ConsultingHistoryConstant::TYPE_SUPPORT) Tìm hiểu tài liệu @endif | @php $h = floor(@$item->time/60/60); $m = floor((@$item->time/60/60 - $h)*60); $s = @$item->time % 60; $time_kh = $h.' giờ '.$m.' phút '.$s.' giây'; if ($h < 1 && $m > 0) { $time_kh = $m.' phút'; } if ($h < 1 && $m > 0 && $s > 0) { $time_kh = $m.' phút '.$s.' giây'; } if ($h < 1 && $m < 1) { $time_kh = $s.' giây'; } @endphp{{$time_kh}} | {{$item->created_at ? \Carbon\Carbon::createFromFormat('Y-m-d H:i:s', $item->created_at)->format('H:i:s d-m-Y'):''}} |
{{ $data->appends($_GET)->links() }}