@extends('layouts.head-nurse') @section('title', 'Head Nurse Dashboard') @section('content')

Total Nurses

{{ \App\Models\User::where('role', 'nurse')->count() }}

{{ \App\Models\User::where('role', 'nurse')->where('is_active', true)->count() }} Active

Total Clinic Admins

{{ \App\Models\User::where('role', 'clinic_admin')->count() }}

{{ \App\Models\User::where('role', 'clinic_admin')->where('is_active', true)->count() }} Active

Total Mothers

{{ \App\Models\ExpectantMother::count() }}

System-wide

Recent Clinic Admins

Manage Admins
@forelse(\App\Models\User::where('role', 'clinic_admin')->with('clinic')->latest()->take(5)->get() as $admin)

{{ $admin->name }}

{{ $admin->email }}

@if($admin->clinic)

{{ $admin->clinic->name }}

@endif
{{ $admin->is_active ? 'Active' : 'Inactive' }} @if($admin->must_change_password) Password Reset @endif
@empty

No clinic admins registered yet.

@endforelse @if(\App\Models\User::where('role', 'clinic_admin')->count() > 5) @endif

System Overview

Clinic Statistics

@foreach(\App\Models\Clinic::where('is_active', true)->get() as $clinic)
{{ $clinic->name }}
{{ \App\Models\User::where('role', 'nurse')->where('clinic_id', $clinic->id)->count() }} {{ \App\Models\ExpectantMother::where('clinic_id', $clinic->id)->count() }}
@endforeach
@endsection