Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 5 additions & 18 deletions resources/views/livewire/customer/plugins/show.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -242,16 +242,14 @@
<div class="mt-6 space-y-4">
@foreach (\App\Enums\PluginTier::cases() as $pluginTier)
@php
$prices = $pluginTier->getPrices();
$subscriberPrice = $prices[\App\Enums\PriceTier::Subscriber->value] / 100;
$regularPrice = $prices[\App\Enums\PriceTier::Regular->value] / 100;
$regularPrice = $pluginTier->getPrices()[\App\Enums\PriceTier::Regular->value] / 100;
@endphp
<label class="relative flex cursor-pointer rounded-lg border p-4 transition focus:outline-none"
:class="$wire.tier === '{{ $pluginTier->value }}' ? 'border-indigo-500 bg-indigo-50 dark:border-indigo-400 dark:bg-indigo-950/30' : 'border-gray-200 dark:border-gray-700 hover:bg-gray-50 dark:hover:bg-gray-700/50'">
<input type="radio" wire:model.live="tier" value="{{ $pluginTier->value }}" class="sr-only" />
<span class="flex flex-1 items-center justify-between">
<span class="text-sm font-medium text-gray-900 dark:text-white">{{ $pluginTier->label() }}</span>
<span class="text-lg font-semibold text-gray-900 dark:text-white">${{ number_format($subscriberPrice) }} – ${{ number_format($regularPrice) }}</span>
<span class="text-lg font-semibold text-gray-900 dark:text-white">${{ number_format($regularPrice) }}</span>
</span>
</label>
@endforeach
Expand Down Expand Up @@ -445,11 +443,8 @@ class="block text-sm text-gray-500 file:mr-4 file:rounded-md file:border-0 file:
</div>
</div>
@if ($plugin->isPaid() && $plugin->tier)
@php
$regularPrice = $plugin->tier->getPrices()[\App\Enums\PriceTier::Regular->value] / 100;
@endphp
<span class="inline-flex shrink-0 items-center text-center rounded-full bg-emerald-100 px-2.5 py-0.5 text-xs font-medium text-emerald-800 dark:bg-emerald-900/30 dark:text-emerald-400">
{{ $plugin->tier->label() }}&nbsp;&mdash;&nbsp;${{ number_format($regularPrice) }}
{{ $plugin->tier->label() }}
</span>
@elseif ($plugin->isPaid())
<span class="inline-flex shrink-0 items-center text-center rounded-full bg-emerald-100 px-2.5 py-0.5 text-xs font-medium text-emerald-800 dark:bg-emerald-900/30 dark:text-emerald-400">
Expand Down Expand Up @@ -528,12 +523,7 @@ class="block text-sm text-gray-500 file:mr-4 file:rounded-md file:border-0 file:
<flux:heading size="lg">Type</flux:heading>
<flux:text class="mt-1">
@if ($plugin->isPaid() && $plugin->tier)
@php
$prices = $plugin->tier->getPrices();
$subscriberPrice = $prices[\App\Enums\PriceTier::Subscriber->value] / 100;
$regularPrice = $prices[\App\Enums\PriceTier::Regular->value] / 100;
@endphp
Paid &mdash; {{ $plugin->tier->label() }} (${{ number_format($subscriberPrice) }} – ${{ number_format($regularPrice) }})
Paid &mdash; {{ $plugin->tier->label() }}
@elseif ($plugin->isPaid())
Paid
@else
Expand Down Expand Up @@ -716,11 +706,8 @@ class="block text-sm text-gray-500 file:mr-4 file:rounded-md file:border-0 file:
</div>
</div>
@if ($plugin->isPaid() && $plugin->tier)
@php
$regularPrice = $plugin->tier->getPrices()[\App\Enums\PriceTier::Regular->value] / 100;
@endphp
<span class="inline-flex shrink-0 items-center text-center rounded-full bg-emerald-100 px-2.5 py-0.5 text-xs font-medium text-emerald-800 dark:bg-emerald-900/30 dark:text-emerald-400">
{{ $plugin->tier->label() }}&nbsp;&mdash;&nbsp;${{ number_format($regularPrice) }}
{{ $plugin->tier->label() }}
</span>
@elseif ($plugin->isPaid())
<span class="inline-flex shrink-0 items-center text-center rounded-full bg-emerald-100 px-2.5 py-0.5 text-xs font-medium text-emerald-800 dark:bg-emerald-900/30 dark:text-emerald-400">
Expand Down
Loading