@extends('layouts.admin') @section('title', 'Edit Vendor') @section('content')
{{-- Header --}}

Edit Vendor

Manage {{ $vendor->name }}'s store details and settings

Back to Vendors @php $statusClass = match($vendor->status) { 'approved' => 'bg-emerald-100 text-emerald-700', 'pending' => 'bg-amber-100 text-amber-700', 'suspended' => 'bg-red-100 text-red-700', 'rejected' => 'bg-gray-100 text-gray-700', default => 'bg-gray-100 text-gray-700', }; @endphp {{ ucfirst($vendor->status) }}
{{-- Main Form --}}
{{-- Tabs --}}
@csrf @method('PUT') {{-- Tab: Store Info --}}

This is the public name of the vendor's store

{{-- Tab: Contact & Location --}}
{{-- Tab: Business Settings --}}

Platform commission on each sale

@if($vendor->user)

Linked Account

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

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

{{ $vendor->user->email }}

@endif

Financial Summary

{{ price($vendor->total_sales) }}

Total Sales

{{ price($vendor->total_earnings) }}

Earnings

{{ price($vendor->balance) }}

Balance

{{-- Tab: Social & Branding --}}
@php $socialLinks = is_array($vendor->social_links) ? $vendor->social_links : (json_decode($vendor->social_links ?? '[]', true) ?: []); @endphp
{{-- Footer Actions --}}
Cancel
{{-- Sidebar --}}
{{-- Vendor Info --}}

Vendor Information

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

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

{{ $vendor->user->email }}

@endif
Products {{ $vendor->products->count() ?? 0 }}
Commission {{ $vendor->commission_rate }}%
Joined {{ $vendor->created_at->format('M d, Y') }}
@if($vendor->approved_at)
Approved {{ $vendor->approved_at->format('M d, Y') }}
@endif
{{-- Quick Actions --}}
@push('scripts') @endpush @endsection