Add per-store managers for Woo Business accounts.
Deploy Ladill Woo Manager / deploy (push) Successful in 39s
Deploy Ladill Woo Manager / deploy (push) Successful in 39s
Agencies can invite store-scoped managers via Identity, with access limited to one WooCommerce store while owners retain full multi-store control. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
@endif
|
||||
</div>
|
||||
|
||||
@if($stores->isEmpty())
|
||||
@if($stores->isEmpty() && ($isStoreOwner ?? true))
|
||||
<div class="rounded-2xl border border-indigo-100 bg-indigo-50/60 p-6">
|
||||
<div class="flex flex-wrap items-start justify-between gap-4">
|
||||
<div class="max-w-xl">
|
||||
@@ -50,20 +50,22 @@
|
||||
</p>
|
||||
</div>
|
||||
<div class="flex items-center gap-3">
|
||||
@if($store->status === \App\Models\WooStore::STATUS_ACTIVE)
|
||||
@if(($isStoreOwner ?? true) && $store->status === \App\Models\WooStore::STATUS_ACTIVE)
|
||||
@if($currentStore?->id === $store->id)
|
||||
<span class="rounded-lg bg-indigo-50 px-3 py-1.5 text-xs font-semibold text-indigo-700">Managing now</span>
|
||||
@else
|
||||
@elseif(($wooActiveStores ?? collect())->count() > 1)
|
||||
<form method="post" action="{{ route('woo.stores.switch') }}">
|
||||
@csrf
|
||||
<input type="hidden" name="store" value="{{ $store->id }}">
|
||||
<button type="submit" class="rounded-lg border border-slate-200 px-3 py-1.5 text-xs font-semibold text-slate-700 hover:bg-slate-50">Switch to this store</button>
|
||||
</form>
|
||||
@endif
|
||||
@if($isStoreOwner ?? true)
|
||||
<form method="post" action="{{ route('woo.stores.destroy', $store) }}" onsubmit="return confirm('Disconnect this store?')">
|
||||
@csrf @method('delete')
|
||||
<button type="submit" class="rounded-lg border border-red-200 px-3 py-1.5 text-xs font-semibold text-red-600 hover:bg-red-50">Disconnect</button>
|
||||
</form>
|
||||
@endif
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user