@extends('layouts.master') @section('title', $title) @section('page_css') @endsection @section('content') @include('dashboard._workspaces') @include('dashboard._eye_clinic') @if (empty($workspaces) && empty($eye) && !auth()->user()->can('can-see-detailed-dashboard'))

No dashboard is set up for your role yet — ask an admin to give it one of the Dashboard → Workspace permissions.

@endif @can('can-see-detailed-dashboard')
@can('dashboard-card-patient')

Patients Current Month

{{ number_format($patients, 2) }}

@endcan @can('dashboard-card-appointment')

Cards Current Month

{{ $currency->symbol }}{{ number_format($cards, 2) }}

@endcan @can('dashboard-card-operation')

Operations Current Month

{{ $currency->symbol }}{{ number_format($Operation, 2) }}

@endcan {{-- deliveries are billed like operations (Payment reference "Delivery") --}} @can('dashboard-card-operation')

Deliveries Current Month

{{ $currency->symbol }}{{ number_format($delivery ?? 0, 2) }}

@endcan @can('dashboard-card-service')

Services Current Month

{{ $currency->symbol }}{{ number_format($services, 2) }}

@endcan @can('dashboard-card-test')

Tests Current Month

{{ $currency->symbol }}{{ number_format($test, 2) }}

@endcan @can('dashboard-card-image')

Imaging Current Month

{{ $currency->symbol }}{{ number_format($imaging, 2) }}

@endcan @can('dashboard-card-admission')

Admission Current Month

{{ $currency->symbol }}{{ number_format($admission, 2) }}

@endcan {{-- average paid per visit / per admission this month (dashboard-card-avg-visit / -avg-admission) --}} @foreach (['visit' => ['dashboard-card-avg-visit', 'Average per visit', 'visit(s)', 'text-info'], 'admission' => ['dashboard-card-avg-admission', 'Average per admission', 'admission(s)', 'text-warning']] as $k => [$perm, $label, $unit, $color]) @if (isset($averages) && auth()->user()->can($perm)) @php $a = $averages[$k]; @endphp

{{ $label }} · this month

{{ $currency->symbol }}{{ number_format($a['avg'], 2) }}

{{ number_format($a['n']) }} {{ $unit }} paid · {{ $currency->symbol }}{{ number_format($a['paid'], 2) }}
@endif @endforeach
@endcan
@can('dashboard-chart-income_expense')

Income vs Expenses In Current Month

@endcan @can('dashboard-chart-expense')

Expenses In Current Month

@endcan @can('dashboard-chart-sales')

Sales by product In Current Month

@endcan @can('dashboard-chart-income')

income heads comparis In Current Month

@endcan @can('dashboard-chart-service')

Service incomes by type In Current Month

@endcan
@endsection @section('page_js') @endsection