@include('frontend.partials.head', ['title' => 'Fily | Provider Dashboard']) @include('frontend.dashboard.partials.styles') @php $providerName = $provider?->business_name ?: ($provider?->name ?: 'Provider'); $providerInitial = strtoupper(substr($providerName, 0, 1)); $activeSubscriptionCollection = collect($activeSubscriptions ?? []); $primarySubscription = $activeSubscriptionCollection->first(); $primaryPlan = $primarySubscription?->plan; $primaryCategory = $primarySubscription?->category ?: $primaryPlan?->category; $planLabel = $activeSubscriptionCollection->isNotEmpty() ? 'Active' : 'None'; $typeMeta = [ 'job' => ['label' => 'Job', 'icon' => 'work'], 'rent' => ['label' => 'Rental', 'icon' => 'apartment'], 'hostel' => ['label' => 'Hostel', 'icon' => 'bed'], 'service' => ['label' => 'Service', 'icon' => 'construction'], ]; $statusMeta = [ 'pending' => ['label' => 'Pending', 'class' => 'warning'], 'rejected' => ['label' => 'Rejected', 'class' => 'danger'], 'approved' => ['label' => 'Accepted', 'class' => 'success'], ]; @endphp @include('frontend.partials.header')
@include('frontend.dashboard.provider.partials.hero', [ 'provider' => $provider, 'kicker' => 'Provider dashboard', 'title' => 'Manage '.$providerName, 'description' => 'Track listings, reviews, views, and subscription details from one place.', 'actionUrl' => route('frontend.provider.lists'), 'actionIcon' => 'format_list_bulleted', 'actionLabel' => 'View listings', ])
@include('frontend.dashboard.provider.partials.sidebar', ['provider' => $provider, 'active' => 'dashboard'])
@if (session('status')) @endif
Active listings
{{ number_format((int) data_get($stats, 'active_listings', 0)) }}
inventory_2
Total views
{{ number_format((int) data_get($stats, 'total_views', 0)) }}
visibility
Reviews this week
{{ number_format((int) data_get($stats, 'week_reviews', 0)) }}
reviews
Plan status
{{ $planLabel }}
verified

Listing overview

{{ number_format((int) data_get($counts, 'all', 0)) }} total listings in your account.

Manage lists
All{{ number_format((int) data_get($counts, 'all', 0)) }}
Pending{{ number_format((int) data_get($counts, 'pending', 0)) }}
Accepted{{ number_format((int) data_get($counts, 'accepted', 0)) }}
Hidden{{ number_format((int) data_get($stats, 'hidden_listings', 0)) }}

Recent listings

Latest listing submissions and moderation status.

@forelse ($recentListings as $listing) @php $meta = $typeMeta[$listing->listing_type] ?? ['label' => ucfirst((string) $listing->listing_type), 'icon' => 'inventory_2']; $statusInfo = $statusMeta[$listing->status] ?? ['label' => ucfirst((string) $listing->status), 'class' => 'warning']; $location = collect([$listing->location, $listing->city])->filter()->implode(', '); @endphp
{{ $meta['icon'] }}

{{ $listing->title }}

{{ $meta['label'] }}{{ $location ? ' - '.$location : '' }}

{{ \Illuminate\Support\Carbon::parse($listing->created_at)->format('d M Y') }}

{{ $statusInfo['label'] }}
@empty
inventory_2

No listings yet

Your created listings will appear here after submission.

@endforelse

Subscription

{{ $activeSubscriptionCollection->count() }} active {{ \Illuminate\Support\Str::plural('plan', $activeSubscriptionCollection->count()) }}.

View plans
@if ($primarySubscription)
Active plan

{{ $primaryCategory?->name ?: 'Subscription' }}

{{ $primaryPlan?->title ?: 'Provider plan' }}

Started
{{ $primarySubscription->start_date?->format('d M Y') ?: 'N/A' }}
Valid until
{{ $primarySubscription->end_date?->format('d M Y') ?: 'N/A' }}
@else
No active plan

Choose a subscription plan

A plan is required before customer-visible listings can stay active.

@endif

Reviews

{{ number_format((int) $totalReviews) }} total reviews, {{ number_format((float) $averageRating, 1) }}/5 average.

Open reviews
@forelse ($recentReviews as $review) @php $customerName = $review->customer?->name ?: 'Customer'; @endphp
{{ $customerName }}
{{ (int) $review->rating }}/5

{{ \Illuminate\Support\Str::limit($review->review ?: 'No written comment was added.', 110) }}

{{ $review->created_at?->format('d M Y, h:i A') }}
@empty
reviews

No reviews yet

Customer feedback will appear here after reviews are submitted.

@endforelse

Profile details

Contact
{{ $provider?->contact_number ?: $provider?->mobile ?: 'Not provided' }}
City
{{ $provider?->city ?: 'Not provided' }}
Email
{{ $provider?->email ?: 'Not provided' }}
@include('frontend.partials.footer')