Fix styling
This commit is contained in:
		
				
					committed by
					
						
						github-actions[bot]
					
				
			
			
				
	
			
			
			
						parent
						
							41fb6a1fc9
						
					
				
				
					commit
					d86274cc37
				
			@@ -7,7 +7,7 @@ use Stripe\Stripe;
 | 
			
		||||
function getSubscriptionLink($type)
 | 
			
		||||
{
 | 
			
		||||
    $checkout_id = config("subscription.lemon_squeezy_checkout_id_$type");
 | 
			
		||||
    if (!$checkout_id) {
 | 
			
		||||
    if (! $checkout_id) {
 | 
			
		||||
        return null;
 | 
			
		||||
    }
 | 
			
		||||
    $user_id = auth()->user()->id;
 | 
			
		||||
@@ -27,6 +27,7 @@ function getSubscriptionLink($type)
 | 
			
		||||
    if ($name) {
 | 
			
		||||
        $url .= "&checkout[name]={$name}";
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    return $url;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -47,11 +48,11 @@ function getEndDate()
 | 
			
		||||
 | 
			
		||||
function isSubscriptionActive()
 | 
			
		||||
{
 | 
			
		||||
    if (!isCloud()) {
 | 
			
		||||
    if (! isCloud()) {
 | 
			
		||||
        return false;
 | 
			
		||||
    }
 | 
			
		||||
    $team = currentTeam();
 | 
			
		||||
    if (!$team) {
 | 
			
		||||
    if (! $team) {
 | 
			
		||||
        return false;
 | 
			
		||||
    }
 | 
			
		||||
    $subscription = $team?->subscription;
 | 
			
		||||
@@ -68,26 +69,29 @@ function isSubscriptionActive()
 | 
			
		||||
    if (isStripe()) {
 | 
			
		||||
        return $subscription->stripe_invoice_paid === true;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    return false;
 | 
			
		||||
}
 | 
			
		||||
function isSubscriptionOnGracePeriod()
 | 
			
		||||
{
 | 
			
		||||
    $team = currentTeam();
 | 
			
		||||
    if (!$team) {
 | 
			
		||||
    if (! $team) {
 | 
			
		||||
        return false;
 | 
			
		||||
    }
 | 
			
		||||
    $subscription = $team?->subscription;
 | 
			
		||||
    if (!$subscription) {
 | 
			
		||||
    if (! $subscription) {
 | 
			
		||||
        return false;
 | 
			
		||||
    }
 | 
			
		||||
    if (isLemon()) {
 | 
			
		||||
        $is_still_grace_period = $subscription->lemon_ends_at &&
 | 
			
		||||
            Carbon::parse($subscription->lemon_ends_at) > Carbon::now();
 | 
			
		||||
 | 
			
		||||
        return $is_still_grace_period;
 | 
			
		||||
    }
 | 
			
		||||
    if (isStripe()) {
 | 
			
		||||
        return $subscription->stripe_cancel_at_period_end;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    return false;
 | 
			
		||||
}
 | 
			
		||||
function subscriptionProvider()
 | 
			
		||||
@@ -110,14 +114,15 @@ function getStripeCustomerPortalSession(Team $team)
 | 
			
		||||
{
 | 
			
		||||
    Stripe::setApiKey(config('subscription.stripe_api_key'));
 | 
			
		||||
    $return_url = route('subscription.show');
 | 
			
		||||
    $stripe_customer_id = data_get($team,'subscription.stripe_customer_id');
 | 
			
		||||
    if (!$stripe_customer_id) {
 | 
			
		||||
    $stripe_customer_id = data_get($team, 'subscription.stripe_customer_id');
 | 
			
		||||
    if (! $stripe_customer_id) {
 | 
			
		||||
        return null;
 | 
			
		||||
    }
 | 
			
		||||
    $session = \Stripe\BillingPortal\Session::create([
 | 
			
		||||
        'customer' => $stripe_customer_id,
 | 
			
		||||
        'return_url' => $return_url,
 | 
			
		||||
    ]);
 | 
			
		||||
 | 
			
		||||
    return $session;
 | 
			
		||||
}
 | 
			
		||||
function allowedPathsForUnsubscribedAccounts()
 | 
			
		||||
@@ -128,7 +133,7 @@ function allowedPathsForUnsubscribedAccounts()
 | 
			
		||||
        'logout',
 | 
			
		||||
        'waitlist',
 | 
			
		||||
        'force-password-reset',
 | 
			
		||||
        'livewire/update'
 | 
			
		||||
        'livewire/update',
 | 
			
		||||
    ];
 | 
			
		||||
}
 | 
			
		||||
function allowedPathsForBoardingAccounts()
 | 
			
		||||
@@ -136,14 +141,15 @@ function allowedPathsForBoardingAccounts()
 | 
			
		||||
    return [
 | 
			
		||||
        ...allowedPathsForUnsubscribedAccounts(),
 | 
			
		||||
        'onboarding',
 | 
			
		||||
        'livewire/update'
 | 
			
		||||
        'livewire/update',
 | 
			
		||||
    ];
 | 
			
		||||
}
 | 
			
		||||
function allowedPathsForInvalidAccounts() {
 | 
			
		||||
function allowedPathsForInvalidAccounts()
 | 
			
		||||
{
 | 
			
		||||
    return [
 | 
			
		||||
        'logout',
 | 
			
		||||
        'verify',
 | 
			
		||||
        'force-password-reset',
 | 
			
		||||
        'livewire/update'
 | 
			
		||||
        'livewire/update',
 | 
			
		||||
    ];
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user