Add 3-tier plans, Paystack prepaid Pro, and Enterprise contact-sales card.
Deploy Ladill Frontdesk / deploy (push) Successful in 2m46s
Deploy Ladill Frontdesk / deploy (push) Successful in 2m46s
Sidebar settings and upgrade share one footer with consistent spacing. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -13,9 +13,8 @@ class PlanService
|
||||
$settings = $organization->settings ?? [];
|
||||
$plan = (string) ($settings['plan'] ?? 'free');
|
||||
|
||||
if ($plan === 'pro' && ! empty($settings['plan_expires_at'])) {
|
||||
$expires = Carbon::parse($settings['plan_expires_at']);
|
||||
if ($expires->isPast()) {
|
||||
if (in_array($plan, ['pro', 'enterprise'], true) && ! empty($settings['plan_expires_at'])) {
|
||||
if (Carbon::parse($settings['plan_expires_at'])->isPast()) {
|
||||
return 'free';
|
||||
}
|
||||
}
|
||||
@@ -28,6 +27,17 @@ class PlanService
|
||||
return $this->planKey($organization) === 'pro';
|
||||
}
|
||||
|
||||
public function isEnterprise(Organization $organization): bool
|
||||
{
|
||||
return $this->planKey($organization) === 'enterprise';
|
||||
}
|
||||
|
||||
/** Self-serve paid plans only — enterprise is sales-led. */
|
||||
public function hasPaidPlan(Organization $organization): bool
|
||||
{
|
||||
return $this->planKey($organization) === 'pro';
|
||||
}
|
||||
|
||||
/** @return array<string, mixed> */
|
||||
public function plan(Organization $organization): array
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user