Add 3-tier plans, Paystack prepaid Pro, and Enterprise contact-sales card.
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:
isaacclad
2026-06-30 01:55:38 +00:00
co-authored by Cursor
parent 1f6df54d8c
commit 5be14d0982
9 changed files with 419 additions and 73 deletions
+13 -3
View File
@@ -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
{