Deploy Ladill Woo Manager / deploy (push) Successful in 1m7s
Desktop store switcher now sits after search; mobile shows route-based page titles, bottom nav, and store switching inside the profile sheet. Co-authored-by: Cursor <cursoragent@cursor.com>
102 lines
7.5 KiB
PHP
102 lines
7.5 KiB
PHP
<x-user-layout>
|
|
<x-slot name="title">Plans</x-slot>
|
|
<div class="mx-auto max-w-5xl space-y-6" x-data="{ billing: 'monthly' }">
|
|
@if (session('success'))
|
|
<div class="rounded-xl border border-emerald-200 bg-emerald-50 px-4 py-3 text-sm text-emerald-800">{{ session('success') }}</div>
|
|
@endif
|
|
@if (session('error'))
|
|
<div class="rounded-xl border border-red-200 bg-red-50 px-4 py-3 text-sm text-red-800">{{ session('error') }}</div>
|
|
@endif
|
|
@if (session('upsell'))
|
|
<div class="rounded-xl border border-amber-200 bg-amber-50 px-4 py-3 text-sm text-amber-800">{{ session('upsell') }}</div>
|
|
@endif
|
|
|
|
<div class="rounded-2xl border border-slate-200 bg-white px-6 py-5">
|
|
<h1 class="hidden text-2xl font-bold text-slate-900 lg:block">Choose your Woo Manager plan</h1>
|
|
<p class="mt-1 text-sm text-slate-600">Pay monthly from your Ladill wallet, or prepay 6/12/24 months via Paystack.</p>
|
|
@if ($gatingActive && ! ($subscription && $subscription->entitled()))
|
|
<div class="mt-4 flex flex-wrap gap-2">
|
|
<button type="button" @click="billing = 'monthly'" :class="billing === 'monthly' ? 'bg-indigo-600 text-white' : 'bg-slate-100 text-slate-700 hover:bg-slate-200'" class="rounded-lg px-3 py-1.5 text-sm font-medium transition">Monthly · wallet</button>
|
|
@foreach ($prepaidMonths as $months)
|
|
<button type="button" @click="billing = '{{ $months }}'" :class="billing === '{{ $months }}' ? 'bg-indigo-600 text-white' : 'bg-slate-100 text-slate-700 hover:bg-slate-200'" class="rounded-lg px-3 py-1.5 text-sm font-medium transition">{{ $months }} months · Paystack</button>
|
|
@endforeach
|
|
</div>
|
|
@endif
|
|
</div>
|
|
|
|
@php $live = $subscription && $subscription->entitled(); @endphp
|
|
@if ($live)
|
|
<div class="rounded-2xl border border-slate-200 bg-white px-6 py-5">
|
|
<div class="flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between">
|
|
<div class="text-sm text-slate-600">
|
|
<strong>{{ $isEnterprise ? 'Business' : 'Pro' }}</strong> active until <strong>{{ $subscription->current_period_end->format('d M Y') }}</strong>
|
|
</div>
|
|
@if ($subscription->auto_renew)
|
|
<form method="post" action="{{ route('woo.pro.cancel') }}" onsubmit="return confirm('Turn off auto-renew?');">@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>
|
|
@elseif ($subscription->status === 'canceled')
|
|
<form method="post" action="{{ route($isEnterprise ? 'woo.pro.subscribe-enterprise' : 'woo.pro.subscribe') }}">@csrf<button class="rounded-xl bg-indigo-600 px-4 py-2 text-sm font-semibold text-white hover:bg-indigo-700">Resume subscription</button></form>
|
|
@endif
|
|
</div>
|
|
</div>
|
|
@elseif ($gatingActive)
|
|
<p class="rounded-xl bg-slate-50 px-4 py-3 text-sm text-slate-600">
|
|
Free plan: <strong>{{ $storeCount }}/{{ $storeLimit }}</strong> store(s),
|
|
<strong>{{ $productCount }}/{{ $productLimit }}</strong> products.
|
|
</p>
|
|
@endif
|
|
|
|
<div class="grid gap-5 lg:grid-cols-3">
|
|
<div class="flex flex-col rounded-2xl border border-slate-200 bg-white p-6 {{ $planKey === 'free' ? 'ring-2 ring-indigo-500' : '' }}">
|
|
<p class="text-xs font-semibold uppercase tracking-wide text-slate-500">Free</p>
|
|
<p class="mt-2 text-3xl font-bold text-slate-900">GHS 0</p>
|
|
<ul class="mt-5 flex-1 space-y-2 text-sm text-slate-700">
|
|
<li>1 WooCommerce store</li>
|
|
<li>20 products</li>
|
|
<li>Order fulfillment inbox</li>
|
|
</ul>
|
|
@if ($planKey === 'free')<p class="mt-6 text-sm font-medium text-indigo-700">Current plan</p>@endif
|
|
</div>
|
|
|
|
<div class="flex flex-col rounded-2xl border border-slate-200 bg-white p-6 {{ $planKey === 'pro' ? 'ring-2 ring-indigo-500' : '' }}">
|
|
<p class="text-xs font-semibold uppercase tracking-wide text-indigo-600">Pro</p>
|
|
<x-plan-tier-price :currency="$currency" :monthly-minor="$proPriceMinor" />
|
|
<ul class="mt-5 flex-1 space-y-2 text-sm text-slate-700">
|
|
<li>Multiple stores</li>
|
|
<li>Unlimited products</li>
|
|
<li>Switch stores anytime</li>
|
|
</ul>
|
|
<div class="mt-6">
|
|
@if ($planKey === 'pro')
|
|
<p class="text-sm text-slate-600">Current plan</p>
|
|
@elseif ($gatingActive && ! $hasPaidPlan)
|
|
<form x-show="billing === 'monthly'" method="post" action="{{ route('woo.pro.subscribe') }}">@csrf<button class="w-full rounded-xl bg-indigo-600 px-4 py-2.5 text-sm font-semibold text-white hover:bg-indigo-700">Upgrade — monthly wallet</button></form>
|
|
@foreach ($prepaidMonths as $months)
|
|
<form x-show="billing == {{ $months }}" method="post" action="{{ route('woo.pro.subscribe-prepaid') }}">@csrf<input type="hidden" name="plan" value="pro"><input type="hidden" name="months" value="{{ $months }}"><button type="submit" class="w-full rounded-xl bg-indigo-600 px-4 py-2.5 text-sm font-semibold text-white hover:bg-indigo-700">Pay {{ $months }} months via Paystack</button></form>
|
|
@endforeach
|
|
@endif
|
|
</div>
|
|
</div>
|
|
|
|
<div class="flex flex-col rounded-2xl border border-slate-200 bg-gradient-to-b from-slate-900 to-slate-800 p-6 text-white {{ $planKey === 'enterprise' ? 'ring-2 ring-amber-400' : '' }}">
|
|
<p class="text-xs font-semibold uppercase tracking-wide text-amber-300">Business</p>
|
|
<x-plan-tier-price :currency="$currency" :monthly-minor="$enterprisePriceMinor" dark />
|
|
<ul class="mt-5 flex-1 space-y-2 text-sm text-slate-200">
|
|
<li>Everything in Pro</li>
|
|
<li>Team workflows</li>
|
|
<li>Priority support</li>
|
|
</ul>
|
|
<div class="mt-6">
|
|
@if ($planKey === 'enterprise')
|
|
<p class="text-sm text-slate-200">Current plan</p>
|
|
@elseif ($gatingActive && ! $hasPaidPlan)
|
|
<form x-show="billing === 'monthly'" method="post" action="{{ route('woo.pro.subscribe-enterprise') }}">@csrf<button class="w-full rounded-xl bg-amber-400 px-4 py-2.5 text-sm font-semibold text-slate-900 hover:bg-amber-300">Upgrade — monthly wallet</button></form>
|
|
@foreach ($prepaidMonths as $months)
|
|
<form x-show="billing == {{ $months }}" method="post" action="{{ route('woo.pro.subscribe-prepaid') }}">@csrf<input type="hidden" name="plan" value="enterprise"><input type="hidden" name="months" value="{{ $months }}"><button type="submit" class="w-full rounded-xl bg-amber-400 px-4 py-2.5 text-sm font-semibold text-slate-900 hover:bg-amber-300">Pay {{ $months }} months via Paystack</button></form>
|
|
@endforeach
|
|
@endif
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</x-user-layout>
|