@extends('backend.layouts.app') @section('title', __('Marketplace Vendors')) @php use App\Enums\Marketplace\VendorStatus; $activeStatus = in_array(request('status'), ['pending', 'active', 'suspended'], true) ? request('status') : 'all'; $segments = [ 'all' => ['label' => __('All'), 'count' => $statusCounts['all']], 'pending' => ['label' => __('Pending'), 'count' => $statusCounts['pending']], 'active' => ['label' => __('Active'), 'count' => $statusCounts['active']], 'suspended' => ['label' => __('Suspended'), 'count' => $statusCounts['suspended']], ]; $canManage = auth('admin')->user()?->can('marketplace-vendor-manage'); $colspan = $canManage ? 6 : 5; @endphp @section('content')

{{ __('Marketplace Vendors') }}

{{ __('Review applications, approve sellers, and suspend accounts that break the rules.') }}

{{ __('Marketplace settings') }}
{{-- ── Status segments + search ── --}}
@if($canManage)@endif @forelse($vendors as $vendor) @php $avatar = getUserAvatarDetails($vendor->display_name); @endphp @if($canManage) @endif @empty @endforelse
{{ __('Vendor') }} {{ __('Owner') }} {{ __('Status') }} {{ __('Sales') }} {{ __('Joined') }}{{ __('Actions') }}
{{ $avatar['initials'] }}
{{ $vendor->display_name }}
{{ $vendor->categoryLabel() }}
{{ $vendor->user?->name }}
{{ $vendor->user?->email }}
{{ $vendor->status->label() }} @if($vendor->status === VendorStatus::SUSPENDED && $vendor->suspend_reason) @endif {{ number_format((int) $vendor->completed_sales_count) }}
{{ $vendor->created_at?->format('M d, Y') }}
{{ $vendor->created_at?->diffForHumans() }}
@if($vendor->status !== VendorStatus::ACTIVE) @endif @if($vendor->status !== VendorStatus::SUSPENDED) @endif
@if($vendors->hasPages())
{{ __('Showing :n of :t vendors', ['n' => $vendors->count(), 't' => $vendors->total()]) }} {{ $vendors->links() }}
@endif
@if($canManage) {{-- ── Suspend confirmation (with required reason) ── --}} {{-- ── Approve confirmation ── --}} @endif @endsection @push('scripts') @endpush