@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('dob')) { $dobFormatted = Carbon::createFromFormat('Y-m-d', request('dob'))->format('d/m/Y'); $filters[] = 'Ngày sinh: ' . e($dobFormatted) . ''; } if (request()->filled('gender')) { $genderText = request('gender') == '1' ? 'Nam' : 'Nữ'; $filters[] = 'Giới tính: ' . $genderText . ''; } 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 . ''; } } @endphp
Kết quả tìm kiếm: {!! implode(', ', $filters) !!}
@endif @if ($patients->count() > 0)| STT | Mã | Tên | CCCD | Giới tính | Ngày sinh | SĐT | @can(['chinh-sua-nhan-vien', 'xoa-nhan-vien'])Xử lý | @endcan
|---|---|---|---|---|---|---|---|
| {{ $patients->firstItem() + $key }} | {{ $patient->patient_code }} | {{ $patient->name }} | {{ $patient->cccd }} | @if ($patient->gender == 1) Nam @elseif ($patient->gender == 2) Nữ @else Chưa cập nhật @endif | {{ \Carbon\Carbon::parse($patient->dob)->format('d/m/Y') }} | {{ $patient->phone }} |
Chưa có bệnh nhân nào!
@endif