@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
@if (count($filters)) Tìm kiếm lịch hẹn khám @else {{ $title }} @endif
@can('xoa-lich-hen-kham') @endcan
@if (count($filters))

Kết quả tìm kiếm: {!! implode(', ', $filters) !!}

@endif @if ($appointments->count() > 0)
@foreach ($appointments as $appointment) @endforeach
Người đăng ký Email 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() }}
@if ($appointment->is_viewed == 0) @elseif($appointment->is_viewed == 1) @endif @can('xem-chi-tiet-lich-hen-kham') @endcan @can('xoa-lich-hen-kham')
@method('DELETE') @csrf
@endcan
@else

Chưa có lịch hẹn khám nào!

@endif
{{ $appointments->links() }}
@endsection @section('js') @endsection