@extends(session('staff_logged_in') ? 'Staff.layout' : 'Admin.layout') @section('content') {{-- ─── Page heading ──────────────────────────────────── --}}

Dashboard

{{-- ─── Stat cards row ────────────────────────────────── --}}
{{-- Total Patients --}}

Total Patients

{{ number_format($totalPatients ?? 0) }}


This Week {{ number_format($thisWeekPatients ?? 0) }}
Last Week {{ number_format($lastWeekPatients ?? 0) }}
{{-- Appointments --}}

Appointments

{{ number_format($appointments ?? 0) }}


Completed {{ number_format($completed_appointments ?? 0) }}
Pending {{ number_format($pending_appointments ?? 0) }}
{{-- Follow Ups --}}

Total Follow Ups

{{ number_format($totalFollowUps ?? 0) }}


Today {{ number_format($todayFollowUps ?? 0) }}
Tomorrow {{ number_format($tomorrowFollowUps ?? 0) }}
{{-- Products --}}

Total Products

{{ number_format($totalProducts ?? 0) }}


Low Stock {{ number_format($lowStockProducts ?? 0) }}
Out of Stock {{ number_format($outOfStockProducts ?? 0) }}
{{-- Website Appointments --}}

Website Appointments

{{ number_format($websiteAppointments ?? 0) }}

{{-- Doctors --}}

Total Doctors

{{ number_format($totalDoctors ?? 0) }}

{{-- Staff --}}

Total Staffs

{{ number_format($totalStaffs ?? 0) }}

{{-- Reviews --}}

Total Reviews

{{ number_format($totalReviews ?? 0) }}

{{-- ─── Table cards row ───────────────────────────────── --}}
{{-- Upcoming Follow-ups --}}
Upcoming Follow-ups
@forelse($upcomingFollowUps as $followUp) @empty @endforelse
Patient Date
{{ $followUp->patient_name }} {{ $followUp->follow_up_date }}
No upcoming follow-ups
{{-- Low Stock Medicines --}}
Low Stock Medicines
@forelse($lowStockMedicines as $medicine) @empty @endforelse
Product Stock
{{ $medicine->product_name }} {{ $medicine->current_stock }}
No low stock medicines
{{-- Expiring Medicines --}}
Expiring Medicines
@forelse($expiringMedicines as $medicine) @empty @endforelse
Product Expiry
{{ $medicine->product->product_name ?? '-' }} {{ \Carbon\Carbon::parse($medicine->expiry_date)->format('d-m-Y') }}
No medicines expiring soon
{{-- Recent Patients --}}
Recent Patients
@forelse($recentPatients as $recentPatient) @empty @endforelse
Patient Mobile
{{ $recentPatient->patient_name }} {{ $recentPatient->phone ?? '-' }}
No recent patients
@endsection