diff --git a/resources/views/care/dashboard.blade.php b/resources/views/care/dashboard.blade.php index 95382db..52acae4 100644 --- a/resources/views/care/dashboard.blade.php +++ b/resources/views/care/dashboard.blade.php @@ -1,63 +1,133 @@ -
-

{{ $organization->name }}

-

Healthcare management dashboard

-
+ @php + $currency = config('care.billing.currency'); + $operationalCards = [ + [ + 'label' => 'Patients today', + 'value' => number_format($operational['patients_today']), + 'href' => route('care.patients.index'), + 'icon' => '', + ], + [ + 'label' => 'Appointments today', + 'value' => number_format($operational['appointments_today']), + 'href' => route('care.appointments.index'), + 'icon' => '', + ], + [ + 'label' => 'Open bills', + 'value' => number_format($operational['open_bills']), + 'href' => route('care.bills.index'), + 'icon' => '', + ], + [ + 'label' => 'Revenue today', + 'value' => $currency.' '.number_format($operational['revenue_today_minor'] / 100, 2), + 'href' => route('care.bills.index'), + 'icon' => '', + 'valueClass' => 'text-emerald-700', + ], + [ + 'label' => 'Pending lab', + 'value' => number_format($operational['pending_lab']), + 'href' => route('care.lab.queue.index'), + 'icon' => '', + ], + ]; -
-
-

Patients today

-

{{ $operational['patients_today'] }}

+ $organizationCards = [ + [ + 'label' => 'Active branches', + 'value' => number_format($stats['branches']), + 'href' => route('care.branches.index'), + 'icon' => '', + ], + [ + 'label' => 'Team members', + 'value' => number_format($stats['team_members']), + 'href' => route('care.members.index'), + 'icon' => '', + ], + [ + 'label' => 'Departments', + 'value' => number_format($stats['departments']), + 'href' => route('care.departments.index'), + 'icon' => '', + ], + ]; + @endphp + +
+
+

{{ $organization->name }}

+
-
-

Appointments today

-

{{ $operational['appointments_today'] }}

-
-
-

Open bills

-

{{ $operational['open_bills'] }}

-
-
-

Revenue today

-

{{ config('care.billing.currency') }} {{ number_format($operational['revenue_today_minor'] / 100, 2) }}

-
-
-

Pending lab

-

{{ $operational['pending_lab'] }}

+
+ @include('partials.mobile-header-btn', [ + 'href' => route('care.patients.create'), + 'label' => 'Register patient', + 'desktopLabel' => 'Register patient', + 'variant' => 'outline', + 'showDesktopIcon' => false, + ]) + @include('partials.mobile-header-btn', [ + 'href' => route('care.appointments.create'), + 'label' => 'Book appointment', + 'desktopLabel' => 'Book appointment', + 'variant' => 'primary', + ])
-
-
-

Active branches

-

{{ $stats['branches'] }}

-
-
-

Team members

-

{{ $stats['team_members'] }}

-
-
-

Departments

-

{{ $stats['departments'] }}

-
-
- -
-

Branches

-
- @forelse ($branches as $branch) -
-
-

{{ $branch->name }}

-

{{ $branch->departments_count }} department(s) · {{ $branch->address ?? 'No address' }}

+ +

{{ $card['value'] }}

+
+ @endforeach
+ +
+ @foreach ($organizationCards as $card) + +
+
+ {!! $card['icon'] !!} +
+

{{ $card['label'] }}

+
+

{{ $card['value'] }}

+
+ @endforeach +
+ +
+
+

Branches

+ @include('partials.mobile-icon-link', [ + 'href' => route('care.branches.index'), + 'label' => 'Manage branches', + 'icon' => 'arrow', + ]) +
+ @forelse ($branches as $branch) +
+
+

{{ $branch->name }}

+

{{ $branch->departments_count }} department(s) · {{ $branch->address ?? 'No address' }}

+
+ @unless ($branch->is_active) + Inactive + @endunless +
+ @empty +

No branches configured yet.

+ @endforelse +
diff --git a/resources/views/partials/sidebar.blade.php b/resources/views/partials/sidebar.blade.php index 3a02c14..6875f63 100644 --- a/resources/views/partials/sidebar.blade.php +++ b/resources/views/partials/sidebar.blade.php @@ -44,7 +44,7 @@ if ($permissions->can($member, 'bills.view')) { $nav[] = ['name' => 'Billing', 'route' => route('care.bills.index'), 'active' => request()->routeIs('care.bills.*'), - 'icon' => '']; + 'icon' => '']; } if ($permissions->can($member, 'reports.finance.view')) { @@ -69,35 +69,35 @@ $adminNav[] = ['name' => 'Audit log', 'route' => route('care.audit.index'), 'active' => request()->routeIs('care.audit.*'), 'icon' => '']; } + + $settingsActive = request()->routeIs('care.settings*'); @endphp -