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

{{ auth()->user()->isAdmin() ? 'WooCommerce Stores' : 'My Stores' }}

@if(!auth()->user()->isManager()) Add New Store @endif
@if($stores->count() > 0)
@foreach($stores as $store) @endforeach
Store Name URL Status Total Orders Last Sync Actions
{{ $store->name }}
{{ $store->url }}
@if($store->is_active) Active @else Inactive @endif @if($store->webhooks_enabled) 🔄 Webhooks @endif
{{ $store->orders_count ?? 0 }} {{ $store->last_sync ? $store->last_sync->diffForHumans() : 'Never' }}
@csrf
@if($store->webhooks_enabled)
@csrf
@else
@csrf
@endif
@csrf @method('DELETE')
@if($stores->hasPages())
{{ $stores->links() }}
@endif
@else

No stores configured

@if(auth()->user()->isManager())

You can view stores from your assigned sellers.

@else

Get started by adding your first WooCommerce store.

@endif
@endif
@endsection