Files
ladill-pos/resources/views/pos/dashboard.blade.php
T
isaaccladandCursor 88e1c28aac
Deploy Ladill POS / deploy (push) Successful in 1m0s
Add dashboard upgrade banner for free POS plans.
Highlight Pro and Business plans on the register overview for merchants on the free tier.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-30 18:13:22 +00:00

58 lines
3.2 KiB
PHP

<x-app-layout title="Overview">
<div class="space-y-6">
<div class="flex items-center justify-between gap-3">
<div class="min-w-0 flex-1">
<h1 class="truncate text-lg font-semibold text-slate-900">Overview</h1>
<p class="mt-1 hidden text-sm text-slate-500 sm:block">Today's register takings and recent sales.</p>
</div>
@include('partials.mobile-header-btn', [
'href' => route('pos.register'),
'label' => 'Open register',
'variant' => 'primary',
])
</div>
@include('partials.upgrade-banner')
<div class="grid gap-4 sm:grid-cols-2 lg:grid-cols-4">
<div class="rounded-2xl border border-slate-200 bg-white p-5">
<p class="text-xs font-medium uppercase tracking-wide text-slate-400">Today's sales</p>
<p class="mt-1.5 text-2xl font-semibold text-slate-900">{{ pos_money($stats['today_total_minor']) }}</p>
</div>
<div class="rounded-2xl border border-slate-200 bg-white p-5">
<p class="text-xs font-medium uppercase tracking-wide text-slate-400">Transactions</p>
<p class="mt-1.5 text-2xl font-semibold text-slate-900">{{ number_format($stats['today_count']) }}</p>
</div>
<div class="rounded-2xl border border-slate-200 bg-white p-5">
<p class="text-xs font-medium uppercase tracking-wide text-slate-400">Active products</p>
<p class="mt-1.5 text-2xl font-semibold text-slate-900">{{ number_format($stats['product_count']) }}</p>
</div>
<div class="rounded-2xl border border-slate-200 bg-white p-5">
<p class="text-xs font-medium uppercase tracking-wide text-slate-400">Pending checkouts</p>
<p class="mt-1.5 text-2xl font-semibold text-slate-900">{{ number_format($stats['open_pending']) }}</p>
</div>
</div>
<div class="rounded-2xl border border-slate-200 bg-white">
<div class="border-b border-slate-100 px-6 py-4">
<h2 class="font-semibold text-slate-900">Recent sales</h2>
</div>
<ul class="divide-y divide-slate-100">
@forelse ($recentSales as $sale)
<li>
<a href="{{ route('pos.sales.show', $sale) }}" class="flex items-center justify-between px-6 py-4 hover:bg-slate-50">
<div>
<p class="text-sm font-medium text-slate-900">{{ $sale->reference }}</p>
<p class="text-xs text-slate-500">{{ $sale->created_at->format('M j, g:i A') }} · {{ ucfirst($sale->payment_method) }}</p>
</div>
<span class="text-sm font-semibold text-slate-800">{{ pos_money($sale->total_minor, $sale->currency) }}</span>
</a>
</li>
@empty
<li class="px-6 py-8 text-center text-sm text-slate-500">No sales yet. <a href="{{ route('pos.register') }}" class="text-indigo-600">Take your first sale</a>.</li>
@endforelse
</ul>
</div>
</div>
</x-app-layout>