@extends('layouts.user') @section('title') Affiliate Vendor Dashboard @endsection @section('content')
{{ auth()->user()->username }}

{{ auth()->user()->email }}

My Vendor Dashboard
@if($vendor->status == 'approved') Add Products Myself Add Products Via Agent @endif
@if($vendor->status == 'pending')
store

Your application is being reviewed!

@elseif($vendor->status == 'approved') @php $awaitingProducts = $vendor->products?->where('status', 0); @endphp

List of products awaiting approval

Once your product request has been sent, it'll move to the list of products to be sent to us, else if declined, will be removed from this list. @if(count($awaitingProducts) > 0) @foreach($awaitingProducts as $product)
  • {{ $product->name }}

    ${{ number_format($product->value, 2) }}
    {{ $product->category }}
    {{--Quantity: --}}

    Pending...
  • @endforeach @else

    You don't have any product pending requests

    @endif @php $pendingProducts = $vendor->products?->whereIn('status', [1, 2]); @endphp @if(count($pendingProducts) > 0)

    List of approved products to send to us

    After you've sent the products kindly click on the "Sent" button for any product you send
    Send your products to the location attached to each of them through any of the courier services recommended @foreach($pendingProducts as $product)
  • {{ $product->name }}

    ${{ number_format($product->value, 2) }}
    {{ $product->category }}

    Drop Off Location: {{ $product?->dropoff }}
    {{--Quantity: --}}

    @if($product->status == 1) @elseif($product->status == 2) Pending... @endif

  • @endforeach @else @endif @php $total = 0; foreach(auth()->user()->products as $o){ $total += $o->value * $o->quantity; } @endphp
    My Products Up For Auction
    (Store Value: ${{ number_format($total, 2) }})
    {{--Note: Any earnings from sales on your product move to your Main Wallet Balance
    --}}
      @forelse(auth()->user()->products as $product)
    • {{ $product?->name }}

      ${{ number_format($product->value * $product->quantity, 2) }}
      {{ $product?->market?->name }}
      Available Quantity: {{ $product->quantity }}

      View Info
      @if($product->quantity - count($product->bids()->where('status', 1)->get()) < 1) Sold Out @else Active @endif
      {{--@if($product->status == 1) @elseif($product->status == 2) Pending... @endif--}}
    • @empty
      store

      You have no approved products in your affiliate store!

      Add Items +
      @endforelse
    @else
    store

    Sorry your application was declined!

    Apply Again
    @endif
    @endsection