48 lines
2.3 KiB
PHP
48 lines
2.3 KiB
PHP
<div class="application-settings-form w-full max-w-none">
|
|
<x-slot:title>
|
|
Subscribe | MapleDeploy
|
|
</x-slot>
|
|
|
|
{{-- MapleDeploy branding --}}
|
|
<x-dashboard.navbar section="subscription" title="Subscription"
|
|
subtitle="Choose a plan for MapleDeploy" />
|
|
|
|
@if (auth()->user()->isAdminFromSession())
|
|
@if ($loading)
|
|
<div class="flex min-h-80 items-center justify-center" wire:init="getStripeStatus">
|
|
<x-loading text="Loading your subscription status..." />
|
|
</div>
|
|
@else
|
|
@if ($isUnpaid)
|
|
{{-- MapleDeploy branding --}}
|
|
<x-application.settings-section title="Payment failed"
|
|
description="Your latest MapleDeploy payment could not be processed.">
|
|
<x-callout type="danger" title="Subscription payment is past due">
|
|
Update the payment method or settle the outstanding invoice in the billing portal.
|
|
</x-callout>
|
|
<div class="mt-4">
|
|
<x-forms.button wire:click="stripeCustomerPortal" isHighlighted>Open billing
|
|
portal</x-forms.button>
|
|
</div>
|
|
</x-application.settings-section>
|
|
@else
|
|
@if ($isCancelled || ! data_get(currentTeam(), 'subscription'))
|
|
{{-- MapleDeploy branding --}}
|
|
<x-callout type="warning" title="No active subscription" class="mb-6">
|
|
Choose a plan to continue using MapleDeploy.
|
|
</x-callout>
|
|
@endif
|
|
{{-- Stripe is the only cloud provider; always render pricing so the page is never blank. --}}
|
|
<livewire:subscription.pricing-plans />
|
|
@endif
|
|
@endif
|
|
@else
|
|
<x-application.settings-section title="Subscription"
|
|
description="Only team administrators can manage billing and plan limits.">
|
|
{{-- MapleDeploy branding --}}
|
|
<x-callout type="warning" title="Permission Required">
|
|
You are not an admin so you cannot manage your team's subscription. Please contact your team admin.
|
|
</x-callout>
|
|
</x-application.settings-section>
|
|
@endif
|
|
</div>
|