Show consolidated prepaid totals on plan pricing cards.
Deploy Ladill Queue / deploy (push) Successful in 51s
Deploy Ladill Queue / deploy (push) Successful in 51s
When 6/12/24 month Paystack is selected, Pro and Business prices display the full term amount instead of /mo. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,23 @@
|
|||||||
|
@props([
|
||||||
|
'currency' => 'GHS',
|
||||||
|
'monthlyMinor' => 0,
|
||||||
|
'prepaidMinor' => null,
|
||||||
|
'monthlyDisplay' => null,
|
||||||
|
'monthlySuffix' => '/mo',
|
||||||
|
'dark' => false,
|
||||||
|
])
|
||||||
|
|
||||||
|
@php
|
||||||
|
$prepaidBase = (int) ($prepaidMinor ?? $monthlyMinor);
|
||||||
|
$monthlyFormatted = $monthlyDisplay ?? number_format((int) $monthlyMinor / 100, 0);
|
||||||
|
$muted = $dark ? 'text-slate-300' : 'text-slate-500';
|
||||||
|
$text = $dark ? 'text-white' : 'text-slate-900';
|
||||||
|
@endphp
|
||||||
|
|
||||||
|
<p {{ $attributes->merge(['class' => "mt-2 text-3xl font-bold {$text}"]) }}>
|
||||||
|
<span x-show="billing === 'monthly'">{{ $currency }} {{ $monthlyFormatted }}<span class="text-base font-medium {{ $muted }}">{{ $monthlySuffix }}</span></span>
|
||||||
|
<span x-show="billing !== 'monthly'" x-cloak>
|
||||||
|
<span x-text="'{{ $currency }} ' + ({{ $prepaidBase }} * billing / 100).toLocaleString()"></span>
|
||||||
|
<span class="block text-base font-medium {{ $muted }}" x-text="'for ' + billing + ' months'"></span>
|
||||||
|
</span>
|
||||||
|
</p>
|
||||||
@@ -50,10 +50,7 @@
|
|||||||
{{-- Pro --}}
|
{{-- Pro --}}
|
||||||
<div class="flex flex-col rounded-2xl border border-slate-200 bg-white p-6 {{ $planKey === 'pro' ? 'ring-2 ring-indigo-500' : '' }}">
|
<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>
|
<p class="text-xs font-semibold uppercase tracking-wide text-indigo-600">Pro</p>
|
||||||
<p class="mt-2 text-3xl font-bold text-slate-900">{{ $currency }} {{ $proPrice }}<span class="text-base font-medium text-slate-500">/mo</span></p>
|
<x-plan-tier-price :currency="$currency" :monthly-minor="$proPriceMinor" />
|
||||||
<p class="mt-1 text-sm text-slate-500" x-show="billing !== 'monthly'" x-cloak>
|
|
||||||
<span x-text="billing === 'monthly' ? '' : '{{ $currency }} ' + ({{ $proPriceMinor }} * billing / 100).toLocaleString() + ' total'"></span>
|
|
||||||
</p>
|
|
||||||
<p class="mt-1 text-sm text-slate-500" x-show="billing === 'monthly'">Unlimited branches & queues</p>
|
<p class="mt-1 text-sm text-slate-500" x-show="billing === 'monthly'">Unlimited branches & queues</p>
|
||||||
<ul class="mt-5 flex-1 space-y-2 text-sm text-slate-700">
|
<ul class="mt-5 flex-1 space-y-2 text-sm text-slate-700">
|
||||||
<li>Advanced routing rules</li>
|
<li>Advanced routing rules</li>
|
||||||
@@ -92,8 +89,15 @@
|
|||||||
{{-- Enterprise --}}
|
{{-- Enterprise --}}
|
||||||
<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' : '' }}">
|
<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">Enterprise</p>
|
<p class="text-xs font-semibold uppercase tracking-wide text-amber-300">Enterprise</p>
|
||||||
<p class="mt-2 text-3xl font-bold">{{ $currency }} {{ $enterprisePerBranch }}<span class="text-base font-medium text-slate-300">/branch/mo</span></p>
|
<x-plan-tier-price
|
||||||
<p class="mt-1 text-sm text-slate-300">
|
:currency="$currency"
|
||||||
|
:monthly-minor="$enterprisePricePerBranchMinor"
|
||||||
|
:prepaid-minor="$enterprisePriceMinor"
|
||||||
|
:monthly-display="$enterprisePerBranch"
|
||||||
|
monthly-suffix="/branch/mo"
|
||||||
|
dark
|
||||||
|
/>
|
||||||
|
<p class="mt-1 text-sm text-slate-300" x-show="billing === 'monthly'">
|
||||||
@if ($branchCount > 0)
|
@if ($branchCount > 0)
|
||||||
{{ $branchCount }} active {{ str('branch')->plural($branchCount) }} = {{ $currency }} {{ $enterpriseTotal }}/mo
|
{{ $branchCount }} active {{ str('branch')->plural($branchCount) }} = {{ $currency }} {{ $enterpriseTotal }}/mo
|
||||||
@else
|
@else
|
||||||
|
|||||||
Reference in New Issue
Block a user