@extends('layouts.admin') @section('page-title', 'Vendor Details') @section('content')

{{ $vendor->name }}

{{ $vendor->slug }}

{{-- Sidebar --}}
@if($vendor->logo) {{ $vendor->name }} @else
{{ substr($vendor->name, 0, 1) }}
@endif

{{ $vendor->name }}

{{ ucfirst($vendor->status) }}
@if($vendor->status === 'pending')
@csrf
@csrf
@endif
Commission:{{ $vendor->commission_rate }}%
Phone:{{ $vendor->phone ?: 'N/A' }}
Email:{{ $vendor->email ?: 'N/A' }}
Location:{{ $vendor->city ? $vendor->city . ', ' . $vendor->country : 'N/A' }}
{{-- Owner Info --}} @if($vendor->user)

Store Owner

@if($vendor->user->avatar) @else
{{ substr($vendor->user->name, 0, 1) }}
@endif

{{ $vendor->user->name }}

{{ maskEmail($vendor->user->email) }}

@endif
{{-- Main Content --}}
{{-- Stats --}}

{{ $vendor->products->count() }}

Products

${{ number_format($vendor->total_sales, 2) }}

Total Sales

${{ number_format($vendor->wallet?->balance ?? $vendor->balance, 2) }}

Balance

{{-- Recent Products --}} @if($vendor->products->count() > 0)

Recent Products

@foreach($vendor->products->take(5) as $product) @endforeach
Name Price Stock Status
{{ $product->name }} ${{ number_format($product->price, 2) }} {{ $product->stock_quantity }} {{ $product->status }}
@endif {{-- Recent Withdrawals --}} @if($vendor->withdrawals && $vendor->withdrawals->count() > 0)

Recent Withdrawals

@foreach($vendor->withdrawals->take(5) as $withdrawal) @endforeach
Amount Status Date
${{ number_format($withdrawal->amount, 2) }} {{ $withdrawal->status }} {{ $withdrawal->created_at->format('M d, Y') }}
@endif
@endsection