@extends('crm.layouts.app') @section('title', 'Business Intelligence') @section('content')

Business Intelligence

Comprehensive analytics and insights for your studio performance.

Export Data

Revenue Analytics

Total Revenue

${{ number_format($revenueData['total_revenue'], 2) }}

@if($revenueData['revenue_growth'] != 0)
{{ $revenueData['revenue_growth'] > 0 ? '+' : '' }}{{ number_format($revenueData['revenue_growth'], 2) }}% vs previous period
@endif

Total Tips

${{ number_format($revenueData['total_tips'], 2) }}

{{ $revenueData['total_revenue'] > 0 ? number_format(($revenueData['total_tips'] / $revenueData['total_revenue']) * 100, 1) : 0 }}% of revenue

Transactions

{{ number_format($revenueData['total_transactions']) }}

Completed appointments

Avg Transaction

${{ number_format($revenueData['average_transaction_value'], 2) }}

Revenue per appointment

Daily Revenue Trend

@if($revenueData['daily_revenue']->count() > 0)
@foreach($revenueData['daily_revenue'] as $date => $revenue)
@endforeach
{{ $revenueData['daily_revenue']->keys()->first() }} {{ $revenueData['daily_revenue']->keys()->last() }}
@else

No revenue data

Revenue trends will appear once you start processing payments.

@endif

Client Analytics

Total Clients

{{ number_format($clientData['total_clients']) }}

New Clients

{{ number_format($clientData['new_clients']) }}

Retention Rate

{{ number_format($clientData['retention_rate'], 1) }}%

Avg Visits

{{ number_format($clientData['average_visits_per_client'], 1) }}

Top Clients by Lifetime Value

@if($clientData['client_lifetime_value']->count() > 0)
@foreach($clientData['client_lifetime_value'] as $client) @endforeach
Client Total Spent Visits Avg per Visit Last Visit Risk Score
{{ $client['client'] }} ${{ number_format($client['total_spent'], 2) }} {{ $client['visit_count'] }} ${{ number_format($client['avg_per_visit'], 2) }} {{ $client['last_visit'] ? \Carbon\Carbon::parse($client['last_visit'])->format('M j, Y') : 'Never' }} {{ number_format($client['risk_score'], 1) }}%
@else

No client data

Client lifetime value will appear once you have completed appointments.

@endif

Artist Performance

@foreach($artistData['artist_metrics'] as $artist)

{{ $artist['artist'] }}

Score: {{ number_format($artist['productivity_score'], 1) }}
Revenue
${{ number_format($artist['revenue'], 2) }}
Tips
${{ number_format($artist['tips'], 2) }}
Appointments
{{ $artist['appointments'] }}
Per Appointment
${{ number_format($artist['average_per_appointment'], 2) }}
Tip Percentage: {{ number_format($artist['tip_percentage'], 1) }}%
@endforeach

Operational Insights

Utilization Rate

{{ number_format($operationalData['utilization_rate'], 1) }}%

{{ $operationalData['completed_appointments'] }}/{{ $operationalData['total_appointments'] }} completed

Cancellation Rate

{{ number_format($operationalData['cancellation_rate'], 1) }}%

{{ $operationalData['cancelled_appointments'] }} cancelled

No-Show Rate

{{ number_format($operationalData['no_show_rate'], 1) }}%

{{ $operationalData['no_show_appointments'] }} no-shows

Busiest Hours

@if($operationalData['bookings_by_hour']->count() > 0)
@foreach($operationalData['bookings_by_hour'] as $hour => $count)
{{ $hour }}:00
{{ $count }}
@endforeach
@else

No booking data

Hour patterns will appear once you have bookings.

@endif

Busiest Days

@if($operationalData['bookings_by_day']->count() > 0)
@foreach($operationalData['bookings_by_day'] as $day => $count)
{{ $day }}
{{ $count }}
@endforeach
@else

No booking data

Day patterns will appear once you have bookings.

@endif

Predictive Insights

Revenue Forecast

${{ number_format($predictiveData['forecasted_revenue'], 2) }}
Forecasted for next period
{{ $predictiveData['growth_rate'] > 0 ? '+' : '' }}{{ number_format($predictiveData['growth_rate'], 2) }}% growth trend

At-Risk Clients

@forelse($predictiveData['churn_risk_clients'] as $client)
{{ $client['client'] }}
Last visit: {{ $client['last_visit'] ? \Carbon\Carbon::parse($client['last_visit'])->format('M j, Y') : 'Never' }}
{{ number_format($client['risk_score'], 1) }}%
${{ number_format($client['total_spent'], 2) }} LTV
@empty

No high-risk clients identified

@endforelse
@if($predictiveData['revenue_opportunities']->count() > 0)

Revenue Opportunities

@foreach($predictiveData['revenue_opportunities'] as $opportunity)
{{ $opportunity['client'] }}
{{ $opportunity['description'] }}
${{ number_format($opportunity['potential_revenue'], 2) }}
Potential revenue
@endforeach
@endif @endsection