Add Events-style heroes to Storefronts and Products index pages.
Deploy Ladill Merchant / deploy (push) Successful in 42s
Deploy Ladill Merchant / deploy (push) Successful in 42s
Surface wallet balance and key counts in gradient hero sections so Merchant list pages match the Events pattern. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -4,6 +4,7 @@ namespace App\Http\Controllers\Merchant;
|
|||||||
|
|
||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
use App\Services\Crm\CrmClient;
|
use App\Services\Crm\CrmClient;
|
||||||
|
use App\Services\Qr\QrCodeManagerService;
|
||||||
use Illuminate\Http\RedirectResponse;
|
use Illuminate\Http\RedirectResponse;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Illuminate\View\View;
|
use Illuminate\View\View;
|
||||||
@@ -14,6 +15,8 @@ use Illuminate\View\View;
|
|||||||
*/
|
*/
|
||||||
class ProductController extends Controller
|
class ProductController extends Controller
|
||||||
{
|
{
|
||||||
|
public function __construct(private QrCodeManagerService $manager) {}
|
||||||
|
|
||||||
private function crm(): CrmClient
|
private function crm(): CrmClient
|
||||||
{
|
{
|
||||||
return CrmClient::for((string) ladill_account()->public_id);
|
return CrmClient::for((string) ladill_account()->public_id);
|
||||||
@@ -29,9 +32,15 @@ class ProductController extends Controller
|
|||||||
'search' => $search !== '' ? $search : null,
|
'search' => $search !== '' ? $search : null,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
$products = (array) ($response['data'] ?? []);
|
||||||
|
$wallet = $this->manager->walletFor(ladill_account());
|
||||||
|
|
||||||
return view('merchant.products.index', [
|
return view('merchant.products.index', [
|
||||||
'products' => (array) ($response['data'] ?? []),
|
'products' => $products,
|
||||||
'search' => $search,
|
'search' => $search,
|
||||||
|
'wallet' => $wallet,
|
||||||
|
'productCount' => count($products),
|
||||||
|
'activeCount' => collect($products)->filter(fn ($p) => ($p['active'] ?? true))->count(),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ namespace App\Http\Controllers\Merchant;
|
|||||||
|
|
||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
use App\Models\QrCode;
|
use App\Models\QrCode;
|
||||||
|
use App\Models\QrWallet;
|
||||||
use App\Services\Crm\CrmClient;
|
use App\Services\Crm\CrmClient;
|
||||||
use App\Services\Qr\QrCodeManagerService;
|
use App\Services\Qr\QrCodeManagerService;
|
||||||
use App\Services\Qr\QrImageGeneratorService;
|
use App\Services\Qr\QrImageGeneratorService;
|
||||||
@@ -39,9 +40,15 @@ class StorefrontController extends Controller
|
|||||||
return [$qr->id => $this->imageGenerator->previewDataUri($qr)];
|
return [$qr->id => $this->imageGenerator->previewDataUri($qr)];
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$wallet = $this->manager->walletFor($account);
|
||||||
|
|
||||||
return view('merchant.storefronts.index', [
|
return view('merchant.storefronts.index', [
|
||||||
'qrCodes' => $qrCodes,
|
'qrCodes' => $qrCodes,
|
||||||
'previewDataUris' => $previewDataUris,
|
'previewDataUris' => $previewDataUris,
|
||||||
|
'wallet' => $wallet,
|
||||||
|
'activeCount' => $qrCodes->where('is_active', true)->count(),
|
||||||
|
'pricePerQr' => QrWallet::pricePerQr(),
|
||||||
|
'topupUrl' => 'https://'.config('app.account_domain').'/wallet',
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,75 +1,114 @@
|
|||||||
<x-user-layout>
|
<x-user-layout>
|
||||||
<x-slot name="title">Products</x-slot>
|
<x-slot name="title">Products</x-slot>
|
||||||
|
|
||||||
<div class="space-y-6">
|
<div class="space-y-6">
|
||||||
<div class="flex flex-wrap items-center justify-between gap-3">
|
@foreach(['success', 'error'] as $flash)
|
||||||
<div>
|
@if(session($flash))
|
||||||
<h1 class="text-xl font-semibold text-slate-900">Products</h1>
|
<div class="rounded-lg border px-4 py-3 {{ $flash === 'success' ? 'border-emerald-200 bg-emerald-50 text-emerald-700' : 'border-red-200 bg-red-50 text-red-700' }}">
|
||||||
<p class="mt-1 text-sm text-slate-500">Your product catalog, synced with Ladill CRM. Use these on any storefront.</p>
|
<p class="text-sm">{{ session($flash) }}</p>
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
@endforeach
|
||||||
|
|
||||||
|
<div class="relative overflow-hidden rounded-2xl border border-slate-200 bg-white">
|
||||||
|
<div class="absolute inset-0 bg-gradient-to-br from-violet-50/80 via-white to-indigo-50/60"></div>
|
||||||
|
<div class="relative px-6 py-8 sm:px-10">
|
||||||
|
<div class="flex flex-col gap-6 lg:flex-row lg:items-center lg:justify-between">
|
||||||
|
<div class="max-w-xl">
|
||||||
|
<div class="inline-flex items-center gap-1.5 rounded-full bg-violet-100 px-3 py-1 text-xs font-semibold text-violet-700">
|
||||||
|
Catalog · Pricing · Inventory-ready
|
||||||
|
</div>
|
||||||
|
<h1 class="mt-3 text-2xl font-bold tracking-tight text-slate-900 sm:text-3xl">Your products</h1>
|
||||||
|
<p class="mt-2 text-sm leading-6 text-slate-600">
|
||||||
|
Manage your product catalog in Ladill CRM and use items across any storefront.
|
||||||
|
</p>
|
||||||
|
<div class="mt-6">
|
||||||
|
<a href="{{ route('merchant.products.create') }}" class="btn-primary">
|
||||||
|
<svg class="h-4 w-4" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M12 4.5v15m7.5-7.5h-15"/></svg>
|
||||||
|
New product
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="scrollbar-hide flex snap-x snap-mandatory gap-3 overflow-x-auto pb-2 sm:grid sm:grid-cols-3 sm:overflow-visible sm:pb-0 lg:gap-4" style="-ms-overflow-style:none;scrollbar-width:none;">
|
||||||
|
<div class="mobile-stats-card shrink-0 snap-start rounded-xl border border-slate-200 bg-white/90 px-4 py-3 text-center backdrop-blur-sm">
|
||||||
|
<p class="whitespace-nowrap text-xl font-bold text-slate-900 sm:text-2xl">GHS {{ number_format($wallet->spendableBalance(), 2) }}</p>
|
||||||
|
<p class="mt-0.5 whitespace-nowrap text-[11px] font-medium text-slate-500">Account balance</p>
|
||||||
|
</div>
|
||||||
|
<div class="mobile-stats-card shrink-0 snap-start rounded-xl border border-slate-200 bg-white/90 px-4 py-3 text-center backdrop-blur-sm">
|
||||||
|
<p class="whitespace-nowrap text-xl font-bold text-slate-900 sm:text-2xl">{{ number_format($productCount) }}</p>
|
||||||
|
<p class="mt-0.5 whitespace-nowrap text-[11px] font-medium text-slate-500">Products</p>
|
||||||
|
</div>
|
||||||
|
<div class="mobile-stats-card shrink-0 snap-start rounded-xl border border-slate-200 bg-white/90 px-4 py-3 text-center backdrop-blur-sm">
|
||||||
|
<p class="whitespace-nowrap text-xl font-bold text-slate-900 sm:text-2xl">{{ number_format($activeCount) }}</p>
|
||||||
|
<p class="mt-0.5 whitespace-nowrap text-[11px] font-medium text-slate-500">Active</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<x-btn.create :href="route('merchant.products.create')">New product</x-btn.create>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@if(session('success'))
|
<div class="rounded-2xl border border-slate-200 bg-white overflow-hidden">
|
||||||
<div class="rounded-xl border border-emerald-100 bg-emerald-50 px-4 py-3 text-sm text-emerald-700">{{ session('success') }}</div>
|
<div class="flex flex-col gap-3 border-b border-slate-100 px-6 py-4 sm:flex-row sm:items-center sm:justify-between">
|
||||||
@endif
|
<h2 class="text-sm font-semibold text-slate-900">Your products</h2>
|
||||||
|
<form method="get" class="flex w-full max-w-sm items-center gap-2 sm:w-auto">
|
||||||
<form method="get" class="flex max-w-sm items-center gap-2">
|
<input type="search" name="search" value="{{ $search }}" placeholder="Search products…"
|
||||||
<input type="search" name="search" value="{{ $search }}" placeholder="Search products…"
|
class="w-full rounded-xl border-slate-200 text-sm focus:border-indigo-500 focus:ring-indigo-500">
|
||||||
class="w-full rounded-xl border-slate-200 text-sm focus:border-indigo-500 focus:ring-indigo-500">
|
<button class="shrink-0 rounded-xl border border-slate-200 px-3 py-2 text-sm font-medium text-slate-600 hover:bg-slate-50">Search</button>
|
||||||
<button class="rounded-xl border border-slate-200 px-3 py-2 text-sm font-medium text-slate-600 hover:bg-slate-50">Search</button>
|
</form>
|
||||||
</form>
|
|
||||||
|
|
||||||
@if(empty($products))
|
|
||||||
<div class="rounded-2xl border border-dashed border-slate-200 bg-white px-6 py-12 text-center">
|
|
||||||
<p class="text-sm text-slate-500">{{ $search !== '' ? 'No products match your search.' : 'No products yet.' }}</p>
|
|
||||||
<a href="{{ route('merchant.products.create') }}" class="mt-3 inline-block text-sm font-semibold text-indigo-600 hover:text-indigo-800">Add your first product</a>
|
|
||||||
</div>
|
</div>
|
||||||
@else
|
|
||||||
<div class="overflow-hidden rounded-2xl border border-slate-200 bg-white">
|
@if(empty($products))
|
||||||
<table class="min-w-full divide-y divide-slate-100 text-sm">
|
<p class="px-6 py-10 text-center text-sm text-slate-500">
|
||||||
<thead class="bg-slate-50 text-left text-xs font-semibold uppercase tracking-wide text-slate-500">
|
{{ $search !== '' ? 'No products match your search.' : 'No products yet. Add your first product to get started.' }}
|
||||||
<tr>
|
</p>
|
||||||
<th class="px-4 py-3">Product</th>
|
@else
|
||||||
<th class="px-4 py-3">SKU</th>
|
<div class="overflow-x-auto">
|
||||||
<th class="px-4 py-3 text-right">Price</th>
|
<table class="min-w-full divide-y divide-slate-100 text-sm">
|
||||||
<th class="px-4 py-3">Status</th>
|
<thead class="bg-slate-50 text-left text-xs font-semibold uppercase tracking-wide text-slate-500">
|
||||||
<th class="px-4 py-3"></th>
|
<tr>
|
||||||
</tr>
|
<th class="px-4 py-3">Product</th>
|
||||||
</thead>
|
<th class="px-4 py-3">SKU</th>
|
||||||
<tbody class="divide-y divide-slate-100">
|
<th class="px-4 py-3 text-right">Price</th>
|
||||||
@foreach($products as $p)
|
<th class="px-4 py-3">Status</th>
|
||||||
<tr class="hover:bg-slate-50/60">
|
<th class="px-4 py-3"></th>
|
||||||
<td class="px-4 py-3">
|
|
||||||
<p class="font-medium text-slate-900">{{ $p['name'] ?? '—' }}</p>
|
|
||||||
@if(!empty($p['description']))
|
|
||||||
<p class="mt-0.5 truncate text-xs text-slate-400">{{ \Illuminate\Support\Str::limit($p['description'], 60) }}</p>
|
|
||||||
@endif
|
|
||||||
</td>
|
|
||||||
<td class="px-4 py-3 text-slate-500">{{ $p['sku'] ?: '—' }}</td>
|
|
||||||
<td class="px-4 py-3 text-right font-medium text-slate-900">
|
|
||||||
{{ strtoupper($p['currency'] ?? 'GHS') }} {{ number_format(((int) ($p['unit_price_minor'] ?? 0)) / 100, 2) }}
|
|
||||||
</td>
|
|
||||||
<td class="px-4 py-3">
|
|
||||||
<span class="inline-flex rounded-full px-2 py-0.5 text-xs font-medium {{ ($p['active'] ?? true) ? 'bg-emerald-50 text-emerald-700' : 'bg-slate-100 text-slate-500' }}">
|
|
||||||
{{ ($p['active'] ?? true) ? 'Active' : 'Inactive' }}
|
|
||||||
</span>
|
|
||||||
</td>
|
|
||||||
<td class="px-4 py-3 text-right">
|
|
||||||
<div class="flex items-center justify-end gap-3">
|
|
||||||
<a href="{{ route('merchant.products.edit', $p['id']) }}" class="text-sm font-medium text-indigo-600 hover:text-indigo-800">Edit</a>
|
|
||||||
<form method="post" action="{{ route('merchant.products.destroy', $p['id']) }}"
|
|
||||||
onsubmit="return confirm('Delete this product?');">
|
|
||||||
@csrf
|
|
||||||
@method('DELETE')
|
|
||||||
<button class="text-sm font-medium text-red-500 hover:text-red-700">Delete</button>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
@endforeach
|
</thead>
|
||||||
</tbody>
|
<tbody class="divide-y divide-slate-100">
|
||||||
</table>
|
@foreach($products as $p)
|
||||||
</div>
|
<tr class="hover:bg-slate-50/60">
|
||||||
@endif
|
<td class="px-4 py-3">
|
||||||
|
<p class="font-medium text-slate-900">{{ $p['name'] ?? '—' }}</p>
|
||||||
|
@if(!empty($p['description']))
|
||||||
|
<p class="mt-0.5 truncate text-xs text-slate-400">{{ \Illuminate\Support\Str::limit($p['description'], 60) }}</p>
|
||||||
|
@endif
|
||||||
|
</td>
|
||||||
|
<td class="px-4 py-3 text-slate-500">{{ $p['sku'] ?: '—' }}</td>
|
||||||
|
<td class="px-4 py-3 text-right font-medium text-slate-900">
|
||||||
|
{{ strtoupper($p['currency'] ?? 'GHS') }} {{ number_format(((int) ($p['unit_price_minor'] ?? 0)) / 100, 2) }}
|
||||||
|
</td>
|
||||||
|
<td class="px-4 py-3">
|
||||||
|
<span class="inline-flex rounded-full px-2 py-0.5 text-xs font-medium {{ ($p['active'] ?? true) ? 'bg-emerald-50 text-emerald-700' : 'bg-slate-100 text-slate-500' }}">
|
||||||
|
{{ ($p['active'] ?? true) ? 'Active' : 'Inactive' }}
|
||||||
|
</span>
|
||||||
|
</td>
|
||||||
|
<td class="px-4 py-3 text-right">
|
||||||
|
<div class="flex items-center justify-end gap-3">
|
||||||
|
<a href="{{ route('merchant.products.edit', $p['id']) }}" class="text-sm font-medium text-indigo-600 hover:text-indigo-800">Edit</a>
|
||||||
|
<form method="post" action="{{ route('merchant.products.destroy', $p['id']) }}"
|
||||||
|
onsubmit="return confirm('Delete this product?');">
|
||||||
|
@csrf
|
||||||
|
@method('DELETE')
|
||||||
|
<button class="text-sm font-medium text-red-500 hover:text-red-700">Delete</button>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
@endforeach
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</x-user-layout>
|
</x-user-layout>
|
||||||
|
|||||||
@@ -1,35 +1,89 @@
|
|||||||
<x-user-layout>
|
<x-user-layout>
|
||||||
<x-slot name="title">Storefronts</x-slot>
|
<x-slot name="title">Storefronts</x-slot>
|
||||||
<div class="space-y-6">
|
|
||||||
<div class="flex flex-wrap items-center justify-between gap-3">
|
<div class="space-y-6"
|
||||||
<div>
|
x-data="balanceGate({
|
||||||
<h1 class="text-xl font-semibold text-slate-900">Storefronts</h1>
|
balance: @js((float) $wallet->spendableBalance()),
|
||||||
<p class="mt-1 text-sm text-slate-500">Shop, menu & booking QR storefronts with online checkout.</p>
|
price: @js((float) $pricePerQr),
|
||||||
</div>
|
topupUrl: @js($topupUrl),
|
||||||
<x-btn.create :href="route('merchant.storefronts.create', ['type' => 'shop'])">New storefront</x-btn.create>
|
href: @js(route('merchant.storefronts.create', ['type' => 'shop'])),
|
||||||
</div>
|
})">
|
||||||
@if($qrCodes->isEmpty())
|
@foreach(['success', 'error'] as $flash)
|
||||||
<div class="rounded-2xl border border-dashed border-slate-200 bg-white px-6 py-12 text-center">
|
@if(session($flash))
|
||||||
<p class="text-sm text-slate-500">No storefronts yet.</p>
|
<div class="rounded-lg border px-4 py-3 {{ $flash === 'success' ? 'border-emerald-200 bg-emerald-50 text-emerald-700' : 'border-red-200 bg-red-50 text-red-700' }}">
|
||||||
<a href="{{ route('merchant.storefronts.create', ['type' => 'shop']) }}" class="mt-3 inline-block text-sm font-semibold text-indigo-600 hover:text-indigo-800">Create your first storefront</a>
|
<p class="text-sm">{{ session($flash) }}</p>
|
||||||
</div>
|
</div>
|
||||||
@else
|
@endif
|
||||||
<div class="grid gap-4 sm:grid-cols-2 xl:grid-cols-3">
|
@endforeach
|
||||||
@foreach($qrCodes as $qr)
|
|
||||||
<a href="{{ route('merchant.storefronts.show', $qr) }}" class="rounded-2xl border border-slate-200 bg-white p-5 transition hover:border-indigo-200 hover:shadow-sm">
|
<div class="relative overflow-hidden rounded-2xl border border-slate-200 bg-white">
|
||||||
<div class="flex items-start gap-4">
|
<div class="absolute inset-0 bg-gradient-to-br from-violet-50/80 via-white to-indigo-50/60"></div>
|
||||||
@if(!empty($previewDataUris[$qr->id]))
|
<div class="relative px-6 py-8 sm:px-10">
|
||||||
<img src="{{ $previewDataUris[$qr->id] }}" alt="" class="h-16 w-16 rounded-lg border border-slate-100 bg-white p-1">
|
<div class="flex flex-col gap-6 lg:flex-row lg:items-center lg:justify-between">
|
||||||
@endif
|
<div class="max-w-xl">
|
||||||
<div class="min-w-0 flex-1">
|
<div class="inline-flex items-center gap-1.5 rounded-full bg-violet-100 px-3 py-1 text-xs font-semibold text-violet-700">
|
||||||
<p class="truncate font-semibold text-slate-900">{{ $qr->label }}</p>
|
Shop · Menu · Booking · Online checkout
|
||||||
<p class="mt-0.5 truncate text-sm text-slate-500">{{ $qr->content()['name'] ?? 'Organisation' }}</p>
|
|
||||||
<p class="mt-2 truncate text-xs text-slate-400">{{ $qr->is_active ? 'Active' : 'Inactive' }} · {{ $qr->publicUrl() }}</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</a>
|
<h1 class="mt-3 text-2xl font-bold tracking-tight text-slate-900 sm:text-3xl">Your storefronts</h1>
|
||||||
@endforeach
|
<p class="mt-2 text-sm leading-6 text-slate-600">
|
||||||
|
Create QR storefronts for shops, menus, and bookings. Share a Ladill Link and take orders online.
|
||||||
|
</p>
|
||||||
|
<div class="mt-6">
|
||||||
|
<button type="button"
|
||||||
|
@click="goOrTopup($event)"
|
||||||
|
class="btn-primary">
|
||||||
|
<svg class="h-4 w-4" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M12 4.5v15m7.5-7.5h-15"/></svg>
|
||||||
|
New storefront
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="scrollbar-hide flex snap-x snap-mandatory gap-3 overflow-x-auto pb-2 sm:grid sm:grid-cols-3 sm:overflow-visible sm:pb-0 lg:gap-4" style="-ms-overflow-style:none;scrollbar-width:none;">
|
||||||
|
<div class="mobile-stats-card shrink-0 snap-start rounded-xl border border-slate-200 bg-white/90 px-4 py-3 text-center backdrop-blur-sm">
|
||||||
|
<p class="whitespace-nowrap text-xl font-bold text-slate-900 sm:text-2xl">GHS {{ number_format($wallet->spendableBalance(), 2) }}</p>
|
||||||
|
<p class="mt-0.5 whitespace-nowrap text-[11px] font-medium text-slate-500">Account balance</p>
|
||||||
|
</div>
|
||||||
|
<div class="mobile-stats-card shrink-0 snap-start rounded-xl border border-slate-200 bg-white/90 px-4 py-3 text-center backdrop-blur-sm">
|
||||||
|
<p class="whitespace-nowrap text-xl font-bold text-slate-900 sm:text-2xl">{{ $qrCodes->count() }}</p>
|
||||||
|
<p class="mt-0.5 whitespace-nowrap text-[11px] font-medium text-slate-500">Storefronts</p>
|
||||||
|
</div>
|
||||||
|
<div class="mobile-stats-card shrink-0 snap-start rounded-xl border border-slate-200 bg-white/90 px-4 py-3 text-center backdrop-blur-sm">
|
||||||
|
<p class="whitespace-nowrap text-xl font-bold text-slate-900 sm:text-2xl">{{ number_format($activeCount) }}</p>
|
||||||
|
<p class="mt-0.5 whitespace-nowrap text-[11px] font-medium text-slate-500">Active</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@endif
|
</div>
|
||||||
|
|
||||||
|
<div class="rounded-2xl border border-slate-200 bg-white overflow-hidden">
|
||||||
|
<div class="border-b border-slate-100 px-6 py-4">
|
||||||
|
<h2 class="text-sm font-semibold text-slate-900">Your storefronts</h2>
|
||||||
|
</div>
|
||||||
|
@if($qrCodes->isEmpty())
|
||||||
|
<p class="px-6 py-10 text-center text-sm text-slate-500">No storefronts yet. Create your first storefront to get started.</p>
|
||||||
|
@else
|
||||||
|
<div class="grid gap-4 p-6 sm:grid-cols-2 xl:grid-cols-3">
|
||||||
|
@foreach($qrCodes as $qr)
|
||||||
|
<a href="{{ route('merchant.storefronts.show', $qr) }}" class="rounded-2xl border border-slate-200 bg-white p-5 transition hover:border-indigo-200 hover:shadow-sm">
|
||||||
|
<div class="flex items-start gap-4">
|
||||||
|
@if(!empty($previewDataUris[$qr->id]))
|
||||||
|
<img src="{{ $previewDataUris[$qr->id] }}" alt="" class="h-16 w-16 rounded-lg border border-slate-100 bg-white p-1">
|
||||||
|
@else
|
||||||
|
<div class="flex h-16 w-16 shrink-0 items-center justify-center rounded-lg {{ $qr->is_active ? 'bg-violet-100' : 'bg-slate-100 opacity-50' }}">
|
||||||
|
<img src="{{ asset('images/ladill-icons/storefront.svg') }}?v={{ @filemtime(public_path('images/ladill-icons/storefront.svg')) ?: '1' }}" alt="" class="h-8 w-8 object-contain" width="32" height="32">
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
<div class="min-w-0 flex-1">
|
||||||
|
<p class="truncate font-semibold text-slate-900">{{ $qr->label }}</p>
|
||||||
|
<p class="mt-0.5 truncate text-sm text-slate-500">{{ $qr->content()['name'] ?? 'Organisation' }}</p>
|
||||||
|
<p class="mt-2 truncate text-xs text-slate-400">{{ $qr->is_active ? 'Active' : 'Inactive' }} · {{ $qr->publicUrl() }}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
@endforeach
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</x-user-layout>
|
</x-user-layout>
|
||||||
|
|||||||
Reference in New Issue
Block a user