ui: show trial instead of sub
This commit is contained in:
parent
cd0da04ea2
commit
c418a17161
@ -8,6 +8,10 @@
|
||||
|
||||
class PricingPlans extends Component
|
||||
{
|
||||
public bool $isTrial = false;
|
||||
public function mount() {
|
||||
$this->isTrial = !data_get(currentTeam(),'subscription.stripe_trial_already_ended');
|
||||
}
|
||||
public function subscribeStripe($type)
|
||||
{
|
||||
$team = currentTeam();
|
||||
|
@ -2,29 +2,29 @@
|
||||
@if (config('subscription.provider') === 'stripe')
|
||||
<x-slot:basic>
|
||||
<x-forms.button x-show="selected === 'monthly'" x-cloak aria-describedby="tier-basic"
|
||||
class="w-full h-10 buyme" wire:click="subscribeStripe('basic-monthly')"> Subscribe
|
||||
class="w-full h-10 buyme" wire:click="subscribeStripe('basic-monthly')"> {{$isTrial ? 'Start Trial' : 'Subscribe' }}
|
||||
</x-forms.button>
|
||||
|
||||
<x-forms.button x-show="selected === 'yearly'" x-cloak aria-describedby="tier-basic"
|
||||
class="w-full h-10 buyme" wire:click="subscribeStripe('basic-yearly')"> Subscribe
|
||||
class="w-full h-10 buyme" wire:click="subscribeStripe('basic-yearly')"> {{$isTrial ? 'Start Trial' : 'Subscribe' }}
|
||||
</x-forms.button>
|
||||
</x-slot:basic>
|
||||
<x-slot:pro>
|
||||
<x-forms.button x-show="selected === 'monthly'" x-cloak aria-describedby="tier-pro"
|
||||
class="w-full h-10 buyme" wire:click="subscribeStripe('pro-monthly')"> Subscribe
|
||||
class="w-full h-10 buyme" wire:click="subscribeStripe('pro-monthly')"> {{$isTrial ? 'Start Trial' : 'Subscribe' }}
|
||||
</x-forms.button>
|
||||
|
||||
<x-forms.button x-show="selected === 'yearly'" x-cloak aria-describedby="tier-pro" class="w-full h-10 buyme"
|
||||
wire:click="subscribeStripe('pro-yearly')"> Subscribe
|
||||
wire:click="subscribeStripe('pro-yearly')"> {{$isTrial ? 'Start Trial' : 'Subscribe' }}
|
||||
</x-forms.button>
|
||||
</x-slot:pro>
|
||||
<x-slot:ultimate>
|
||||
<x-forms.button x-show="selected === 'monthly'" x-cloak aria-describedby="tier-ultimate"
|
||||
class="w-full h-10 buyme" wire:click="subscribeStripe('ultimate-monthly')"> Subscribe
|
||||
class="w-full h-10 buyme" wire:click="subscribeStripe('ultimate-monthly')"> {{$isTrial ? 'Start Trial' : 'Subscribe' }}
|
||||
</x-forms.button>
|
||||
|
||||
<x-forms.button x-show="selected === 'yearly'" x-cloak aria-describedby="tier-ultimate"
|
||||
class="w-full h-10 buyme" wire:click="subscribeStripe('ultimate-yearly')"> Subscribe
|
||||
class="w-full h-10 buyme" wire:click="subscribeStripe('ultimate-yearly')"> {{$isTrial ? 'Start Trial' : 'Subscribe' }}
|
||||
</x-forms.button>
|
||||
</x-slot:ultimate>
|
||||
@endif
|
||||
|
Loading…
Reference in New Issue
Block a user