Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

updates

Andras Bacsai9ef3218bb527
diff --git a/app/Http/Livewire/Subscription/PricingPlans.php b/app/Http/Livewire/Subscription/PricingPlans.php
index bfdf486835..fcf24237fd 100644
--- a/app/Http/Livewire/Subscription/PricingPlans.php
+++ b/app/Http/Livewire/Subscription/PricingPlans.php
@@ -44,9 +44,6 @@ class PricingPlans extends Component
'price' => $priceId,
'quantity' => 1,
]],
- 'customer_update' =>[
- 'name' => 'auto'
- ],
'tax_id_collection' => [
'enabled' => true,
],
@@ -57,6 +54,9 @@ class PricingPlans extends Component
$customer = currentTeam()->subscription?->stripe_customer_id ?? null;
if ($customer) {
$payload['customer'] = $customer;
+ $payload['customer_update'] = [
+ 'name' => 'auto'
+ ];
} else {
$payload['customer_email'] = auth()->user()->email;
}
diff --git a/app/Http/Middleware/IsBoardingFlow.php b/app/Http/Middleware/IsBoardingFlow.php
index 74a5bba97c..83662a0735 100644
--- a/app/Http/Middleware/IsBoardingFlow.php
+++ b/app/Http/Middleware/IsBoardingFlow.php
@@ -15,8 +15,8 @@ class IsBoardingFlow
*/
public function handle(Request $request, Closure $next): Response
{
- ray('IsBoardingFlow Middleware');
- if (showBoarding() && !in_array($request->path(), allowedPaths())) {
+ // ray('IsBoardingFlow Middleware');
+ if (showBoarding() && !in_array($request->path(), allowedPathsForBoardingAccounts())) {
return redirect('boarding');
}
return $next($request);
diff --git a/app/Http/Middleware/SubscriptionValid.php b/app/Http/Middleware/SubscriptionValid.php
index d6d98a8cce..3a888f7010 100644
--- a/app/Http/Middleware/SubscriptionValid.php
+++ b/app/Http/Middleware/SubscriptionValid.php
@@ -27,7 +27,7 @@ class SubscriptionValid
}
if (!isSubscriptionActive() && !isSubscriptionOnGracePeriod()) {
// ray('SubscriptionValid Middleware');
- if (!in_array($request->path(), allowedPaths())) {
+ if (!in_array($request->path(), allowedPathsForUnsubscribedAccounts())) {
return redirect('subscription');
} else {
return $next($request);
diff --git a/bootstrap/helpers/subscriptions.php b/bootstrap/helpers/subscriptions.php
index fa16a1997f..ab266da2c1 100644
--- a/bootstrap/helpers/subscriptions.php
+++ b/bootstrap/helpers/subscriptions.php
@@ -104,7 +104,7 @@ function getStripeCustomerPortalSession(Team $team)
]);
return $session;
}
-function allowedPaths()
+function allowedPathsForUnsubscribedAccounts()
{
return [
'subscription',
@@ -113,11 +113,17 @@ function allowedPaths()
'waitlist',
'force-password-reset',
'logout',
- 'boarding',
- 'livewire/message/boarding',
'livewire/message/force-password-reset',
'livewire/message/check-license',
'livewire/message/switch-team',
'livewire/message/subscription.pricing-plans'
];
}
+function allowedPathsForBoardingAccounts()
+{
+ return [
+ ...allowedPathsForUnsubscribedAccounts(),
+ 'boarding',
+ 'livewire/message/boarding',
+ ];
+}
diff --git a/resources/views/components/pricing-plans.blade.php b/resources/views/components/pricing-plans.blade.php
index 3353d87d73..acdc1653b2 100644
--- a/resources/views/components/pricing-plans.blade.php
+++ b/resources/views/components/pricing-plans.blade.php
@@ -5,15 +5,15 @@
<div class="px-6 mx-auto lg:px-8">
<div class="flex justify-center mt-5">
<fieldset
- class="grid grid-cols-2 p-1 text-xs font-semibold leading-5 text-center rounded-full gap-x-1 ring-1 ring-inset ring-coolgray-500">
+ class="grid grid-cols-2 p-1 text-xs font-semibold leading-5 text-center rounded-full gap-x-1 ">
<legend class="sr-only">Payment frequency</legend>
- <label class="cursor-pointer rounded-full px-2.5 py-1"
+ <label class="cursor-pointer rounded px-2.5 py-1"
:class="selected === 'monthly' ? 'bg-coollabs-100 text-white' : ''">
<input type="radio" x-on:click="selected = 'monthly'" name="frequency" value="monthly"
class="sr-only">
<span>Monthly</span>
</label>
- <label class="cursor-pointer rounded-full px-2.5 py-1"
+ <label class="cursor-pointer rounded px-2.5 py-1"
:class="selected === 'yearly' ? 'bg-coollabs-100 text-white' : ''">
<input type="radio" x-on:click="selected = 'yearly'" name="frequency" value="annually"
class="sr-only">
@@ -22,11 +22,11 @@
</fieldset>
</div>
<div x-show="selected === 'monthly'" class="flex justify-center h-10 mt-3 text-sm leading-6 ">
- <div>Save <span class="font-bold text-warning">10% </span> annually with the yearly plan.
+ <div>Save <span class="font-bold text-warning">1 month</span> annually with the yearly plans.
</div>
</div>
<div x-show="selected === 'yearly'" class="flex justify-center h-10 mt-3 text-sm leading-6 ">
- <div>Congratulations! 🎉 You are saving money with this choice!
+ <div>
</div>
</div>
<div class="flow-root mt-12">