@if ($isOwner) @php($totalVisits = $appointments->count()) @php($confirmed = $appointments->where('status.value', 'CONFIRMED')->count())

Business Dashboard

@csrf
Total visits

{{ $totalVisits }}

Today
Confirmed

{{ $confirmed }}

Today

Top services

@php($serviceCounts = $appointments->flatMap->services->groupBy('service.name')->map->count()->sortDesc()->take(3)) @forelse ($serviceCounts as $name => $count)
{{ $name }}{{ $count }} visit{{ $count === 1 ? '' : 's' }}
@empty
Your most popular services will appear here.
@endforelse

Staff performance

Manage team
@forelse ($business->staff->where('status.value', 'ACTIVE')->take(4) as $member)

{{ $member->user?->name ?: 'Team member' }}

{{ $member->user?->name ? 'Active' : '—' }}
@empty

Add team members to see performance.

@endforelse

Booking rules

Manage cancellation policies, booking windows, and lead times.

Update rules
@else

Staff workspace

Good morning, {{ $staff->user?->name ?: 'there' }}

{{ now($business->timezone)->format('l, j F Y') }}

@csrf

Today’s appointments

{{ $appointments->count() }}

Confirmed

{{ $appointments->where('status.value', 'CONFIRMED')->count() }}

Next appointment

{{ $appointments->first()?->startAt->setTimezone($business->timezone)->format('g:i A') ?: 'None yet' }}

Today’s schedule

@forelse ($appointments as $appointment)

{{ $appointment->startAt->setTimezone($business->timezone)->format('g:i A') }} · {{ $appointment->customer->firstName }} {{ $appointment->customer->lastName }}

{{ $appointment->services->pluck('service.name')->join(', ') }}

{{ ucfirst(strtolower($appointment->status->value)) }}
@empty
Your schedule is clear today.
@endforelse
@endif