Bill Queue Pro per active branch like Enterprise.
Deploy Ladill Queue / deploy (push) Successful in 33s
Deploy Ladill Queue / deploy (push) Successful in 33s
Show /branch/mo pricing with live branch totals on the plans page, charge subscribe/prepaid/renewals by branch count, and store pro_billed_branches.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
<x-app-layout title="Plans" heading="Queue plans">
|
||||
@php
|
||||
$proPrice = number_format($proPriceMinor / 100, 0);
|
||||
$proPerBranch = number_format($proPricePerBranchMinor / 100, 0);
|
||||
$proTotal = number_format($proPriceMinor / 100, 0);
|
||||
$enterprisePerBranch = number_format($enterprisePricePerBranchMinor / 100, 0);
|
||||
$enterpriseTotal = number_format($enterprisePriceMinor / 100, 0);
|
||||
@endphp
|
||||
@@ -17,6 +18,7 @@
|
||||
<h1 class="text-2xl font-bold text-slate-900">Choose your Queue 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.
|
||||
Pro and Enterprise are billed per active branch.
|
||||
Enterprise includes a one-time setup fee — <a href="{{ $salesUrl }}" class="font-medium text-indigo-600 hover:text-indigo-800" target="_blank" rel="noopener">contact sales</a> for onboarding.
|
||||
</p>
|
||||
<div class="mt-4 flex flex-wrap gap-2">
|
||||
@@ -50,8 +52,20 @@
|
||||
{{-- Pro --}}
|
||||
<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" />
|
||||
<p class="mt-1 text-sm text-slate-500" x-show="billing === 'monthly'">Unlimited branches & queues</p>
|
||||
<x-plan-tier-price
|
||||
:currency="$currency"
|
||||
:monthly-minor="$proPricePerBranchMinor"
|
||||
:prepaid-minor="$proPriceMinor"
|
||||
:monthly-display="$proPerBranch"
|
||||
monthly-suffix="/branch/mo"
|
||||
/>
|
||||
<p class="mt-1 text-sm text-slate-500" x-show="billing === 'monthly'">
|
||||
@if ($branchCount > 0)
|
||||
{{ $branchCount }} active {{ str('branch')->plural($branchCount) }} = {{ $currency }} {{ $proTotal }}/mo
|
||||
@else
|
||||
Per-branch billing
|
||||
@endif
|
||||
</p>
|
||||
<ul class="mt-5 flex-1 space-y-2 text-sm text-slate-700">
|
||||
<li>Advanced routing rules</li>
|
||||
<li>Unlimited kiosks & displays</li>
|
||||
@@ -66,19 +80,25 @@
|
||||
@if ($planExpiresAt)
|
||||
until <strong>{{ $planExpiresAt->format('d M Y') }}</strong>
|
||||
@endif
|
||||
@if ($proBilledBranches > 0)
|
||||
· billed for {{ $proBilledBranches }} {{ str('branch')->plural($proBilledBranches) }}
|
||||
@endif
|
||||
.
|
||||
</p>
|
||||
@elseif ($canManage)
|
||||
<form x-show="billing === 'monthly'" method="post" action="{{ route('qms.pro.subscribe') }}">
|
||||
@csrf
|
||||
<button class="btn-primary w-full">Upgrade to Pro — monthly wallet</button>
|
||||
<button class="btn-primary w-full">
|
||||
Upgrade to Pro — {{ $currency }} {{ $proTotal }}/mo wallet
|
||||
</button>
|
||||
</form>
|
||||
<template x-for="months in @js($prepaidMonths)" :key="months">
|
||||
<form x-show="billing == months" method="post" action="{{ route('qms.pro.subscribe-prepaid') }}">
|
||||
@csrf
|
||||
<input type="hidden" name="plan" value="pro">
|
||||
<input type="hidden" name="months" :value="months">
|
||||
<button type="submit" class="btn-primary w-full" x-text="'Pay ' + months + ' months via Paystack'"></button>
|
||||
<button type="submit" class="btn-primary w-full"
|
||||
x-text="'Pay ' + months + ' months via Paystack — {{ $currency }} ' + ({{ $proPriceMinor }} * months / 100).toLocaleString()"></button>
|
||||
</form>
|
||||
</template>
|
||||
@else
|
||||
|
||||
Reference in New Issue
Block a user