module pricing changes

This commit is contained in:
Cüneyt Şentürk
2022-11-28 13:17:36 +03:00
parent ec8d5077fa
commit 26943351e0
6 changed files with 69 additions and 39 deletions

View File

@ -7,9 +7,10 @@
</span>
</div>
@elseif (in_array('onprime', $module->where_to_use))
<div x-show="price_type == false" class="text-center text-sm mt-3">
<div x-show="price_type == 'monthly'" class="text-center text-sm mt-3">
<span style="font-size: 12px;">
<span class="text-red">*</span> <x-link href="https://akaunting.com/features/why-akaunting-cloud?utm_source=software&utm_medium=app_show&utm_campaign={{ str_replace('-', '_', $module->slug) }}" target="_blank" override="class">{!! trans('modules.information_monthly') !!}</x-link>
<span class="text-red">*</span>
{!! trans('modules.information_monthly', ['url' => 'https://akaunting.com/features/why-akaunting-cloud?utm_source=software&utm_medium=app_show&utm_campaign=' . str_replace('-', '_', $module->slug)]) !!}
</span>
</div>
@else

View File

@ -1,28 +1,12 @@
@props(['module'])
@if ($module->price != '0.0000')
<div class="flex gap-2 items-baseline">
<div class="flex gap-2 items-baseline cursor-default">
{!! $module->price_prefix !!}
<div x-show="price_type == true">
<div x-show="price_type == 'monthly'">
@if (! empty($module->is_discount))
<del class="text-red">
{!! $module->yearly_per_monthly_price !!}
</del>
<span class="text-5xl font-bold text-purple">
{!! $module->yearly_per_monthly_special_price !!}
</span>
@else
<span class="text-5xl font-bold text-purple">
{!! $module->yearly_per_monthly_price !!}
</span>
@endif
</div>
<div x-show="price_type == false">
@if (! empty($module->is_discount))
<del class="text-red">
<del class="text-red mr-2">
{!! $module->monthly_price !!}
</del>
@ -36,11 +20,47 @@
@endif
</div>
<div x-show="price_type == 'yearly'">
@if (! empty($module->is_discount))
<del class="text-red mr-2">
{!! $module->yearly_per_monthly_price !!}
</del>
<span class="text-5xl font-bold text-purple">
{!! $module->yearly_per_monthly_special_price !!}
</span>
@else
<span class="text-5xl font-bold text-purple">
{!! $module->yearly_per_monthly_price !!}
</span>
@endif
</div>
<div x-show="price_type == 'lifetime'">
@if (! empty($module->is_discount))
<del class="text-red mr-2">
{!! $module->lifetime_price !!}
</del>
<span class="text-5xl font-bold text-purple">
{!! $module->lifetime_special_price !!}
</span>
@else
<span class="text-5xl font-bold text-purple">
{!! $module->lifetime_price !!}
</span>
@endif
</div>
{!! $module->price_suffix !!}
<span class="font-thin">
<span x-show="price_type != 'lifetime'" class="font-thin">
{{ trans('modules.per_month') }}
</span>
<span x-show="price_type == 'lifetime'" class="font-thin lowercase">
{{ trans('modules.once') }}
</span>
</div>
@else
<span class="text-4xl font-bold text-purple">

View File

@ -1,20 +1,30 @@
<x-form>
<div class="lg:absolute lg:ltr:right-0 lg:rtl:left-0 top-4" x-on:click="price_type = ! price_type">
<div class="lg:absolute lg:ltr:right-0 lg:rtl:left-0 top-4">
<div class="relative" x-model="price_type">
<div class="w-36 flex items-center bg-gray-200 p-1 ltr:mr-2 rtl:ml-2 rounded-lg">
<div class="w-58 flex items-center bg-gray-200 p-1 ltr:mr-2 rtl:ml-2 rounded-lg">
<button type="button"
x-on:click="price_type = 'monthly'"
class="w-18 flex justify-center px-2"
x-bind:class="price_type == true ? 'btn-outline-primary' : 'bg-white rounded-lg'"
x-bind:class="price_type == 'monthly' ? 'bg-white rounded-lg' : 'btn-outline-primary'"
>
{{ trans('general.monthly') }}
</button>
<button type="button"
x-on:click="price_type = 'yearly'"
class="w-18 flex justify-center px-2"
x-bind:class="price_type == false ? 'btn-outline-primary' : 'bg-white rounded-lg'"
x-bind:class="price_type == 'yearly' ? 'bg-white rounded-lg' : 'btn-outline-primary'"
>
{{ trans('general.yearly') }}
</button>
<button type="button"
x-on:click="price_type = 'lifetime'"
class="w-18 flex justify-center px-2"
x-bind:class="price_type == 'lifetime' ? 'bg-white rounded-lg' : 'btn-outline-primary'"
>
{{ trans('general.lifetime') }}
</button>
</div>
</div>
</div>