@extends('layouts.app') @section('title', 'Vendor Dashboard - Gletra') @php $isShopOwner = auth()->user()->hasAccountRole('vendor'); $pendingOrders = (int) $stats['pending_orders']; $stockAlerts = (int) $stats['stock_alerts']; @endphp @section('content')
@include('vendor.partials.sidebar-column')
{{-- Header --}}

{{ $vendor->shop_name }}

@php $badge = $stats['verification_badge'] ?? ['label' => 'Basic Vendor', 'class' => 'bg-secondary', 'icon' => 'bi-shop']; @endphp {{ $badge['label'] }} {{ $stats['trust_tier_label'] ?? 'Bronze Seller' }}

Seller dashboard — quick actions neeche se shuru karein

{{ $vendor->shop_name }}
@include('vendor.partials.verification-cards') {{-- Quick actions --}} {{-- Urgent alerts --}} @if($pendingOrders > 0 || $stockAlerts > 0 || !$vendor->is_approved) @endif @if($isShopOwner) @include('vendor.partials.dashboard-analytics') @else
Today Orders {{ $stats['today_orders'] }}
Total Products {{ $stats['total_products'] }}
@endif @if(isset($topProducts) && $topProducts->count())
Top Selling Products
@foreach($topProducts as $item)
{{ $item->product->name ?? 'Product #'.$item->product_id }} {{ $item->sold_count }} sold
@endforeach
@endif @if(isset($recentOrders) && $recentOrders->count()) @endif
{{-- Right: live activity --}}
Live Activity
Live
@if($isShopOwner)
Wallet Balance ₹{{ number_format($stats['balance'], 2) }}
Withdraw
@endif
Tip

Clear product photos se sales 25% tak badh sakti hain.

{{-- New Orders Highlight Popup --}} @include('vendor.partials.support-modal') @php $initialPopupOrders = ($pendingPopupOrders ?? collect())->map(fn ($order) => [ 'id' => $order->id, 'order_number' => $order->order_number, 'created_at_iso' => $order->created_at?->toIso8601String(), 'created_at_human' => $order->created_at->diffForHumans(), 'customer_name' => $order->user?->name ?? 'Customer', 'items_count' => $order->orderItems->count(), 'total' => (float) ($order->total ?? 0), 'accept_url' => route('vendor.orders.accept', $order->id), 'cancel_url' => route('vendor.orders.cancel', $order->id), ])->values(); @endphp @push('scripts') @include('vendor.partials.setup-wizard') @endpush @endsection