@extends('layouts.app') @section('title', 'B2B Portal Dashboard') @section('content') @include('b2bportal::partials.admin_style')

B2B Portal Dashboard

Monitor wholesale orders, customers, product readiness, and your live store link.

@include('b2bportal::admin.nav')
B2B Orders
{{ $stats['orders'] }}
Orders from portal
B2B Revenue
{{ number_format($stats['revenue'], 2) }}
Total order value
Customers
{{ $stats['customers'] }}
{{ $stats['pending_customers'] }} pending approval
Products
{{ $stats['products'] }}
{{ $stats['price_groups'] }} active price groups

Portal Status

{{ $settings->is_active ? 'Store is live' : 'Store is inactive' }}

MOQ: {{ $settings->portal_moq }} pcs

Default Location: {{ $settings->default_location_id ?: 'Not set' }}

Default Price Group: {{ $settings->default_price_group_id ?: 'Not set' }}

Payments: {{ collect($settings->enabled_payment_methods ?: ['cod'])->map(fn($method) => ucwords(str_replace('_', ' ', $method)))->join(', ') }}

Weight Shipping: {{ $settings->shipping_enabled ? 'Enabled' : 'Disabled' }}

Open

Recent Customers

@if($recentCustomers->count()) @foreach($recentCustomers as $customer) @endforeach
{{ $customer->name ?: $customer->phone }}
{{ $customer->business_name ?: 'No business name' }}
{{ ucfirst($customer->status) }}
@else
No customers yet.
@endif

Recent B2B Orders

@if($recentOrders->count()) @foreach($recentOrders as $order) @endforeach
Invoice Customer Date Total Payment Shipping Status
{{ $order->invoice_no }} {{ optional($order->contact)->name ?: 'Guest' }} {{ @format_datetime($order->transaction_date) }} {{ number_format($order->final_total, 2) }} {{ $order->shipping_custom_field_2 ?: ucwords(str_replace('_', ' ', $order->prefer_payment_method ?: 'Not selected')) }} @if($order->shipping_custom_field_3)
UTR: {{ $order->shipping_custom_field_3 }}@endif @if($order->document)
View proof@endif
{{ number_format($order->shipping_charges, 2) }}@if($order->shipping_custom_field_1)
{{ $order->shipping_custom_field_1 }}@endif
{{ ucfirst($order->payment_status ?: 'due') }}
@else
No B2B orders yet. Open the store and place a demo order.
@endif
@endsection @section('javascript') @endsection