Add POS Pro subscription billing and free-tier limits.
Deploy Ladill POS / deploy (push) Successful in 43s
Deploy Ladill POS / deploy (push) Successful in 43s
Wallet-backed Pro unlocks unlimited products, restaurant mode, catalog imports, and ecosystem sync features. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -45,5 +45,18 @@
|
||||
</svg>
|
||||
<span class="flex-1 truncate">Settings</span>
|
||||
</a>
|
||||
|
||||
@php $proActive = request()->routeIs('pos.pro.*'); @endphp
|
||||
@if(!empty($isPro))
|
||||
<a href="{{ route('pos.pro.index') }}" class="group mt-0.5 flex items-center gap-3 rounded-lg px-3 py-2 text-[13px] transition {{ $proActive ? 'bg-indigo-50 text-indigo-700 font-semibold' : 'text-slate-600 hover:bg-slate-50 hover:text-slate-900' }}">
|
||||
<svg class="h-[18px] w-[18px] shrink-0 text-amber-500" viewBox="0 0 24 24" fill="currentColor"><path d="M12 2.25c.3 0 .58.18.7.46l2.36 5.5 5.96.5a.75.75 0 0 1 .43 1.31l-4.53 3.9 1.36 5.83a.75.75 0 0 1-1.12.81L12 17.77l-5.16 3a.75.75 0 0 1-1.12-.81l1.36-5.83-4.53-3.9a.75.75 0 0 1 .43-1.31l5.96-.5 2.36-5.5c.12-.28.4-.46.7-.46Z"/></svg>
|
||||
<span>POS Pro</span>
|
||||
</a>
|
||||
@else
|
||||
<a href="{{ route('pos.pro.index') }}" class="group mt-0.5 flex items-center gap-3 rounded-lg bg-gradient-to-r from-indigo-600 to-emerald-500 px-3 py-2 text-[13px] font-semibold text-white shadow-sm transition hover:opacity-95">
|
||||
<svg class="h-[18px] w-[18px] shrink-0" viewBox="0 0 24 24" fill="currentColor"><path d="M12 2.25c.3 0 .58.18.7.46l2.36 5.5 5.96.5a.75.75 0 0 1 .43 1.31l-4.53 3.9 1.36 5.83a.75.75 0 0 1-1.12.81L12 17.77l-5.16 3a.75.75 0 0 1-1.12-.81l1.36-5.83-4.53-3.9a.75.75 0 0 1 .43-1.31l5.96-.5 2.36-5.5c.12-.28.4-.46.7-.46Z"/></svg>
|
||||
<span>Upgrade to Pro</span>
|
||||
</a>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,77 @@
|
||||
<x-app-layout title="Pro" heading="Ladill POS Pro">
|
||||
@php
|
||||
$price = number_format($priceMinor / 100, 2);
|
||||
$live = $subscription && $subscription->entitled();
|
||||
@endphp
|
||||
|
||||
<div class="mx-auto max-w-2xl">
|
||||
@if(session('upsell'))
|
||||
<div class="mb-4 rounded-xl border border-amber-200 bg-amber-50 px-4 py-3 text-sm text-amber-800">{{ session('upsell') }}</div>
|
||||
@endif
|
||||
|
||||
<div class="overflow-hidden rounded-2xl border border-slate-200 bg-white">
|
||||
<div class="bg-gradient-to-r from-indigo-700 via-blue-600 to-emerald-500 px-6 py-7 text-white">
|
||||
<div class="flex items-center gap-2">
|
||||
<span class="rounded-md bg-white/20 px-2 py-0.5 text-[11px] font-semibold uppercase tracking-wide">Pro</span>
|
||||
@if($live)<span class="rounded-md bg-emerald-400/90 px-2 py-0.5 text-[11px] font-semibold text-emerald-950">Active</span>@endif
|
||||
</div>
|
||||
<h1 class="mt-3 text-2xl font-bold">Ladill POS Pro</h1>
|
||||
<p class="mt-1 text-sm text-white/80">Scale your counter with unlimited products, restaurant mode, and ecosystem sync.</p>
|
||||
<p class="mt-4 text-3xl font-bold">{{ $currency }} {{ $price }}<span class="text-base font-medium text-white/70"> / month</span></p>
|
||||
</div>
|
||||
|
||||
<div class="px-6 py-6">
|
||||
<ul class="grid gap-3 sm:grid-cols-2">
|
||||
@foreach([
|
||||
'Unlimited products',
|
||||
'Restaurant mode & kitchen display',
|
||||
'CRM & Merchant catalog import',
|
||||
'Stock tracking',
|
||||
'Invoice, CRM & Accounting sync',
|
||||
'Multi-location ready',
|
||||
] as $feature)
|
||||
<li class="flex items-start gap-2 text-sm text-slate-700">
|
||||
<svg class="mt-0.5 h-4 w-4 shrink-0 text-emerald-500" fill="none" viewBox="0 0 24 24" stroke-width="2.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="m4.5 12.75 6 6 9-13.5"/></svg>
|
||||
<span>{{ $feature }}</span>
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
|
||||
<div class="mt-6 border-t border-slate-100 pt-6">
|
||||
@if(! $gatingActive)
|
||||
<p class="rounded-xl bg-slate-50 px-4 py-3 text-sm text-slate-500">Pro is currently included for all accounts.</p>
|
||||
@elseif($live)
|
||||
<div class="flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between">
|
||||
<div class="text-sm text-slate-600">
|
||||
@if($subscription->status === 'canceled')
|
||||
Auto-renew off — Pro stays active until <strong>{{ $subscription->current_period_end->format('d M Y') }}</strong>.
|
||||
@else
|
||||
Renews on <strong>{{ $subscription->current_period_end->format('d M Y') }}</strong> from your Ladill wallet.
|
||||
@endif
|
||||
</div>
|
||||
@if($subscription->auto_renew)
|
||||
<form method="post" action="{{ route('pos.pro.cancel') }}" onsubmit="return confirm('Turn off auto-renew? You keep Pro until the period ends.');">
|
||||
@csrf
|
||||
<button class="rounded-xl border border-slate-200 px-4 py-2 text-sm font-medium text-slate-600 hover:bg-slate-50">Cancel auto-renew</button>
|
||||
</form>
|
||||
@else
|
||||
<form method="post" action="{{ route('pos.pro.subscribe') }}">
|
||||
@csrf
|
||||
<button class="btn-primary">Resume subscription</button>
|
||||
</form>
|
||||
@endif
|
||||
</div>
|
||||
@else
|
||||
<form method="post" action="{{ route('pos.pro.subscribe') }}">
|
||||
@csrf
|
||||
<button class="btn-primary w-full sm:w-auto">
|
||||
Subscribe — {{ $currency }} {{ $price }}/mo from wallet
|
||||
</button>
|
||||
</form>
|
||||
<p class="mt-3 text-xs text-slate-400">Billed monthly from your Ladill wallet. Cancel anytime; you keep Pro until the period ends.</p>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</x-app-layout>
|
||||
Reference in New Issue
Block a user