@extends('admin.layout_admin.main') @section('css') @endsection @section('content') @php use Carbon\Carbon; $filters = []; if (request()->filled('q')) { $filters[] = 'Từ khóa: ' . e(request('q')) . ''; } if (request()->filled('date')) { $dateFormatted = \Carbon\Carbon::createFromFormat('Y-m-d', request('date'))->format('d/m/Y'); $filters[] = 'Ngày: ' . $dateFormatted . ''; } if (request()->filled('filter_mode')) { $mode = request('filter_mode'); $label = match ($mode) { 'today' => 'Hôm nay', 'this_week' => 'Tuần này', 'this_month' => 'Tháng này', 'this_year' => 'Năm nay', default => null, }; if ($label) { $filters[] = 'Chế độ lọc: ' . $label . ''; } } if (request()->filled('is_viewed')) { if (request('is_viewed') == 1) { $statusText = 'Đã xem'; } else { $statusText = 'Chưa xem'; } $filters[] = 'Trạng thái xem: ' . $statusText . ''; } if (request()->filled('status')) { if (request('status') == 1) { $statusText = 'Đã xác nhận'; } elseif (request('status') == 0) { $statusText = 'Chưa xác nhận'; } else { $statusText = 'Đã hủy'; } $filters[] = 'Trạng thái phản hồi: ' . $statusText . ''; } @endphp
Kết quả tìm kiếm: {!! implode(', ', $filters) !!}
@endif @if ($appointments->count() > 0)| Người đăng ký | Người khám | Chuyên khoa | Bác sĩ | Trạng thái | Thời gian | Xử lý | ||
|---|---|---|---|---|---|---|---|---|
| {{ $appointment->user->name }} | {{ $appointment->user->email }} | {{ $appointment->patient_name }} | {{ $appointment->department->name }} | {{ $appointment->doctor->name }} | @if ($appointment->status == 1) Đã xác nhận @elseif($appointment->status == 0) Chờ xác nhận @else Đã hủy @endif | @php $diffInDays = $appointment->created_at->diffInDays(now()); @endphp {{ $diffInDays > 15 ? $appointment->created_at->format('H:i d/m/Y') : $appointment->created_at->diffForHumans() }} |
Chưa có lịch hẹn khám nào!
@endif