@extends('provider.layout') @section('title', 'Dashboard') @section('content') {{-- Welcome bar --}}

Welcome back, {{ auth()->user()->name }}!

Manage all your module profiles from one place.

Add Module Profile
{{-- Aggregated Stats --}}
Total Bookings
{{ $stats['total_bookings'] }}
Pending
{{ $stats['pending_bookings'] }}
Completed
{{ $stats['completed'] }}
Revenue Earned
{{ \App\Helpers\CurrencyHelper::formatForProvider($stats['revenue'] ?? 0, auth()->user()) }}
Avg Rating
{{ number_format($stats['avg_rating'], 1) }} ★
Total Reviews
{{ $stats['total_reviews'] }}
{{-- ═══ Module Profile Cards ═══ --}} @php $moduleDesign = [ 'HomeServices' => ['icon'=>'wrench', 'label'=>'Home Services', 'color'=>'#14b8a6', 'gradient'=>'135deg,#14b8a6,#0d9488'], 'Classified' => ['icon'=>'tag', 'label'=>'Classifieds', 'color'=>'#f97316', 'gradient'=>'135deg,#f97316,#ea580c'], 'RealEstate' => ['icon'=>'building-2', 'label'=>'Real Estate', 'color'=>'#3b82f6', 'gradient'=>'135deg,#3b82f6,#2563eb'], 'DoctorAppointment' => ['icon'=>'stethoscope', 'label'=>'Doctor', 'color'=>'#ef4444', 'gradient'=>'135deg,#ef4444,#dc2626'], 'SalonSpa' => ['icon'=>'scissors', 'label'=>'Salon & Spa', 'color'=>'#d946ef', 'gradient'=>'135deg,#d946ef,#a21caf'], 'FitnessTrainer' => ['icon'=>'dumbbell', 'label'=>'Fitness', 'color'=>'#6366f1', 'gradient'=>'135deg,#6366f1,#4f46e5'], ]; @endphp

My Module Profiles

{{ $providerProfiles->count() }} enrolled {{ Str::plural('module', $providerProfiles->count()) }}
@if($providerProfiles->isEmpty()) {{-- No profiles yet --}}

No Module Profiles Yet

Add a module to start offering services and getting bookings.

Setup First Module
@else
@foreach($providerProfiles as $slug => $profile) @php $d = $moduleDesign[$slug] ?? ['icon'=>'box','label'=>$slug,'color'=>'var(--slate-500)','gradient'=>'135deg,#64748b,#475569']; $status = $profile->status; $modProfile = $moduleProfiles[$slug] ?? null; @endphp
{{-- Header --}}
{{ $d['label'] }}
{{ $profile->business_name }}
@if($status === 'active') Active @elseif($status === 'pending') Pending @elseif($status === 'rejected') Rejected @elseif($status === 'suspended') Suspended @endif
{{-- Status message --}} @if($status === 'active')

Your profile is live and accepting bookings.

@elseif($status === 'pending')

Under admin review — typically 24–48 hrs.

@elseif($status === 'rejected')

@if($profile->rejection_reason) {{ Str::limit($profile->rejection_reason, 90) }} @else Application not approved. Update your profile and resubmit. @endif

@elseif($status === 'suspended')

This profile has been suspended. Contact support.

@endif {{-- Action buttons --}}
{{-- Edit / Resubmit --}} {{ $status === 'rejected' ? 'Resubmit' : 'Edit' }} {{-- Module-specific quick links --}} @if($status === 'active') @if($slug === 'HomeServices') @if($modProfile?->isActive()) Add Service Bookings @else HS Profile @endif @endif {{-- Add more module-specific links here as modules are built --}} @endif
@endforeach {{-- "Add another module" card --}} @php $enrolledSlugs = $providerProfiles->keys()->all(); $availableModules = $enabledModules->filter(fn($m) => !in_array($m->module_slug, $enrolledSlugs)); @endphp @if($availableModules->isNotEmpty())
Add Another Module
{{ $availableModules->count() }} {{ Str::plural('module', $availableModules->count()) }} available
@endif
@endif
{{-- Recent Reviews + Quick Actions --}}

Recent Reviews

All Reviews
@forelse($recentReviews as $review)
{{ $review->user->name ?? 'Customer' }} {{ str_repeat('★', $review->rating) }}{{ str_repeat('☆', 5 - $review->rating) }}

{{ Str::limit($review->body, 80) }}

@empty
No reviews yet.
@endforelse

Quick Actions

@endsection