@extends('layouts.app') @section('title', 'Supplier Dashboard') @section('content')

Supplier Dashboard

Welcome back, {{ $supplier->company_name }}

+ Add New Product

Total Products

{{ $stats['total_products'] }}

📦

Total Orders

{{ $stats['total_orders'] }}

🛒

Pending Orders

{{ $stats['pending_orders'] }}

Total Revenue

R {{ number_format($stats['total_revenue'], 0) }}

💰

Recent Orders

View All
@if($recentOrders->count() > 0)
@foreach($recentOrders as $order)

{{ $order->order->order_number }}

{{ $order->order->user->name }}

{{ $order->created_at->format('d M Y, H:i') }}

R {{ number_format($order->total_price, 2) }}

@php $statusColors = [ 'pending' => 'bg-yellow-100 text-yellow-800', 'confirmed' => 'bg-blue-100 text-blue-800', 'shipped' => 'bg-indigo-100 text-indigo-800', 'delivered' => 'bg-green-100 text-green-800', ]; @endphp {{ ucfirst($order->order->status) }}
@endforeach
@else

No orders yet

@endif

Account Status

Status {{ $supplier->is_active ? 'Active' : 'Inactive' }}
Commission Rate {{ $supplier->commission_rate }}%
Member Since {{ $supplier->created_at->format('M Y') }}
@endsection