@extends('backend.layouts.master') @section('content')

Danh sách phòng chat tư vấn

@if (isset($messages) && count($messages)) @foreach ($messages as $key => $item) @php $h = floor(@$item->sumTime()/60/60); $m = floor((@$item->sumTime()/60/60 - $h)*60); $time_kh = $h.' giờ '.$m.' phút'; if ($h < 1) { $time_kh = $m.' phút'; } @endphp @php $h = floor(@$item->customer->times/60/60); $m = floor((@$item->customer->times/60/60 - $h)*60); $time = $h.' giờ '.$m.' phút'; if ($h < 1) { $time = $m.' phút'; } @endphp @endforeach @else Không có phòng tư vấn nào. @endif
STT Tên cuộc tư vấn Kiểu tư vấn Khách hàng (mã) Tư vấn viên (mã) Thời gian đã tư vấn Thời gian còn lại của KH Trạng thái Hành động
{{$key+1}} {{@$item->name}} @if ($item->type == \App\Constants\ConsultingHistoryConstant::TAM_LY) Tâm Lý @elseif ($item->type == \App\Constants\ConsultingHistoryConstant::PHAP_LY) Pháp Lý @endif {{@$item->customer->name}} ({{@$item->customer->code_kh}}) {{@$item->user->name}} ({{@$item->user->code_tvv}}){{$time_kh}}{{@$time}} @if ($item->status == \App\Constants\ConsultingHistoryConstant::ACTIVE) Hoạt động @elseif ($item->status == \App\Constants\ConsultingHistoryConstant::INACTIVE) Đã khóa @endif
{{ $messages->appends(['searchName' => $dataSearch['searchName'], 'searchConsult' => $dataSearch['searchConsult'], 'searchStatus' => $dataSearch['searchStatus']])->links() }}
@endsection