@extends('admin_navbar') @section('content')
Admin Dashboard

Overview & System Stats

Quick snapshot of tests, branches, customers, and billing.

Orders: {{ $ordersCount ?? 0 }}
{{-- Core entities --}}
Test Types
{{ $testTypeCount ?? 0 }}
Total test types configured
Equipment
{{ $equipmentCount ?? 0 }}
Equipment entries
Test Categories
{{ $categoryCount ?? 0 }}
Categories (e.g., Chemical Parameters)
Lab Tests
{{ $labTestsCount ?? 0 }}
Total tests available
{{-- Users/branches --}}
Overall Customers
{{ $customerCount ?? 0 }}
All customers in the system
Overall Branches
{{ $branchCount ?? 0 }}
Active branches
Overall Orders
{{ $ordersCount ?? 0 }}
Orders/visits created
{{-- Billing --}} @php $total = (float)($totalAmount ?? 0); $paid = (float)($paidAmount ?? 0); $rem = (float)($remainingAmount ?? 0); $pct = $total > 0 ? round(($paid / $total) * 100) : 0; @endphp
Overall Order Amount
{{ number_format($total, 2) }}
Total billed amount (after discounts)
Overall Paid Amount
{{ number_format($paid, 2) }}
Collected payments
Overall Remaining Amount
{{ number_format($rem, 2) }}
Pending amount
Payment Progress
{{ $pct }}%
Paid vs total billed
Unfinished Orders
@forelse($unfinishedOrders ?? [] as $o) @php $pendingCount = $o->items->whereIn('result_status', ['pending','processing'])->count(); $customerName = $o->customer?->user?->name ?? '—'; $branchName = $o->branch?->branch_name ?? 'Main/Admin'; @endphp @empty @endforelse
Order # Customer Branch Created Pending Tests Action
#{{ $o->id }} {{ $customerName }} {{ $branchName }} {{ $o->created_at?->format('Y-m-d H:i') }} {{ $pendingCount }} Open Order
No unfinished orders 🎉
@endsection